* lib/ld-lib.exp (is_elf_format): Return 1 for bfin-*-uclinux.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
883c7410
L
12009-08-30 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
4 accidental checkin.
5 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
6
095106a2
AM
72009-08-30 Alan Modra <amodra@bigpond.net.au>
8
9 PR ld/10569
10 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
11 (bfd_emul_get_commonpagesize): Likewise.
12
d3ce72d0
NC
132009-08-29 Martin Thuresson <martin@mtme.org>
14
15 * elf32-arm.c (struct stub_def): Rename member template to
16 template_sequence. (arm_build_one_stub,
17 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
18 Rename variable template to template_sequence.
19 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
20 Rename variable template to template_val.
21 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
22 new to new_symbol.
23 * coffgen.c (coff_make_empty_symbol)
24 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
25 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
26 new to new_insn.
27 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
28 to new_symbol.
29 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
30 new to new_reloc.
31 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
32 * ieee.c (ieee_make_empty_symbol): Rename variable new to
33 new_symbol.
34 * linker.c (bfd_new_link_order): Rename variable new to
35 new_lo.
36 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
37 symbol.
38 * oasys.c (oasys_make_empty_symbol): Rename variable new to
39 new_symbol_type.
40 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
41 new to new_symbol_type.
42 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
43 to new_symbol.
44 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
45 new_dump.
46 (read_hdr, rs6000coff_core_p)
47 (rs6000coff_core_file_matches_executable_p)
48 (rs6000coff_core_file_failing_command)
49 (rs6000coff_core_file_failing_signal): Updated function to use new
50 union member name.
51 * som.c (som_make_empty_symbol): Rename variable new to
52 new_symbol_type.
53 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
54 to new_symbol.
55 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
56 variable new to new_symbol.
57
573e8a1c
RW
582009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
59
60 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
61 bfdlibdir and bfdincludedir.
62 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
63 [INSTALL_LIBBFD]: ... here, ...
64 [INSTALL_LIBBFD]: ... and empty overrides here.
65 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
66 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
67 * Makefile.in: Regenerate.
68 * configure: Regenerate.
69
325e58c7
NC
702009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
71
72 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
73 relocations. Rewrite output of dynamic TLS relocations.
74 (DTP_OFFSET, TP_OFFSET): New constants.
75 (dtpoff_base): Update.
76 (tpoff): Rename to tpoff_base, update.
77 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
78 New functions. Move code from elf_m68k_relocate_section here.
79 (elf_m68k_relocate_section): Update.
80 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
81
e5f2b1de
NC
822009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
83
84 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
85 non_got_ref value.
86 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
87 Handle non_got_ref field.
88 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
89
0666b2c3
AM
902009-08-26 Alan Modra <amodra@bigpond.net.au>
91
600b8686 92 PR ld/10518
0666b2c3
AM
93 * linker.c (bfd_find_version_for_sym): Revert warning.
94
78a03297
AM
952009-08-26 Alan Modra <amodra@bigpond.net.au>
96
600b8686 97 PR ld/10518
78a03297
AM
98 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
99 other wildcard match. Warn on multiple wildcard matches.
100
81ecdfbb
RW
1012009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
102
14ec8efd
RW
103 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
104 appending.
105 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
106 only in this condition.
107 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
108 to build but not install libbfd.la in this condition.
109 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
110 (install_libbfd, install_libbfd): Remove.
111 * Makefile.in: Regenerate.
112 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
113 (INCLUDES): ... this.
114 ($(MKDOC)): Adjust.
115 * doc/Makefile.in: Regenerate.
116
95b40122
RW
117 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
118 no-dist and foreign.
119 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
120 dependency tracking to work for them.
121 (targets.lo, archures.lo, dwarf.lo): Rewrite to
122 use automake dependency tracking mechanism.
123 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
124 (mkdep section): Remove.
125 (BUILT_SOURCES): New, list $(BUILD_HFILES).
126 * Makefile.in: Regenerate.
127 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
128
af542c2e
RW
129 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
130 (install-pdf, install-pdf-recursive, install-html)
131 (install-html-recursive): Remove.
132 * Makefile.in: Regenerate.
133
81ecdfbb
RW
134 * Makefile.in: Regenerate.
135 * aclocal.m4: Likewise.
136 * config.in: Likewise.
137 * configure: Likewise.
138
cd1dac3d
DG
1392009-08-21 Daniel Gutson <dgutson@codesourcery.com>
140
141 * elf32-arm.c (arch_has_thumb2_nop): New function.
142 (arch_has_arm_nop): New function.
143 (elf32_arm_final_link_relocate): NOP opcodes changed.
144
440ae135
DE
1452009-08-16 Doug Evans <dje@google.com>
146
147 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
148 at least don't leak memory.
149
a109e2f5
DD
1502009-08-13 DJ Delorie <dj@redhat.com>
151
152 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
153 if needed.
154
c1742541
NC
1552009-08-12 Nick Clifton <nickc@redhat.com>
156
157 * po/fi.po: Updated Finnish translation.
158
6a9adeca
BS
1592009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
160
161 Merge some FRV FDPIC changes into the Blackfin code.
162 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
163 summary reloc information.
164 (bfinfdpic_dynamic_got_plt_info): New.
165 (_bfin_create_got_section): Create the PLT section here.
166 (elf32_bfinfdpic_create_dynamic_sections): Not here.
167 (_bfinfdpic_count_nontls_entries): Move out of...
168 (_bfinfdpic_count_got_plt_entries): ... here.
169 (_bfinfdpic_count_relocs_fixups): Likewise.
170 (_bfinfdpic_reset_got_plt_entries): New.
171 (_bfinfdpic_size_got_plt): Move out of...
172 (elf32_bfinfdpic_size_dynamic_sections): ... here.
173 (bfinfdpic_relocate_section): Be careful not to call
174 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
175 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
176 New functions.
177 (elf_backend_discard_info): Define for FD-PIC.
178
5dabe785
AM
1792009-08-11 Alan Modra <amodra@bigpond.net.au>
180
181 * elflink.c: Add FIXMEs for some places that require octets_per_byte
182 adjustments.
183 * elf-eh-frame.c: Likewise.
184 * merge.c: Likewise.
185
ea7a63de
AM
1862009-08-11 Alan Modra <amodra@bigpond.net.au>
187
188 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
189 to x86 and x86_64 configurations.
190 * configure: Regenerate.
191
9bf609ec
JK
1922009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
193
194 Stop using bfd_usrdata in libbfd.
195 * coff-stgo32.c (bfd_coff_go32stub): Remove.
196 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
197 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
198 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
199 filehdr_dst->u.go32.stub. New comment with the reason.
200 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
201 Substitute the removed macro bfd_coff_go32stub.
202 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
203 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
204 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
205 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
206 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
207 bfd_coff_go32stub.
208 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
209 * libcoff-in.h (coff_data_type): New field go32stub.
210 * libcoff.h: Regenerated.
211
e39e47bd
JK
2122009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
213
214 Fix go32 stub preservation by objcopy.
215 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
216 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
217 go32stub.
218
ffcb4889
NS
2192009-08-10 Nathan Sidwell <nathan@codesourcery.com>
220
221 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
222 symbols.
223 (elf32_arm_final_link_relocate): Treat local undefined symbols the
224 same as global undefined symbols.
225 (elf32_arm_relocate_section): Give an error for local undefined
226 non-weak symbols, unless the reloc will not use the symbol.
227
01017ef8
NS
2282009-08-10 Nathan Sidwell <nathan@codesourcery.com>
229
230 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
231 (ppc_elf_relax_section): Use symbol index to distinguish
232 relocatable stubs.
233
a8ad78a7
AM
2342009-08-10 Alan Modra <amodra@bigpond.net.au>
235
236 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
237
91e21fb7
AM
2382009-08-10 Alan Modra <amodra@bigpond.net.au>
239
240 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
241 info for STT_GNU_IFUNC.
242 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
243 on got refs in case the symbol turns out to be ifunc.
244 (ppc_elf_gc_sweep_hook): Similarly.
245 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
246 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
247 (ppc_elf_size_dynamic_sections): Likewise.
248 (ppc_elf_relocate_section): Likewise.
249
6a9adeca 2502009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
cb88ce9f
BS
251
252 From Mike Frysinger <michael.frysinger@analog.com>
253 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
254 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
255 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
256 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
257 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
258 Adjust to match the renamed reloc definitions.
259
e7e75368
AM
2602009-08-08 Alan Modra <amodra@bigpond.net.au>
261
262 PR 10494
263 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
264 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
265
918d9742
TT
2662009-08-07 Tom Tromey <tromey@redhat.com>
267
268 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
269 aliasing error.
270
7ba29e2a
NC
2712009-08-06 Michael Eager <eager@eagercon.com>
272
273 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
274 * Makefile.in: Regenerate.
275 * archures.c: Add bfd_arch_microblaze.
276 * bfd-in2.h: Regenerate.
277 * config.bfd: Add microblaze target.
278 * configure.in: Add bfd_elf32_microblaze_vec target.
279 * configure: Regenerate.
280 * cpu-microblaze.c: New.
281 * elf32-microblaze.c: New.
282 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
283 * libbfd.h: Regenerate.
284 * reloc.c: Add MICROBLAZE relocations.
285 * section.c: Add struct relax_table and relax_count to section.
286 * targets.c: Add bfd_elf32_microblaze_vec.
287
e47bf690
JJ
2882009-08-06 Jakub Jelinek <jakub@redhat.com>
289 Alan Modra <amodra@bigpond.net.au>
290
291 PR binutils/10492
292 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
293 symbols.
294 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
295 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
296
3ae046cc
NS
2972009-08-06 Nathan Sidwell <nathan@codesourcery.com>
298
299 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
300 at least once when fixing cortex-a8.
301
cd8d5a82
CF
3022009-08-05 Chao-ying Fu <fu@mips.com>
303
304 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
305 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
306 for CPUs. It is true for RM9000.
307 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
308 for all CPUs.
309 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
310 to guard the transformation.
311
9cc305ec
TS
3122009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
313
314 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
315 (spu_elf_size_sections): Declare prototype.
316 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
317 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
318 (spu_elf_emit_fixup): New function.
319 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
320 (spu_elf_size_sections): New function.
321
eb7c4339
NS
3222009-08-05 Nathan Sidwell <nathan@codesourcery.com>
323
324 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
325 (arm_build_one_stub): Build a8 veneers as a separate pass.
326 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
327 parameters. Use them to check if we create a different a8 fixup
328 than the previous pass.
329 (elf32_arm_size_stubs): Move scope of stub_changed and
330 prev_num_a8_fixes into main loop.
331 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
332
a9585d22
AM
3332009-08-04 Alan Modra <amodra@bigpond.net.au>
334
335 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
336 which find_plt_ent is called. Delete redundant code.
337
45b222d6
L
3382009-08-03 H.J. Lu <hongjiu.lu@intel.com>
339
340 PR binutils/10363
341 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
342 invalid string offset.
343
004fb780
L
3442009-08-03 H.J. Lu <hongjiu.lu@intel.com>
345
346 PR ld/10433
347 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
348 to htab->init_got_offset and plt to htab->init_plt_offset
349 when discarding space for dynamic relocations.
350
a877a2b6
AM
3512009-08-03 Alan Modra <amodra@bigpond.net.au>
352
353 * elf32-ppc.c (struct plt_entry): Revise comments.
354 (ppc_elf_check_relocs): Don't create needless plt_entry info
355 for non-pie executables. Don't test info->pie when info->shared
356 already covers that case.
357 (ppc_elf_gc_sweep_hook): Adjust for above change.
358 (add_stub_sym): Don't test info->pie when info->shared tested.
359 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
360 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
361 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
362 (ppc_elf_relocate_section): Likewise.
363
de972ffa
AM
3642009-08-03 Alan Modra <amodra@bigpond.net.au>
365
366 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
367 for local ifunc symbols in non-pie executables, regardless of
368 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
369 code so that it's obvious that we only do anything special for
370 local ifunc syms.
371 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
372 (allocate_dynrelocs): Correct comment for syms defined in plt.
373 Don't specially allocate ifunc dyn relocs.
374 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
375 (ppc_elf_relocate_section): Set "relocation" value for ifunc
376 syms in non-pie executables. No specially allocated dyn relocs
377 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
378 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
379 a non-pie executable.
380
1d85728f
L
3812009-08-02 H.J. Lu <hongjiu.lu@intel.com>
382 Jakub Jelinek <jakub@redhat.com>
383
384 PR ld/6443
385 * elf32-i386.c (elf_i386_tls_transition): Check executable
386 instead of shared for TLS when building PIE.
387 (elf_i386_check_relocs): Likewise.
388 (elf_i386_allocate_dynrelocs): Likewise.
389 (elf_i386_relocate_section): Likewise.
390
391 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
392 instead of shared for TLS when building PIE.
393 (elf64_x86_64_check_relocs): Likewise.
394 (elf64_x86_64_allocate_dynrelocs): Likewise.
395 (elf64_x86_64_relocate_section): Likewise.
396
5d8d4872
AG
3972009-07-31 Anthony Green <green@moxielogic.com>
398
399 * config.bfd (targ_cpu): Add moxie-uclinux support.
400
080a1b9f
HPN
4012009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
402
403 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
404
25f23106
AM
4052009-07-30 Alan Modra <amodra@bigpond.net.au>
406
407 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
408 used by indirect function support. Count dynamic relocs for
409 ifunc syms.
410 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
411 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
412 in iplt and their relocs in reliplt. Don't make ifunc syms
413 dynamic. Allocate got entry relocs for non-dynamic ifunc in
414 reliplt. Handle other dynamic relocs for ifunc.
415 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
416 ifunc in reliplt, likewise relocs for got against local ifunc.
417 Typo fix on reliplt size adjust.
418 (ppc_elf_relocate_section): Don't use plt scheme of allocating
419 relocs 1-1 with entries for iplt, instead just add using
420 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
421 Error on invalid ifunc dyn relocs.
422 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
423 in iplt/reliplt.
424 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
425 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
426 (ppc64_elf_reloc_type_lookup): Handle new relocs.
427 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
428 (allocate_dynrelocs): As for elf32-ppc.c above.
429 (ppc64_elf_size_dynamic_sections): Likewise.
430 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
431 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
432 (ppc_size_one_stub): Similarly.
433 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
434 relocs too.
435 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
436
80f540b7
HPN
4372009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
438
439 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
440 change. Add note to head comment.
441
4ad4f3cb
JB
4422009-07-28 Jan Beulich <jbeulich@novell.com>
443
444 * archive.c (get_extended_arelt_filename): Remove redundant
445 range check on index.
446
d8d2f433
DK
4472009-07-27 Doug Kwan <dougkwan@google.com>
448
449 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
450
9e675548
L
4512009-07-27 H.J. Lu <hongjiu.lu@intel.com>
452
453 * archures.c bfd_*_arch): Sorted.
454 (bfd_archures_list): Likewise.
455
86514226
SR
4562009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
457
9e675548 458 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
86514226
SR
459 to R_cr16_NUM32 relocation.
460
305f7588
MS
4612009-07-26 Michael Eager <eager@eagercon.com>
462
463 * archures.c: Add bfd_mach_ppc_405
464 * bfd-in2.h: Same.
465
b1995b01
L
4662009-07-25 H.J. Lu <hongjiu.lu@intel.com>
467
468 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
469 * cpu-l1om.c (bfd_l1om_arch): Likewise.
470
8a9036a4
L
4712009-07-25 H.J. Lu <hongjiu.lu@intel.com>
472
473 * archures.c (bfd_architecture): Add bfd_arch_l1om.
474 (bfd_l1om_arch): New.
475 (bfd_archures_list): Add &bfd_l1om_arch.
476 * bfd-in2.h: Regenerated.
477
478 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
479 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
480 if bfd_elf64_x86_64_freebsd_vec is supported.
481 (targ_selvecs): Likewise.
482
483 * configure.in: Support bfd_elf64_l1om_vec and
484 bfd_elf64_l1om_freebsd_vec.
485 * configure: Regenerated.
486
487 * cpu-l1om.c: New.
488
489 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
490 (bfd_elf64_l1om_vec): Likewise.
491 (bfd_elf64_l1om_freebsd_vec): Likewise.
492
493 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
494 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
495 * Makefile.in: Regenerated.
496
497 * targets.c (bfd_elf64_l1om_vec): New.
498 (bfd_elf64_l1om_freebsd_vec): Likewise.
499 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
500 bfd_elf64_l1om_freebsd_vec.
501
8fdcc58d
TS
5022009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
503 Alan Modra <amodra@bigpond.net.au>
504
505 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
506 * bfd-in2.h: Regenerate.
507 * libbfd.h: Regenerate.
508 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
509 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
510 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
511
9b769489
L
5122009-07-23 H.J. Lu <hongjiu.lu@intel.com>
513
514 PR ld/10434
515 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
516 instead of shared for R_X86_64_TPOFF32.
517 (elf64_x86_64_relocate_section): Likewise.
518
3e7a7d11
NC
5192009-07-23 Ulrich Drepper <drepper@redhat.com>
520
521 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
522 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
523 with the BSF_GNU_UNIQUE flag bit set.
524 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
525 for symbols with STB_GNU_UNIQUE binding.
526 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
527 with the STB_GNU_UNIQUE binding.
528 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
529 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
530 symbols with the unique_global field set.
531 (elf_link_output_extsym): Set unique_global field for symbols with
532 the STB_GNU_UNIQUE binding.
533 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
534 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
535 symbols.
536 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
537 symbols.
538 * bfd-in2.h: Regenerate.
539
5f35ea9c
L
5402009-07-22 H.J. Lu <hongjiu.lu@intel.com>
541
542 * elflink.c (elf_link_output_extsym): Revert the last change.
543
b63cc625
L
5442009-07-22 H.J. Lu <hongjiu.lu@intel.com>
545
546 PR ld/10433
547 * elflink.c (elf_link_output_extsym): Special case ifunc syms
548 when ref_regular, not def_regular.
549
2955ec4c
L
5502009-07-21 H.J. Lu <hongjiu.lu@intel.com>
551
552 PR ld/10426
553 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
554 from a DSO into a normal FUNC symbol.
555 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
556 a normal FUNC symbol.
557
6d30f5b2
NC
5582009-07-17 Chao-ying Fu <fu@mips.com>
559
560 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
561 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
562 interlocking, the last PLT entry needs a nop in the branch delay slot.
563 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
564 output the last two PLT entries in reverse order.
565
1f85278f
L
5662009-07-16 H.J. Lu <hongjiu.lu@intel.com>
567
568 * elf32-i386.c (elf_i386_relocate_section): Don't get local
569 STT_GNU_IFUNC symbol for relocatable link.
570 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
571
f07749bb
L
5722009-07-10 H.J. Lu <hongjiu.lu@intel.com>
573
574 * bfdio.c (bfd_iovec): Add comments for bmmap.
575 * bfd-in2.h: Regenerated.
576
8455dd2c
L
5772009-07-10 H.J. Lu <hongjiu.lu@intel.com>
578
579 * Makefile.am: Run "make dep-am".
580 * Makefile.in: Regenerated.
581
cedfb179
DK
5822009-07-10 Doug Kwan <dougkwan@google.com>
583
584 * elf32-arm.c (stub_hash_newfunc): Initialize fields
585 target_addend and orig_insn.
586
fa8f86ff
TT
5872009-07-10 Tom Tromey <tromey@redhat.com>
588
589 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
590 (elf-eh-frame.lo): Likewise.
591 (elf32-bfin.lo): Likewise.
592 (elf32-frv.lo): Likewise.
593 (elf32-xc16x.lo): Likewise.
594 * Makefile.in: Rebuild.
595 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
596 * elf-eh-frame.c: Likewise.
597 * elf32-bfin.c: Likewise.
598 * elf32-frv.c: Likewise.
599 * elf32-xc16x.c: Likewise.
600
33c6a8fc
JB
6012009-07-10 Julian Brown <julian@codesourcery.com>
602
603 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
604 symbol a stub entry is derived from, not the entry for the stub
605 itself, in call to elf32_arm_final_link_relocate.
606
1d770845
L
6072009-07-10 H.J. Lu <hongjiu.lu@intel.com>
608
609 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
610 when reporting addends.
611
52cfded7
AM
6122009-07-10 Alan Modra <amodra@bigpond.net.au>
613
614 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
615 data even when no stubs.
616 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
617
e054468f
AM
6182009-07-10 Alan Modra <amodra@bigpond.net.au>
619
620 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
621 (ppc_elf_get_synthetic_symtab): Report addend.
622 (PLT_IFUNC): Define.
623 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
624 (ppc_elf_create_glink): New function.
625 (ppc_elf_create_dynamic_sections): Use it.
626 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
627 (update_local_sym_info): Allocate space for local_plt array.
628 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
629 entry pointer.
630 (is_branch_reloc): New function.
631 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
632 (ppc_elf_gc_sweep_hook): Likewise.
633 (ppc_elf_adjust_dynamic_symbol): Likewise.
634 (allocate_dynrelocs): Likewise.
635 (ppc_elf_size_dynamic_sections): Likewise.
636 (ppc_elf_relocate_section): Likewise.
637 (branch_reloc_hash_match): Use is_branch_reloc.
638 (ppc_elf_tls_optimize): Adjust for local_plt.
639 (write_glink_stub): New function, extracted from..
640 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
641 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
642 branch table when dynamic.
643 (elf_backend_post_process_headers): Define.
644 * elf64-ppc.c (elf_backend_post_process_headers): Define.
645 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
646 (ppc64_elf_get_synthetic_symtab): Report addend.
647 (struct ppc_stub_hash_entry): Add plt_ent.
648 (PLT_IFUNC): Define.
649 (struct ppc_link_hash_table): Add iplt and reliplt.
650 (create_linkage_sections): Make .iplt and .rela.iplt sections.
651 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
652 (update_local_sym_info): Allocate space for local_plt array.
653 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
654 entry pointer.
655 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
656 and don't change hash flags here.
657 (is_branch_reloc): New function.
658 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
659 (ppc64_elf_gc_sweep_hook): Likewise.
660 (ppc64_elf_adjust_dynamic_symbol): Likewise.
661 (allocate_dynrelocs): Likewise.
662 (ppc64_elf_size_dynamic_sections): Likewise.
663 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
664 (ppc64_elf_size_stubs): Likewise.
665 (ppc64_elf_relocate_section): Likewise.
666 (get_sym_h): Adjust for local_plt.
667 (branch_reloc_hash_match): Use is_branch_reloc.
668 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
669 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
670
041de40d
AM
6712009-07-10 Alan Modra <amodra@bigpond.net.au>
672
673 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
674
7ae26bc1
AM
6752009-07-10 Alan Modra <amodra@bigpond.net.au>
676
677 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
678 and ref_regular_nonweak comment.
679 * elflink.c (elf_link_output_extsym): Special case ifunc syms
680 when def_regular, not ref_regular.
681 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
682 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
683 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
684
9c4d0c1f
AM
6852009-07-09 Alan Modra <amodra@bigpond.net.au>
686
687 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
688 of malloc'd struct call_info.
689 (pasted_function): Likewise, priority too.
690
2fc6d3b0
AM
6912009-07-07 Alan Modra <amodra@bigpond.net.au>
692
693 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
694 alignment when packing sections into overlays.
695
9e1f7c0e
DK
6962009-07-03 Cary Coutant <ccoutant@google.com>
697
698 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
699
4a768870
DK
7002009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
701
702 * coffcode.h (sec_to_styp_flags): Partially revert (functional
703 changes only) earlier patch:-
704
705 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
706
707 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
708 give .debug and .reloc data characteristics.
709 (DOT_RELOC): New define for .reloc section string.
710 (coff_write_object_contents): Use DOT_RELOC instead of string.
711
848f5748
TT
7122009-07-02 Tom Tromey <tromey@redhat.com>
713
714 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
715 * bfdwin.c (bfd_free_window): Cast to unsigned long.
716
dda46a27
L
7172009-07-01 Nick Clifton <nickc@redhat.com>
718
719 * elf-m10300.c: Remove trailing white space.
720 * reloc.c: Likewise.
721
efde2f2c
NC
7222009-07-01 Douglas B Rupp <rupp@gnat.com>
723
dda46a27 724 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 725 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
726 * configure.in: Use them.
727 * configure: Regenerate.
728 * config.in: Regnerate.
729 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
730 #define _BSD_SOURCE. Add comments.
731 (vms_file_stats_name): Calculate creation date based on available
732 runtime data. Return 1 for version instead of 0.
733
e1ec24c6
NC
7342009-07-01 Nick Clifton <nickc@redhat.com>
735
736 PR 10072
737 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
738 to R_ARM_THM_PC8 relocation.
739
2709f570
NC
7402009-06-29 Nick Clifton <nickc@redhat.com>
741
742 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
743 different uses of the relocations addend when a symbol is in a
744 merged section.
745
83b89087
L
7462009-06-27 H.J. Lu <hongjiu.lu@intel.com>
747
748 PR ld/10337
749 * elf.c (bfd_section_from_shdr): Don't change sh_link for
750 SHT_REL/SHT_RELA sections on executable nor shared library.
751 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
752 as a normal section.
753
be7035c6
NC
7542009-06-25 Nick Clifton <nickc@redhat.com>
755
756 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
757 symbols with SEC_MERGE flag.
758
bdeb4032
KT
7592009-06-25 Kai Tietz <kai.tietz@onevision.com>
760
761 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
762 give .debug and .reloc data characteristics.
763 (DOT_RELOC): New define for .reloc section string.
764 (coff_write_object_contents): Use DOT_RELOC instead of string.
765
b32e07d7
TG
7662009-06-25 Tristan Gingold <gingold@adacore.com>
767
768 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
769 (bfd_mach_o_canonicalize_dynamic_symtab)
770 (bfd_mach_o_get_synthetic_symtab): Defines.
771 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
772 (TARGET_NAME): Use Mach-O specific functions for dynamic.
773
774 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
775 for scattered relocations.
776 (bfd_mach_o_i386_print_thread): New function.
777 (bfd_mach_o_print_thread): Define.
778
779 * mach-o.c (text_section_names_xlat): Add an entry for __const.
780 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
781 New functions extracted from ...
782 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
783 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
784 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
785 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
786 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
787 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
788 Set name_str field.
789 (bfd_mach_o_scan_read_dylib): Ditto.
790 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
791 reindent.
792 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
793 decode isym and flags on little endian targets. Set dysymtab field.
794 (bfd_mach_o_scan_start_address): Adjust for enum names.
795 (bfd_mach_o_lookup_section): Do not look for segments anymore.
796 (bfd_mach_o_print_section): Display bfd section name.
797 (bfd_mach_o_print_segment): Display none if no name.
798 (bfd_mach_o_print_dysymtab): Display next index for local, external
799 and undefined symbols.
800 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
801 Display dylinker name. Display thread and unixthread commands content.
802 (bfd_mach_o_print_thread): New macro.
803
804 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
805 (bfd_mach_o_ppc_thread_flavour): Ditto.
806 (bfd_mach_o_i386_thread_flavour): Ditto.
807 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
808 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
809 BFD_MACH_O_THREAD_STATE_NONE.
810 (bfd_mach_o_segment_command): Remove segment field.
811 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
812 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
813 (bfd_mach_o_prebound_dylib_command): Ditto.
814 (bfd_mach_o_dylib_command): Ditto.
815 (bfd_mach_o_prebound_dylib_command): Remove section field.
816 (mach_o_data_struct): Add dysymtab field.
817 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
818 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
819 (bfd_mach_o_build_commands): Remove parameter names and attributes.
820 (bfd_mach_o_get_dynamic_reloc_upper_bound)
821 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
822
c41ba836
DK
8232009-06-25 Rafael Avila de Espindola <espindola@google.com>
824
825 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
826 field of struct dirent.
827
3188b070
TG
8282009-06-23 Tristan Gingold <gingold@adacore.com>
829
830 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
831 of this macro. Fix indentation.
832
022f8312
CL
8332009-06-22 Christophe Lyon <christophe.lyon@st.com>
834
835 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
836 destination for defined dynamic symbols when deciding whether to
837 insert a stub or not.
838 (allocate_dynrelocs): Make sure functions are not marked as Thumb
839 when actually accessed through a PLT, even when generating a
840 shared lib.
841
d297e807
TG
8422009-06-22 Tristan Gingold <gingold@adacore.com>
843
844 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
845 the relocs array.
846
ceaf50a2
AM
8472009-06-22 Alan Modra <amodra@bigpond.net.au>
848
849 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
850 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
851
983bddc8
AM
8522009-06-22 Alan Modra <amodra@bigpond.net.au>
853
854 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
855
f8703194
L
8562009-06-19 H.J. Lu <hongjiu.lu@intel.com>
857
858 * elflink.c (elf_link_add_object_symbols): Avoid warning
859 from -Wjump-misses-init in gcc 4.5.0.
860
09a24cbf
L
8612009-06-19 H.J. Lu <hongjiu.lu@intel.com>
862
863 * elf32-i386.c (elf_i386_check_relocs): Properly check local
864 symbol on error.
865 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
866
4c544807
L
8672009-06-19 H.J. Lu <hongjiu.lu@intel.com>
868
869 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
870 r_symndx. Report local symbol name on error.
871 (elf_i386_check_relocs): Updated. Report local symbol name on
872 error.
873 (elf_i386_gc_sweep_hook): Updated.
874 (elf_i386_relocate_section): Likewise.
875
876 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
877 r_symndx. Report local symbol name on error.
878 (elf64_x86_64_check_relocs): Updated. Report local symbol name
879 on error.
880 (elf64_x86_64_gc_sweep_hook): Updated.
881 (elf64_x86_64_relocate_section): Likewise.
882
b8674692
TG
8832009-06-19 Tristan Gingold <gingold@adacore.com>
884
885 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
886
046b007d
TG
8872009-06-19 Tristan Gingold <gingold@adacore.com>
888
889 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
890 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
891 (bfd_mach_o_valid): Ditto.
892 (bfd_mach_o_wide_p): Ditto.
893 (bfd_mach_o_canonicalize_reloc): Ditto.
894 (bfd_mach_o_build_commands): Ditto.
895 (bfd_mach_o_scan_read_thread): Ditto.
896 (bfd_mach_o_flatten_sections): Ditto.
897 (bfd_mach_o_scan_start_address): Ditto.
898 (bfd_mach_o_lookup_section): Ditto.
899 (bfd_mach_o_core_fetch_environment): Ditto.
900 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
901 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
902 (bfd_mach_o_scan_write_symtab): Ditto.
903 Use macros instead of hard-coded values.
904 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
905 Use bfd_mach_o_get_data instead of direct access. Use macros
906 instead of hard-coded values.
907 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
908 Remove sym argument and get section from mdata.
909 Move code into the else branch.
910 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
911 Remove sym argument and get section from mdata. Adjust code.
912 (bfd_mach_o_scan_read_dylib): Move assertion into the created
913 switch (which replaces consecutive if statements).
914 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
915 module table, table of content, indirect symbols and external
916 referenced symbols.
917 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
918 field.
919 (bfd_mach_o_scan_read_linkedit): New function.
920 (bfd_mach_o_scan_read_str): Ditto.
921 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
922 field of mdata.
923 (bfd_mach_o_get_symtab_upper_bound): Remove check as
924 bfd_mach_o_count_symbols never returns an error.
925 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
926 symtab field (there might be only one symtab).
927 (bfd_mach_o_scan_read_command): Handle reexported dylib.
928 Handle sub frameworks, sub umbrella, sub library and sub client.
929 Read code signature and segment split info commands.
930 (bfd_mach_o_scan): Reindent.
931 (bfd_mach_o_xlat_name): New type.
932 (bfd_mach_o_print_flags): New function.
933 (bfd_mach_o_get_name): Ditto.
934 (bfd_mach_o_cpu_name): New variable.
935 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
936 (bfd_mach_o_section_type_name)
937 (bfd_mach_o_section_attribute_name)
938 (bfd_mach_o_load_command_name): New variables.
939 (bfd_mach_o_print_private_header): New function.
940 (bfd_mach_o_print_section_map): New function extracted from
941 bfd_mach_o_print_private_bfd_data.
942 (bfd_mach_o_print_section): Ditto. Print more infos.
943 (bfd_mach_o_print_segment): Ditto.
944 (bfd_mach_o_print_dysymtab): Ditto.
945 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
946 load weak dylib, reexport dylib and id dylib.
947 Handle code signature and segment_split info.
948 Handle sub frameworks, sub umbrella, sub library and sub client.
949 (bfd_mach_o_section_get_nbr_indirect): New function.
950
951 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
952 (bfd_mach_o_header_flags): New enum to define header flags.
953 (bfd_mach_o_section_attribute): New enum to replace ...
954 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
955 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
956 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
957 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
958 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
959 these removed macros.
960 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
961 (bfd_mach_o_dylib_module): New type.
962 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
963 macros.
964 (bfd_mach_o_dylib_table_of_content): New type.
965 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
966 (bfd_mach_o_dylib_reference): New type.
967 (BFD_MACH_O_REFERENCE_SIZE): New macro.
968 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
969 modules, toc, references and indirect syms.
970 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
971 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
972 unused). Add comment.
973 (bfd_mach_o_dylib_command): Ditto.
974 (bfd_mach_o_prebound_dylib_command): Ditto.
975 (bfd_mach_o_linkedit_command): New type.
976 (bfd_mach_o_str_command): New type.
977 (bfd_mach_o_load_command): Add linkedit and str fields.
978 (mach_o_data_struct): Add symtab field.
979 (bfd_get_mach_o_data): Renamed to ...
980 (bfd_mach_o_get_data): ... this new macro.
981 (bfd_mach_o_scan_read_symtab_symbol,
982 bfd_mach_o_scan_read_symtab_strtab,
983 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
984
985 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
986 instead of direct access.
987
6d78d0b9
AM
9882009-06-19 Alan Modra <amodra@bigpond.net.au>
989
990 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
991 R_PPC_PLTREL24 relocs.
992 (ppc_elf_relocate_section): Likewise.
993
3ec01793
AM
9942009-06-19 Alan Modra <amodra@bigpond.net.au>
995
996 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
997 pointer to sym hash. Update all uses.
998 (update_plt_info): Likewise. Don't check addend here.
999
c2e61a4e
L
10002009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1003 bfd_sym_from_r_symndx.
1004 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1005
87d72d41
AM
10062009-06-18 Alan Modra <amodra@bigpond.net.au>
1007
1008 * elf-bfd.h (struct sym_sec_cache): Delete.
1009 (struct sym_cache): New.
1010 (bfd_section_from_r_symndx): Delete prototype.
1011 (bfd_sym_from_r_symndx): Define prototype.
1012 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1013 (bfd_sym_from_r_symndx): ..new function.
1014 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1015 bfd_section_from_r_symndx to new struct and function.
1016 * elf32-bfin.c: Likewise.
1017 * elf32-hppa.c: Likewise.
1018 * elf32-i386.c: Likewise.
1019 * elf32-m32r.c: Likewise.
1020 * elf32-m68hc1x.c: Likewise.
1021 * elf32-m68hc1x.h: Likewise.
1022 * elf32-m68k.c: Likewise.
1023 * elf32-ppc.c: Likewise.
1024 * elf32-s390.c: Likewise.
1025 * elf32-sh.c: Likewise.
1026 * elf64-ppc.c: Likewise.
1027 * elf64-s390.c: Likewise.
1028 * elf64-x86-64.c: Likewise.
1029 * elfxx-sparc.c: Likewise.
1030 * elfxx-sparc.h: Likewise.
1031
14aae723
L
10322009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1033
1034 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1035 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1036
5e486aa1
NC
10372009-06-18 Nick Clifton <nickc@redhat.com>
1038
1039 * elflink.c (elf_link_sort_relocs): Return early if there are no
1040 relocs to sort.
1041
361dff73
DK
10422009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
1043
32425da9
NC
1044 Merge cegcc and mingw32ce target name changes from
1045 CeGCC project:
361dff73 1046
32425da9 1047 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
1048
1049 * config.bfd: Add arm*-*-cegcc* target.
1050
32425da9 1051 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
1052
1053 * config.bfd: Add arm-*-mingw32ce* target.
1054
e03a8ed8
L
10552009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1056
1057 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1058 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1059 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1060 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1061
10622009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1063
1064 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1065 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1066 * elf32-i386.c (elf_i386_check_relocs): Use it.
1067 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1068
10692009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1070
1071 * elf-bfd.h (elf_dyn_relocs): New.
1072
1073 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1074 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1075 elf_dyn_relocs.
1076 (elf_i386_copy_indirect_symbol): Likewise.
1077 (elf_i386_check_relocs): Likewise.
1078 (elf_i386_gc_sweep_hook): Likewise.
1079 (elf_i386_allocate_dynrelocs): Likewise.
1080 (elf_i386_readonly_dynrelocs): Likewise.
1081 (elf_i386_size_dynamic_sections): Likewise.
1082
1083 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1084 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1085 with elf_dyn_relocs.
1086 (elf64_x86_64_copy_indirect_symbol): Updated.
1087 (elf64_x86_64_check_relocs): Likewise.
1088 (elf64_x86_64_gc_sweep_hook): Likewise.
1089 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1090 (elf64_x86_64_allocate_dynrelocs): Likewise.
1091 (elf64_x86_64_readonly_dynrelocs): Likewise.
1092 (elf64_x86_64_size_dynamic_sections): Likewise.
1093
64e77c6d
L
10942009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1095
1096 * elf32-arm.c (create_got_section): Get existing .rela.got
1097 section.
1098 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1099 * elf32-lm32.c (create_got_section): Likewise.
1100 * elf32-m32r.c (create_got_section): Likewise.
1101 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1102 * elf32-s390.c (create_got_section): Likewise.
1103 * elf32-sh.c (create_got_section): Likewise.
1104 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1105 * elf64-s390.c (create_got_section): Likewise.
1106 * elfxx-sparc.c (create_got_section): Likewise.
1107
1108 * elflink.c (_bfd_elf_create_got_section): Properly initialize
1109 the GOT size.
1110
d2149d72
L
11112009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1112
1113 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1114
1115 * elf32-i386.c (elf_i386_local_hash): Removed.
1116 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1117 (elf_i386_get_local_sym_hash): Likewise.
1118
1119 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1120 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1121 (elf64_x86_64_get_local_sym_hash): Likewise.
1122 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1123 (get_local_sym_hash): Likewise.
1124
cc3bd654
L
11252009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1126
1127 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1128 rel_got_sec and plt_sec.
1129 (elfNN_ia64_relax_section): Updated.
1130 (elfNN_ia64_create_dynamic_sections): Likewise.
1131 (get_got): Likewise.
1132 (allocate_dynrel_entries): Likewise.
1133 (elfNN_ia64_size_dynamic_sections): Likewise.
1134 (set_got_entry): Likewise.
1135 (elfNN_ia64_choose_gp): Likewise.
1136 (elfNN_ia64_relocate_section): Likewise.
1137 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1138 (elfNN_ia64_finish_dynamic_sections): Likewise.
1139
be3e406d
UW
11402009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
1141
1142 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1143 also for calls.
1144
6de2ae4a
L
11452009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 * configure.in (elf): Add elf-ifunc.lo.
1148
1149 * configure: Regenerated.
1150 * Makefile.in: Likewise.
1151
1152 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1153 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1154
1155 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1156 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1157 irelifunc.
1158 (elf_i386_link_hash_table_create): Likewise.
1159 (elf_i386_create_dynamic_sections): Likewise.
1160 (elf_i386_check_relocs): Likewise.
1161 (elf_i386_allocate_dynrelocs): Likewise.
1162 (elf_i386_size_dynamic_sections): Likewise.
1163 (elf_i386_relocate_section): Likewise.
1164 (elf_i386_finish_dynamic_symbol): Likewise.
1165 (elf_i386_finish_dynamic_sections): Likewise.
1166 (elf_i386_create_got_section): Removed.
1167
1168 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1169 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1170 irelifunc.
1171 (elf64_x86_64_compute_jump_table_size): Updated.
1172 (elf64_x86_64_link_hash_table_create): Likewise.
1173 (elf64_x86_64_create_dynamic_sections): Likewise.
1174 (elf64_x86_64_check_relocs): Likewise.
1175 (elf64_x86_64_allocate_dynrelocs): Likewise.
1176 (elf64_x86_64_size_dynamic_sections): Likewise.
1177 (elf64_x86_64_relocate_section): Likewise.
1178 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1179 (elf64_x86_64_finish_dynamic_sections): Likewise.
1180 (elf64_x86_64_create_got_section): Removed.
1181
1182 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1183 for pointer alignment. Set up section pointers.
1184 (_bfd_elf_create_dynamic_sections): Likewise.
1185 (_bfd_elf_create_ifunc_sections): Moved to ...
1186 * elf-ifunc.c: Here. New.
1187
1188 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1189 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1190 Run "make dep-am".
1191
81694485
NC
11922009-06-16 Doug Kwan <dougkwan@google.com>
1193
6de2ae4a
L
1194 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1195 to bfd_signed_vma. Cast constant operands which are used in
1196 offset related expressions to bfd_signed_vma type as appropriate.
81694485 1197
6db7e006
MR
11982009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1199
1200 * elf32-vax.c (elf_vax_plt_sym_val): New function.
1201 (elf_backend_plt_sym_val): Define.
1202
9b90d8fd
MR
12032009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1204
1205 * elf32-vax.c (elf_vax_reloc_type_class): New function.
1206 (elf_backend_reloc_type_class): Define.
1207
04981bc1
MR
12082009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1209
1210 * elf32-vax.c (elf_vax_relocate_section): For symbol references
1211 from an executable to a shared library treat R_VAX_PC32
1212 relocations as R_VAX_PLT32 ones.
1213
886815b2
MR
12142009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1215
1216 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1217 symbols in GOT space calculation.
1218 (elf_vax_relocate_section): Adjust accordingly.
1219
6c4fb25a
MR
12202009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1221
1222 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1223 include <R11:R2>.
1224
7b6021f1
MR
12252009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1226
1227 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1228 attribute.
1229 (elf_vax_relocate_section): Likewise.
1230
188dbb07
L
12312009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1232
1233 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1234 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1235
048cbda4
L
12362009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1237
1238 * elf32-i386.c (elf_i386_check_relocs): Reformat.
1239 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1240
482c6ce9
L
12412009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1242
1243 * Makefile.am: Run "make dep-am".
1244 * Makefile.in: Regenerated.
1245
eba077f2
L
12462009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1247
1248 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1249 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1250
ec68b083
NC
12512009-06-15 Nick Clifton <nickc@redhat.com>
1252
1253 * po/ru.po: New Russian translation.
1254 * configure.in (ALL_LINGUAS): Add ru.
1255 * configure: Regenerate.
1256
b80ee1aa
L
12572009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1258
1259 * elf32-i386.c: Remove duplicated comments.
1260
44c4ea11
L
12612009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1262
1263 PR ld/10270
1264 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1265 dynamic IFUNC pointer in non-shared object. Use .got.plt
1266 for IFUNC definition in PIE.
1267 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1268 PIE locally.
1269
1270 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1271 dynamic IFUNC pointer in non-shared object. Use .got.plt
1272 for IFUNC definition in PIE.
1273 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1274 PIE locally.
1275
8b7e2992
L
12762009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1277
1278 * elf32-i386.c (elf_i386_check_relocs): Properly report
1279 local symbol for unhandled relocation against STT_GNU_IFUNC
1280 symbol.
637fa7af 1281 (elf_i386_relocate_section): Likewise.
8b7e2992 1282 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 1283 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 1284
c25bc9fc
L
12852009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1286
1287 PR ld/10269
1288 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1289 (elf_i386_link_hash_table): Add loc_hash_table and
1290 loc_hash_memory.
1291 (elf_i386_local_hash): New.
1292 (elf_i386_local_htab_hash): Likewise.
1293 (elf_i386_local_htab_eq): Likewise.
1294 (elf_i386_get_local_sym_hash): Likewise.
1295 (elf_i386_link_hash_table_free): Likewise.
1296 (elf_i386_allocate_local_dynrelocs): Likewise.
1297 (elf_i386_finish_local_dynamic_symbol): Likewise.
1298 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1299 (elf_i386_link_hash_table_create): Create loc_hash_table and
1300 loc_hash_memory.
1301 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1302 (elf_i386_size_dynamic_sections): Likewise.
1303 (elf_i386_relocate_section): Likewise.
1304 (elf_i386_finish_dynamic_sections): Likewise.
1305 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1306 isn't NULL.
1307
1308 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1309 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1310 loc_hash_memory.
1311 (elf64_x86_64_local_hash): New.
1312 (elf64_x86_64_local_htab_hash): Likewise.
1313 (elf64_x86_64_local_htab_eq): Likewise.
1314 (elf64_x86_64_get_local_sym_hash): Likewise.
1315 (elf64_x86_64_link_hash_table_free): Likewise.
1316 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1317 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1318 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1319 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1320 and loc_hash_memory.
1321 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1322 symbols.
1323 (elf64_x86_64_size_dynamic_sections): Likewise.
1324 (elf64_x86_64_relocate_section): Likewise.
1325 (elf64_x86_64_finish_dynamic_sections): Likewise.
1326 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1327 sym isn't NULL.
1328
dec9d5df
PB
13292009-06-10 Philip Blundell <philb@gnu.org>
1330
1331 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1332 elf_sec->this_hdr == NULL.
1333
92bc0e80
TG
13342009-06-12 Tristan Gingold <gingold@adacore.com>
1335
1336 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1337 * bfd-in2.h: Regenerated.
1338 * libbfd.h: Regenerated.
1339
1340 * mach-o.c (FILE_ALIGN): New macro.
1341 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1342 (bfd_mach_o_print_symbol): Ditto.
1343 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1344 (bfd_mach_o_get_reloc_upper_bound): New function.
1345 (bfd_mach_o_canonicalize_reloc): Ditto.
1346 (bfd_mach_o_scan_write_relocs): Ditto.
1347 (bfd_mach_o_scan_write_section_32): Remove offset argument.
1348 (bfd_mach_o_scan_write_section_64): Ditto.
1349 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
1350 written for load command. Do not compute section file offset.
1351 (bfd_mach_o_scan_write_segment_64): Ditto.
1352 (bfd_mach_o_scan_write_symtab): Compute file offset first.
1353 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
1354 Mach-O to ...
1355 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 1356 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
1357 Call bfd_mach_o_mangle_symbols.
1358 (bfd_mach_o_build_commands): Adjust for filelen field.
1359 Use FILE_ALIGN macro. Clear section file offset if section is empty.
1360 Do not set symtab file offset anymore here.
1361 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1362 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1363 Set reloc_count and rel_filepos section fields.
1364 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1365 unsigned int.
1366 (bfd_mach_o_scan_read_section_64): Ditto.
1367 (bfd_mach_o_scan_read_section): Ditto.
1368 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1369 bfd_mach_o_asymbol. Use unsigned int for file offset type.
1370 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1371 Handle weak-ref symbols.
1372 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1373 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1374 (bfd_mach_o_scan): Remove assignment to removed field.
1375 (bfd_mach_o_mkobject_init): Ditto.
1376 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1377 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1378 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1379 (bfd_mach_o_swap_reloc_in): Ditto.
1380 (bfd_mach_o_swap_reloc_out): Ditto.
1381
1382 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1383 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1384 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1385 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1386 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1387 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1388 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1389 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1390 (BFD_MACH_O_N_WEAK_DEF): New macros.
1391 Add comments.
1392 (bfd_mach_o_section_type): Add new enumeration values.
1393 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1394 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1395 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1396 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1397 macros.
1398 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1399 (BFD_MACH_O_GENERIC_RELOC_PAIR)
1400 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1401 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1402 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1403 (BFD_MACH_O_RELENT_SIZE): Ditto.
1404 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1405 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1406 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1407 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1408 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1409 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1410 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1411 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1412 (bfd_mach_o_reloc_info): New struct.
1413 (bfd_mach_o_asymbol): New struct.
1414 (bfd_mach_o_symtab_command): The symbols field is now of type
1415 bfd_mach_o_asymbol.
1416 (bfd_mach_o_load_command): The offset and len fields are now of type
1417 unsigned int.
1418 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1419 Add a filelen field. Add comments.
1420 (bfd_mach_o_backend_data): New struct.
1421 (bfd_mach_o_get_backend_data): New macro.
1422 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1423 bfd_mach_o_asymbol.
1424 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1425 (bfd_mach_o_get_reloc_upper_bound): New prototype.
1426 (bfd_mach_o_canonicalize_reloc): Ditto.
1427
1428 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1429 duplicated macro. Now defined to _bfd_generic_is_local_label.
1430 (TARGET_NAME_BACKEND): New macro...
1431 (TARGET_NAME_BACKEND): ... used to name a new variable.
1432 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1433 Mach-O backend data.
1434
1435 * mach-o-i386.c (i386_howto_table): New variable.
1436 (bfd_mach_o_i386_swap_reloc_in): New function.
1437 (bfd_mach_o_i386_swap_reloc_out): Ditto.
1438 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1439 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1440 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1441 (bfd_mach_o_bfd_reloc_type_lookup)
1442 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1443
8c7d38e8
NC
14442009-06-11 Eric Paris <eparis@redhat.com>
1445 Nick Clifton <nickc@redhat.com>
1446
1447 * opncls.c (_maybe_make_executable): New function. Gives execute
1448 permission to an executable bfd that was opened for writing
1449 provided that it is a regular file. Replaces common code found in...
1450 (bfd_close): here and ...
1451 (bfd_close_all_done): here.
1452
f865a31d
AG
14532009-06-11 Anthony Green <green@moxielogic.com>
1454
1455 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1456 * bfd-in2.h: Rebuilt.
1457 * libbfd.h: Rebuilt.
1458 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1459 relocation support.
1460 (moxie_reloc_map): Ditto.
1461 Clean up copyright notice.
1462
25b88f33
PP
14632009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1464
1372b818 1465 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
1466 * bfdio.c (bfd_mmap): New function.
1467 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 1468 * cache.c (cache_bmmap): New function.
25b88f33
PP
1469 (cache_iovec): Initialize bmmap member.
1470 * opencls.c (opncls_bmmap): New function.
1471 (opncls_iovec): Initialize bmmap member.
1472
c2f09c75
TG
14732009-06-09 Tristan Gingold <gingold@adacore.com>
1474
1475 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1476 and stabstr_segment fields.
1477 (mach_o_be_vec, mach_o_le_vec): Removed
1478 (bfd_mach_o_version): New prototype.
1479
1480 * mach-o.c (bfd_mach_o_version): Make this function public.
1481 (mach_o_wide_p): New function.
1482 (bfd_mach_o_wide_p): Ditto.
1483 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1484 weird names.
1485 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1486 Search in the list only if the name starts with a dot.
1487 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1488 test. Check bfd_seek status.
1489 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1490 (bfd_mach_o_scan_write_section_32): Ditto.
1491 (bfd_mach_o_scan_write_section_64): Ditto.
1492 (bfd_mach_o_scan_write_section): Removed.
1493 (bfd_mach_o_scan_write_segment): Split into ...
1494 (bfd_mach_o_scan_write_segment_32): ... this and ...
1495 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
1496 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1497 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
1498 symbol table. Now returns a boolean.
1499 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
1500 Adjust for status type.
1501 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1502 test. Write symbol table. Numbers the sections.
1503 (bfd_mach_o_read_header): Check bfd_seek status.
1504 Use mach_o_wide_p instead of hard-coded test.
1505 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1506 (bfd_mach_o_scan_read_section_64): Ditto.
1507 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
1508 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
1509 handled common symbols.
1510 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1511 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1512 (bfd_mach_o_scan_read_dylinker): Ditto.
1513 (bfd_mach_o_scan_read_dylib): Ditto.
1514 (bfd_mach_o_scan_read_thread): Ditto.
1515 (bfd_mach_o_scan_read_symtab): Ditto.
1516 Do not create a section for the stabs.
1517 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1518 (bfd_mach_o_scan_read_segment): Ditto.
1519 (bfd_mach_o_scan_read_command): Ditto.
1520 (bfd_mach_o_scan_start_address): Ditto.
1521 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1522 (bfd_mach_o_archive_p): Check bfd_seek status.
1523 (bfd_mach_o_core_fetch_environment): Ditto.
1524
1525 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1526
2a81c24a
L
15272009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1528
1529 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1530 (elf_i386_link_hash_table_create): Initialize irelifunc.
1531 (elf_i386_check_relocs): Updated. Set up irelifunc for
1532 shared objects.
1533 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1534 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1535 shared objects.
1536 (elf_i386_relocate_section): Likewise.
1537
1538 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1539 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1540 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1541 shared objects.
1542 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1543 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1544 shared objects.
1545 (elf64_x86_64_relocate_section): Likewise.
1546
1547 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1548 ...
1549 (_bfd_elf_create_ifunc_sections): This.
1550
c2f09c75 1551 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
1552 ...
1553 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1554 for shared objects.
1555
710ab287
L
15562009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1559 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1560 building shared object. Check info->executable instead of
1561 !info->shared when setting non_got_ref.
1562 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1563 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1564 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1565 symbol if needed.
1566 (elf_i386_relocate_section): Output dynamic relocation for
1567 R_386_32 against STT_GNU_IFUNC symbol to get the real
1568 function address when building shared object.
1569 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1570 relocation for STT_GNU_IFUNC symbol in shared object.
1571
1572 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1573 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1574 symbol when building shared object. Check info->executable
1575 instead of !info->shared when setting non_got_ref.
1576 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1577 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1578 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1579 if needed.
1580 (elf64_x86_64_relocate_section): Output dynamic relocation
1581 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1582 function address when building shared object.
1583 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1584 relocation for STT_GNU_IFUNC symbol in shared object.
1585
9e93c730
JK
15862009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1587
1588 * Makefile.am: Run "make dep-am".
1589 (BFD32_BACKENDS): Add mach-o-i386.lo.
1590 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1591 * Makefile.in: Regenerate.
1592
74681fc4
AM
15932009-06-06 Alan Modra <amodra@bigpond.net.au>
1594
1595 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1596 when looking for soft-icache stubs.
1597
154a1ee5
TG
15982009-06-05 Tristan Gingold <gingold@adacore.com>
1599
1600 * mach-o.h: Update copyright year.
1601 (bfd_mach_o_mach_header_magic): New enum.
1602 (bfd_mach_o_cpu_subtype): Now an enum.
1603 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1604 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1605 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1606 (bfd_mach_o_load_command): Field type_required is now a boolean.
1607 Reindent prototypes.
1608 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1609 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1610 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1611 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1612 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1613 (bfd_mach_o_canonicalize_symtab): Ditto.
1614 (bfd_mach_o_get_symbol_info): Ditto.
1615 (bfd_mach_o_print_symbol): Ditto.
1616 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1617 (bfd_mach_o_make_empty_symbol): Ditto.
1618 (bfd_mach_o_write_contents): Ditto.
1619
1620 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1621 bfd_mach_o_mkobject): Defines.
1622 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1623 Do not check with target vector but with flavour.
1624 (struct mach_o_section_name_xlat): New declaration.
1625 (dwarf_section_names_xlat): Ditto.
1626 (text_section_names_xlat): Ditto.
1627 (data_section_names_xlat): Ditto.
1628 (struct mach_o_segment_name_xlat): Ditto.
1629 (segsec_names_xlat): Ditto.
1630 (bfd_mach_o_convert_section_name_to_bfd): New function.
1631 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1632 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1633 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1634 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1635 Accept any input and output flavour. Do not share private data
1636 anymore.
1637 (bfd_mach_o_count_symbols): Add a comment.
1638 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1639 (bfd_mach_o_canonicalize_symtab): Ditto.
1640 (bfd_mach_o_get_symbol_info): Ditto.
1641 (bfd_mach_o_print_symbol): Ditto.
1642 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1643 Use constants instead of hard-coded values.
1644 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1645 values.
1646 (bfd_mach_o_scan_write_section_64): Ditto.
1647 (bfd_mach_o_scan_write_segment): Ditto.
1648 Do not copy sections anymore.
1649 (bfd_mach_o_write_contents): Make it public.
1650 Remove dead code. Rewrite typeflag assignment.
1651 (bfd_mach_o_build_commands): New function.
1652 (bfd_mach_o_set_section_contents): Ditto.
1653 (bfd_mach_o_make_empty_symbol): Make it public.
1654 (bfd_mach_o_read_header): Make it static.
1655 Convert to bfd_boolean.
1656 Use constants instead of hard-coded values.
1657 (bfd_mach_o_make_bfd_section): Call
1658 bfd_mach_o_convert_section_name_to_bfd to create name.
1659 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1660 values.
1661 (bfd_mach_o_scan_read_section_64): Ditto.
1662 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1663 a segment anymore. Use constants instead of hard-coded values.
1664 (bfd_mach_o_scan_read_command): Fix style.
1665 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1666 Get rid of BFD_IO_FUNCS.
1667 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1668 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1669 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1670 (bfd_mach_o_object_p): Removed.
1671 (bfd_mach_o_gen_core_p): New function, replaces ...
1672 (bfd_mach_o_core_p): ... deleted.
1673 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1674
1675 * mach-o-i386.c: New file.
1676 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1677 * configure.in (TDEFINES): Add mach_o_i386_vec.
1678 * configure: Regenerated.
1679 * targets.c: Add mach_o_i386_vec.
1680
1681 * mach-o.c: Update copyright years.
1682 (BFD_IO_FUNCS): Remove (was not used).
1683 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1684 bfd_mach_o_slurp_extended_name_table,
1685 bfd_mach_o_construct_extended_name_table,
1686 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1687 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1688 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1689 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1690 bfd_mach_o_get_section_contents_in_window,
1691 bfd_mach_o_bfd_is_local_label_name,
1692 bfd_mach_o_bfd_is_target_special_symbol,
1693 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1694 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1695 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1696 bfd_mach_o_minisymbol_to_symbol,
1697 bfd_mach_o_bfd_get_relocated_section_contents,
1698 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1699 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1700 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1701 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1702 bfd_mach_o_bfd_merge_private_bfd_data,
1703 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1704 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1705 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1706 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1707 bfd_mach_o_bfd_copy_private_header_data,
1708 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1709 * mach-o-target.c: ... here.
1710 Update copyright years.
1711
a1ef399e
AM
17122009-06-04 Alan Modra <amodra@bigpond.net.au>
1713
1714 * dep-in.sed: Don't use \n in replacement part of s command.
1715 * Makefile.am (DEP1): LC_ALL for uniq.
1716 Run "make dep-am".
1717 * Makefile.in: Regenerate.
1718
2e75bb35
L
17192009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1720
1721 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1722 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1723 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1724
0018b0a3
L
17252009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1726
1727 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1728 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1729 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1730 against STT_GNU_IFUNC symbols for static executables.
1731 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1732 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1733
1734 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1735 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1736 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1737 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1738
94313f36
RS
17392009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1740
1741 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1742 symbols to be left unimported when linking statically.
1743 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1744 code when linking statically.
1745
7afd84dc
L
17462009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1747
1748 * elf32-i386.c (elf_i386_check_relocs): Increment
1749 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1750 against STT_GNU_IFUNC symbol.
1751 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1752 local STT_GNU_IFUNC definition is used.
1753 (elf_i386_relocate_section): Handle got.offset != -1 for
1754 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1755 symbol.
1756
1757 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1758 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1759 relocations against STT_GNU_IFUNC symbol.
1760 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
1761 local STT_GNU_IFUNC definition is used.
1762 (elf64_x86_64_relocate_section): Handle got.offset != -1
1763 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
1764 STT_GNU_IFUNC symbol.
1765
cbe950e9
L
17662009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1767
1768 PR ld/10205
1769 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
1770 (elf_i386_reloc_type_lookup): Likewise.
1771 (R_386_tls): Removed.
1772 (R_386_irelative): New.
1773 (R_386_vt_offset): Updated.
1774 (elf_i386_rtype_to_howto): Likewise.
1775 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
1776 (elf_i386_link_hash_table_create): Initialize igotplt,
1777 iplt and irelplt.
1778 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
1779 (elf_i386_adjust_dynamic_symbol): Likewise.
1780 (elf_i386_allocate_dynrelocs): Likewise.
1781 (elf_i386_relocate_section): Likewise.
1782 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
1783 sections.
1784 (elf_i386_finish_dynamic_symbol): When building a static
1785 executable, use .iplt, .igot.plt and .rel.iplt sections for
1786 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
1787 locally defined STT_GNU_IFUNC symbol.
1788
1789 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
1790 (x86_64_reloc_map): Likewise.
1791 (R_X86_64_standard): Updated.
1792 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
1793 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
1794 iplt and irelplt.
1795 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
1796 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1797 (elf64_x86_64_allocate_dynrelocs): Likewise.
1798 (elf64_x86_64_relocate_section): Likewise.
1799 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
1800 sections.
1801 (elf64_x86_64_finish_dynamic_symbol): When building a static
1802 executable, use .iplt, .igot.plt and .rela.iplt sections for
1803 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
1804 for locally defined STT_GNU_IFUNC symbol.
1805
1806 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
1807 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
1808
1809 * bfd-in2.h: Regenerated.
1810 * libbfd.h: Likewise.
1811
3aa14d16
L
18122009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1813
1814 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
1815 (_bfd_elf_make_ifunc_reloc_section): Removed.
1816 (_bfd_elf_is_ifunc_symbol): Likewise.
1817 (_bfd_elf_create_static_ifunc_sections): New.
1818
1819 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
1820 symbol check to ...
1821 (elf_link_add_object_symbols): Here.
1822 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
1823 STT_GNU_IFUNC symbol.
1824 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
1825 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
1826 (IFUNC_INFIX): Removed.
1827 (get_ifunc_reloc_section_name): Likewise.
1828 (_bfd_elf_make_ifunc_reloc_section): Likewise.
1829 (_bfd_elf_is_ifunc_symbol): Likewise.
1830 (_bfd_elf_create_static_ifunc_sections): New.
1831
eb4ff4d6
L
18322009-05-29 H.J. Lu <hongjiu.lu@intel.com>
1833
1834 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
1835 (create_got_section): Likewise.
1836 (allocate_dynrelocs): Likewise.
1837 (readonly_dynrelocs): Likewise.
1838 (set_tls_module_base): Likewise.
1839 (dtpoff_base): Likewise.
1840 (tpoff): Likewise.
1841 (elf_i386_link_hash_table_create): Updated.
1842 (elf_i386_create_dynamic_sections): Likewise.
1843 (elf_i386_check_relocs): Likewise.
1844 (elf_i386_size_dynamic_sections): Likewise.
1845 (elf_i386_relocate_section): Likewise.
1846
1847 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
1848 (create_got_section): Likewise.
1849 (allocate_dynrelocs): Likewise.
1850 (readonly_dynrelocs): Likewise.
1851 (set_tls_module_base): Likewise.
1852 (dtpoff_base): Likewise.
1853 (tpoff): Likewise.
1854 (elf64_x86_64_link_hash_table_create): Updated.
1855 (elf64_x86_64_create_dynamic_sections): Likewise.
1856 (elf64_x86_64_check_relocs): Likewise.
1857 (elf64_x86_64_size_dynamic_sections): Likewise.
1858 (elf64_x86_64_relocate_section): Likewise.
1859
fc579192
NC
18602009-05-28 Nick Clifton <nickc@redhat.com>
1861
1862 * targets.c (_bfd_target_vector): Only include plugin target in
1863 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
1864
5ebe2858
UW
18652009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1866
1867 * elf32-spu.c (struct call_info): New member broken_cycle.
1868 (remove_cycle): Instead of physically removing call_info structures
1869 to break call graph cycles, mark them using the broken_cycle flag.
1870 (mark_overlay_section): Respect broken_cycle flag.
1871 (unmark_overlay_section): Likewise.
1872 (collect_lib_sections): Likewise.
1873 (collect_overlays): Likewise.
1874 (sum_stack): Likewise.
1875
34ad4cb0
UW
18762009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1877
1878 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
1879 (mark_functions_via_relocs): Initialize callee->count to 1.
1880 (pasted_function): Likewise.
1881 (spu_elf_auto_overlay): Honor call counts when determining number
1882 of stubs required in software i-cache mode.
1883
fc579192
NC
18842009-05-27 Rafael Avila de Espindola <espindola@google.com>
1885
1886 * plugin.c (program_name): Remove.
1887 (plugin_program_name): New.
1888 (bfd_plugin_set_program_name): New.
1889 (try_load_plugin): Use plugin_program_name.
1890 * plugin.h (bfd_plugin_set_program_name): New.
1891
18922009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
1893
1894 * aclocal.m4: Include ../config/plugins.m4.
1895 * configure.in: Use AC_PLUGINS.
1896 * configure: Regenerate.
1897 * Makefile.in: Regenerate.
1898 * doc/Makefile.in: Regenerate.
1899
c8a1f254
NS
19002009-05-27 Nathan Sidwell <nathan@codesourcery.com>
1901
1902 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
1903 link.
1904 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
1905 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
1906 * elf32-avr.c (elf32_avr_relax_section): Likewise.
1907 * elf32-frv.c (elf32_avr_relax_section): Likewise.
1908 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
1909 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1910 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1911 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
1912 * reloc.c (bfd_generic_relax_section): Likewise.
1913 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
1914 * vms.c (vms_bfd_relax_section): Likewise.
1915
68d7e96a
L
19162009-05-26 H.J. Lu <hongjiu.lu@intel.com>
1917
1918 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
1919
1920 * elf32-i386.c (is_indirect_symbol): Renamed to ...
1921 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
1922
1923 * elf32-i386.c (allocate_dynrelocs): Updated.
1924 (elf_i386_relocate_section): Likewise.
1925 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1926 (elf64_x86_64_relocate_section): Likewise.
1927
1928 * elf64-x86-64.c (is_indirect_symbol): Removed.
1929
f12e7348
NC
19302009-05-26 Nick Clifton <nickc@redhat.com>
1931
1932 * po/id.po: Updated Indonesian translation.
1933
ce3c775b
NC
19342009-05-26 Rafael Avila de Espindola <espindola@google.com>
1935
1936 * Makefile.am: Run "make dep-am".
1937 (AM_CPPFLAGS): New.
1938 (LIBDL): New.
1939 (ALL_MACHINES): Add cpu-plugin.lo.
1940 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
1941 (BFD32_BACKENDS): Add plugin.lo.
1942 (BFD32_BACKENDS_CFILES): Add plugin.c.
1943 (libbfd_la_LIBADD): Add LIBDL
1944 * archures.c (bfd_architecture): Add bfd_arch_plugin.
1945 (bfd_plugin_arch): Declare.
1946 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
1947 * bfd.c (bfd): Add plugin_data.
1948 * config.bfd: Handle the plugin target.
1949 * configure.in: Check for --enable-plugins.
1950 (LT_INIT): Use the dlopen option.
1951 * cpu-plugin.c: New.
1952 * plugin.c: New.
1953 * plugin.h: New.
1954 * targets.c (plugin_vec): Declare.
1955 (_bfd_target_vector): Add plugin_vec.
1956 * Makefile.in: Regenerate.
1957 * bfd-in2.h: Regenerate.
1958 * configure: Regenerate.
1959
9e097a72
AM
19602009-05-26 Alan Modra <amodra@bigpond.net.au>
1961
1962 * dep-in.sed: Don't modify .o to .lo here. Output one filename
1963 per line with all lines having continuation backslash. Prefix
1964 first line with "A", following lines with "B".
1965 * Makefile.am (DEP): Don't use dep.sed here.
1966 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
1967 dep.sed here on dependencies, sort and uniq.
1968 * Makefile.in: Regenerate.
1969
d5acff2f
TG
19702009-05-25 Tristan Gingold <gingold@adacore.com>
1971
1972 * makefile.vms: Add verilog.obj to object list OBJS.
1973
5c93f09b
AM
19742009-05-24 Alan Modra <amodra@bigpond.net.au>
1975
1976 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
1977 for BFD_IN_MEMORY is cleared.
1978 (bfd_bwrite): Zero excess memory allocated.
1979
48229727
JB
19802009-05-22 Julian Brown <julian@codesourcery.com>
1981
1982 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
1983 macros.
1984 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
1985 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
1986 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
1987 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
1988 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
1989 (a8_erratum_fix, a8_erratum_reloc): New structs.
1990 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
1991 num_a8_erratum_fixes, fix_cortex_a8 fields.
1992 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
1993 (elf32_arm_add_stub): Split into two parts, creating...
1994 (elf32_arm_create_or_find_stub_sec): New function.
1995 (elf32_arm_final_link_relocate): Add forward declaration.
1996 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
1997 relocations, multiple relocations per stub.
1998 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
1999 (arm_size_one_stub): Use find_stub_size_and_template.
2000 (a8_reloc_compare): New.
2001 (find_thumb_glue): Add forward declaration.
2002 (cortex_a8_erratum_scan): New.
2003 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2004 (bfd_elf32_arm_set_cortex_a8_fix): New.
2005 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2006 (arm_map_one_stub): Add THUMB32_TYPE support.
2007 (a8_branch_to_stub_data): New.
2008 (make_branch_to_a8_stub): New.
2009 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2010 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2011 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2012 Cortex-A8 erratum workaround.
2013 * bfd-in2.h: Regenerate.
2014
2b3decb5
AM
20152009-05-22 Alan Modra <amodra@bigpond.net.au>
2016
2017 * Makefile.am: Run "make dep-am".
2018 * Makefile.in: Regenerate.
2019 * po/SRC-POTFILES.in: Regenerate.
2020
930e005c
AM
20212009-05-21 Alan Modra <amodra@bigpond.net.au>
2022
2023 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2024 commit.
2025
6e0b88f1
AM
20262009-05-21 Alan Modra <amodra@bigpond.net.au>
2027
2028 * elf-bfd.h (struct elf_backend_data
2029 <elf_backend_link_output_symbol_hook>): Return an int.
2030 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2031 symbols on deleted .opd entries.
2032 * elflink.c (elf_link_output_sym): Return without outputting sym
2033 if output_symbol_hook returns 2.
2034 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2035 Abort if we must not discard sym.
2036 (elf_link_input_bfd): Similarly, don't set finfo->indices for
2037 local syms.
2038 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2039 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2040 elf_backend_link_output_symbol_hook return type change.
2041 * elf32-arm.c (output_arch_syminfo): Likewise.
2042 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2043 (elf32_arm_output_arch_local_syms): Likewise.
2044 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2045 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2046 (bfd_score_elf_link_output_symbol_hook): Likewise.
2047 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2048 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2049 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2050 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2051 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2052 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2053 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2054 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2055 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2056 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2057 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2058
5ef11c02
AM
20592009-05-21 Alan Modra <amodra@bigpond.net.au>
2060
2061 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2062 out of range .opd symbols.
2063
ebf12fbe
DK
20642009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
2065
2066 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
2067 fprintf_vma directly.
2068 * peXXigen.c (pe_print_edata): Likewise.
2069 (pe_print_pdata): Likewise.
2070 (_bfd_XX_print_ce_compressed_pdata): Likewise.
2071 (_bfd_XX_print_private_bfd_data_common): Likewise.
2072
c1711530
DK
20732009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
2074
2075 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
2076
22a8f80e 20772009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 2078 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
2079
2080 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2081 fix discarded sections.
2082
335bd8f2
UW
20832009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2084
2085 * elf32-spu.c (mark_overlay_section): Move .init and .fini
2086 sections into the software icache.
2087
cdc83fba
UW
20882009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2089
2090 * elf32-spu.c (build_stub): Always build "compact" sofware
2091 i-cache stubs.
2092
97fc8d84
UW
20932009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2094
2095 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2096 (spu_elf_setup): Initialize it.
2097 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2098 Update to new-sytle cache manager data structures.
2099 (spu_elf_build_stubs): Generate new-style cache manager data
2100 structures and symbols.
2101 (spu_elf_auto_overlay): Update size computation.
2102
452de53c
UW
21032009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2104
2105 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2106 segments first amongst the program headers.
2107
d342a8b1
UW
21082009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2109
2110 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2111 into addresses for relocation types that look at high bits. Remove
2112 special handling of relocation overflow warnings.
2113
cc210763
UW
21142009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2115
2116 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2117 control flow graph between fragments of a function.
2118
c1ea05bb
UW
21192009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2120
2121 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2122 generate only a 16-byte .toe section.
2123 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2124
bbb0fc04
AM
21252009-05-14 Alan Modra <amodra@bigpond.net.au>
2126
2127 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2128 (spu_elf_place_overlay_data): ..here. New function.
2129 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2130
6e6718a3
AJ
21312009-05-13 Andrew Jenner <andrew@codesourcery.com>
2132
2133 * elf32-arm.c: Move sysdep.h to start of file.
2134
77ae44b0
AM
21352009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
2136
2137 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2138 start of overlays.
2139 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
2140 __icache_tag_array and __icache_tag_array_size.
2141
51408ec2
AM
21422009-05-11 Masaki Muranaka <monaka@monami-software.com>
2143
2144 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2145 ATTRIBUTE_UNUSED.
2146 (bfinfdpic_link_omit_section_dynsym): Likewise.
2147 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2148
2468f9c9
PB
21492009-05-05 Paul Brook <paul@codesourcery.com>
2150
2151 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2152 * bfd-in2.h: Regenerate.
2153 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2154 (_arm_elf_section_data): Add text and exidx fields.
2155 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2156 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2157 copy_exidx_entry): New functions.
2158 (elf32_arm_write_section): Fixup .ARM.exidx contents.
2159
738a79f6
CL
21602009-05-05 Christophe lyon <christophe.lyon@st.com>
2161
2162 * elf32-arm.c (DEF_STUBS): New helper define.
2163 (DEF_STUB): Likewise.
2164 (stub_def): New type.
2165 (stub_definitions): New array, containing stub template pointers
2166 and sizes.
2167 (arm_size_one_stub): Make use of stub_definitions.
2168
09e2aba4
DK
21692009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
2170
2171 * elflink.c (find_version_for_sym): Remove from here, ...
2172 * linker.c (bfd_find_version_for_sym): ... rename, replace
2173 here, make public and update all callers.
2174 * bfd-in2.h: Regenerate.
2175
d8045f23
NC
21762009-04-30 Nick Clifton <nickc@redhat.com>
2177
2178 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2179 section pointer.
2180 (struct elf_obj_data): Add has_ifunc_symbols boolean.
2181 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2182 into a STT_GNU_IFUNC symbol type.
2183 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2184 type.
2185 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2186 the binary contains ifunc symbols.
2187 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2188 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2189 * elf32-i386.c (is_indirect_function): New function.
2190 (elf_i386_check_relocs): Create an ifunc output section.
2191 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2192 section if necessary.
2193 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2194 if necessary.
2195 (elf_i386_add_symbol_hook): New function. Set the
2196 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2197 symbol is encountered.
2198 (elf_backend_post_process_headers): Define.
2199 (elf_backend_add_symbol_hook): Define.
2200 (elf_i386_post_process_headers): Rename to
2201 elf_i388_fbsd_post_process_headers.
2202 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2203 (is_indirect_function): New function.
2204 (elf64_x86_64_check_relocs): Create an ifunc output section.
2205 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2206 section if necessary.
2207 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2208 symbol if necessary.
2209 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2210 elf_obj_data structure if an ifunc symbol is encountered.
2211 (elf_backend_post_process_headers): Define.
2212 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2213 if we have ifunc symbols to handle.
2214 (get_ifunc_reloc_section_name): New function. Computes the name
2215 for an ifunc section.
2216 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
2217 section to hold ifunc relocs.
2218 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2219 (bfd_print_symbol_vandf): Handle ifunc symbols.
2220 (bfd_decode_symclass): Likewise.
2221 * bfd-in2.h: Regenerate.
2222
96c23d59
JM
22232009-04-30 Joseph Myers <joseph@codesourcery.com>
2224
2225 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2226 MOVW and MOVT relocations in a shared library link.
2227
c067354b
NC
22282009-04-27 Anthony Green <green@moxielogic.com>
2229
2230 * verilog.c: New file.
2231 * Makefile.am (BFD32_LIBS): Add verilog.c.
2232 (BFD32_LIBS_CFILES): Add verilog.c.
2233 (verilog.lo): New build rule.
2234 * Makefile.in: Rebuilt.
2235 * targets.c: Add verilog support.
2236 * bfd.c (tdata union): Add Verilog private data field.
2237 * bfd-in2.h: Regenerate.
2238
325c681d
L
22392009-04-27 H.J. Lu <hongjiu.lu@intel.com>
2240
2241 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2242 copy pe_opthdr.
2243
ba775898
DK
22442009-04-23 Matthias Klose <doko@ubuntu.com>
2245
2e28a5fc 2246 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 2247
155d87d7
CL
22482009-04-22 Christophe Lyon <christophe.lyon@st.com>
2249
2250 PR9743
2251 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2252 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2253 (elf32_arm_size_stubs): Likewise.
2254 (record_thumb_to_arm_glue): Deleted unused function.
2255 (bfd_elf32_arm_process_before_allocation): No longer handle
2256 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2257 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2258 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2259
3e6b1042
DJ
22602009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
2261
2262 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2263 (elf32_arm_write_section): Declare early.
2264 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2265 (arm_allocate_glue_section_space): Exclude empty sections.
2266 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2267 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2268 BFD.
2269 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2270 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2271 (elf32_arm_size_dynamic_sections): Allocate interworking
2272 sections here.
2273 (bfd_elf32_bfd_final_link): Define.
2274
4f360784
L
22752009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2276
2277 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 2278
4f360784
L
2279 * coffcode.h (coff_compute_section_file_positions): Clear
2280 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2281
2282 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2283 force_minimum_alignment.
2284
2285 * libcoff.h: Regenerated.
2286
2287 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2288 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2289
2290 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2291 nor target_subsystem.
2292
2293 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2294 force_minimum_alignment nor target_subsystem.
2295
e48570bb
DK
22962009-04-21 Kai Tietz <kai.tietz@onevision.com>
2297
2298 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2299 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2300 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2301 include in coff-x86_64.c of headers.
2302 (PDATA_ROW_SIZE): New define.
2303 (pex_regs[]): New static array.
2304 (pex64_get_runtime_function): New static function.
2305 (pex64_get_unwind_info): Likewise.
2306 (pex64_get_scope_entry): Likewise.
2307 (pex64_xdata_print_uwd_codes): Likewise.
2308 (pex64_get_section_by_rva): Likewise.
2309 (pex64_dump_xdata): Likewise.
2310 (pex64_bfd_print_pdata): Likewise.
2311 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2312 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2313 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2314
383c383f 23152009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
2316 Alan Modra <amodra@bigpond.net.au>
2317 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
2318
2319 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2320 long names and non-NUL-terminated strings.
2321
b6b450f1
L
23222009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2323
2324 * bfd-in2.h: Regenerated.
2325
d9118602
L
23262009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2327
2328 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2329 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2330
92dd4511
L
23312009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2332
2333 PR binutils/10074
2334 * coffcode.h (bfd_pei_p): New.
2335
2336 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2337 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2338 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2339 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
2340 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2341 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2342
2343 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2344 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2345 bfd_efi_rtdrv_x86_64_vec,
2346 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
2347 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2348 * targets.c: Likewise.
2349
2350 * configure: Regenerated.
2351 * libcoff.h: Likewise.
2352 * Makefile.in: Likewise.
2353
2354 * efi-app-ia32.c: Removed.
2355 * efi-app-x86_64.c: Likewise.
2356 * efi-bsdrv-ia32.c: Likewise.
2357 * efi-bsdrv-ia64.c: Likewise.
2358 * efi-bsdrv-x86_64.c: Likewise.
2359 * efi-rtdrv-ia32.c: Likewise.
2360 * efi-rtdrv-ia64.c: Likewise.
2361 * efi-rtdrv-x86_64.c: Likewise.
2362 * efi-rtdrv-ia32.c: Likewise.
2363
2364 * efi-app-ia64.c: Moved to ...
2365 * pei-ia64.c: This.
2366 (TARGET_SYM): Set to bfd_pei_ia64_vec.
2367 (TARGET_NAME): Set to pei-ia64.
2368
2369 * libpei.h (bfd_target_pei_p): Removed.
2370 (bfd_target_pei_arch): Likewise.
2371 (bfd_target_efi_app_p): Likewise.
2372 (bfd_target_efi_app_arch): Likewise.
2373 (bfd_target_efi_bsdrv_p): Likewise.
2374 (bfd_target_efi_bsdrv_arch): Likewise.
2375 (bfd_target_efi_rtdrv_p): Likewise.
2376 (bfd_target_efi_rtdrv_arch): Likewise.
2377 (bfd_pe_executable_p): Likewise.
2378
2379 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2380 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2381 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2382 and efi-rtdrv-ia32.c.
2383 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2384 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2385 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2386 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2387 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2388 efi-rtdrv-x86_64.c. Add pei-ia64.c.
2389 (efi-app-ia64.lo): Removed.
2390 (efi-bsdrv-ia32.lo): Likewise.
2391 (efi-rtdrv-ia32.lo): Likewise.
2392 (efi-app-ia64.lo): Likewise.
2393 (efi-bsdrv-ia64.lo): Likewise.
2394 (efi-rtdrv-ia64.lo): Likewise.
2395 (efi-app-x86_64.lo): Likewise.
2396 (efi-bsdrv-x86_64.lo): Likewise.
2397 (efi-rtdrv-x86_64.lo): Likewise.
2398 (pei-ia64.lo): New.
2399
2400 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2401 with bfd_pei_p.
2402 (arch_type): Removed.
2403 (pe_arch): Likewise.
2404 (pe_bfd_object_p): Just return coff_object_p.
2405
2406 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2407 bfd_pe_executable_p with bfd_pei_p.
2408
69c5861e
CL
24092009-04-17 Christophe Lyon <christophe.lyon@st.com>
2410
2411 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2412 PLT entries to an undefined symbol when generating a shared
2413 library.
2414
e9cd0660
NC
24152009-04-17 Nick Clifton <nickc@redhat.com>
2416
2417 PR 9909
2418 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2419
3023e3f6
RS
24202009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
2421
2422 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2423 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2424 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2425 * binary.c (binary_bfd_define_common_symbol): Likewise.
2426 * bout.c (b_out_bfd_define_common_symbol): Likewise.
2427 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2428 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2429 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2430 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2431 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2432 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2433 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2434 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2435 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2436 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2437 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2438 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2439 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2440 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2441 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2442 * som.c (som_bfd_define_common_symbol): Likewise.
2443 * srec.c (srec_bfd_define_common_symbol): Likewise.
2444 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2445 * versados.c (versados_bfd_define_common_symbol): Likewise.
2446 * vms.c (vms_bfd_define_common_symbol): Likewise.
2447 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2448 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2449 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2450 (pmac_xcoff_vec): Likewise.
2451 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2452 (aix5coff64_vec): Likewise.
2453 * linker.c (bfd_generic_define_common_symbol): New function.
2454 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2455 (_bfd_define_common_symbol): New field.
2456 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2457 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2458 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2459 symbols here.
2460 * bfd-in2.h: Regenerate.
2461 * libbfd.h: Likewise.
2462 * libcoff.h: Likewise.
2463
20135e4c
NC
24642009-04-15 Anthony Green <green@moxielogic.com>
2465
2466 * targets.c: Add moxie support.
2467 * Makefile.am: Ditto.
2468 * Makefile.in: Rebuilt.
2469 * cpu-moxie.c, elf32-moxie.c: New files.
2470 * archures.c: Add moxie support.
2471 * configure.in: Add moxie support.
2472 * configure: Rebuilt.
2473 * config.bfd, archures.c: Add moxie support.
2474 * bfd-in2.h: Rebuilt.
2475
82b5c97a
CL
24762009-04-15 Christophe Lyon <christophe.lyon@st.com>
2477
2478 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2479 branch to an undef weak symbol into a jump to next instruction if
2480 a PLT entry will be created.
2481
0408dee6
DK
24822009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
2483
2484 * coffgen.c (make_a_section_from_file): Set the backend long
2485 section names enable if long section names found on input.
2486 * coffcode.h: Extend long section names documentation to match.
2487
a0c402a5
L
24882009-04-08 H.J. Lu <hongjiu.lu@intel.com>
2489
2490 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2491 machine code.
2492
4d28413b
DD
24932009-04-07 DJ Delorie <dj@redhat.com>
2494
2495 * archures.c: Add bfd_mach_mep_c5.
2496 * bfd-in2.h: Likewise.
2497 * cpu-mep.c: Add bfd_c5_arch.
2498 * elf32-mep.c: Support it.
2499
bb6198d2
L
25002009-04-07 H.J. Lu <hongjiu.lu@intel.com>
2501
2502 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2503 info->callbacks->einfo.
2504 * linker.c (_bfd_generic_section_already_linked): Likewise.
2505
bcb012d3
DD
25062009-04-06 DJ Delorie <dj@redhat.com>
2507
2508 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2509
db1fe6e9
L
25102009-04-06 H.J. Lu <hongjiu.lu@intel.com>
2511
2512 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2513 _bfd_pex64_print_pdata only if PE is defined.
2514
2515 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2516 (_bfd_pex64_print_pdata): This.
2517
2518 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2519 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2520 is defined.
2521
c7c7219d
KT
25222009-04-05 Kai Tietz <kai.tietz@onevision.com>
2523
2524 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2525 _bfd_pep_print_x64_pdata.
2526 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2527 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2528
3df502ae
SA
25292009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2530
154a1ee5 2531 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
2532 to zero.
2533
d3626fb0
CL
25342009-04-02 Christophe Lyon <christophe.lyon@st.com>
2535
2536 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2537 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2538 branch stubs.
2539 (elf32_arm_stub_type): New enum values for the two new stubs.
2540 (arm_type_of_stub): Make use of the two new stubs.
2541 (arm_size_one_stub): Handle the two new stubs.
2542
fe723c87
MT
25432009-04-01 Matt Thomas <matt@netbsd.org>
2544
2545 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2546 hidden symbols into the GOT or PLT.GOT.
154a1ee5 2547 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
2548 into a shared object if it is against a hidden symbol.
2549
ee698300
RS
25502009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2551
2552 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2553 and know_contains_shared_object_p.
2554 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2555 Cache the result in the archive_info table.
2556 (xcoff_auto_export_p): Add an "info" parameter and update the
2557 call to xcoff_archive_contains_shared_object_p.
2558 (xcoff_mark_auto_exports): Update accordingly.
2559 (xcoff_post_gc_symbol): Likewise.
2560
54e2dbe0
RS
25612009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2562
2563 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2564 rather than C_EXT.
2565
2e470849
RS
25662009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2567
2568 * coff-rs6000.c (member_layout): New structure.
2569 (archive_iterator): Likewise.
2570 (member_layout_init): New function.
2571 (archive_iterator_begin): Likewise.
2572 (archive_iterator_next): Likewise.
2573 (xcoff_write_armap_old): Use the new iterator functions.
2574 (do_shared_object_padding): Delete.
2575 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2576 handling of arch_info.
2577 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2578 first loop rather than the second. Allocate a member header if
2579 there isn't one, then work out the stat information and length
2580 in the first loop too. Use the new iterators for the second loop.
2581 (xcoff_write_archive_contents_big): Likewise.
2582
24c611d1
RS
25832009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2584
2585 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2586 (bfd_xcoff_set_archive_import_path): Likewise.
2587 * bfd-in2.h: Regenerate.
2588 * xcofflink.c: Include libiberty.h.
2589 (xcoff_archive_info): New structure.
2590 (xcoff_archive_info_hash): New function.
2591 (xcoff_archive_info_eq): Likewise.
2592 (xcoff_get_archive_info): Likewise.
2593 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2594 (bfd_xcoff_split_import_path): New function.
2595 (bfd_xcoff_set_archive_import_path): Likewise.
2596 (xcoff_set_import_path): Move earlier in file.
2597 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2598 object to the the directory part of the bfd's filename. Get the
2599 import path and filename of an archive object from the archive's
2600 xcoff_tdata, initializing it if necessary. Update use of
2601 import_file_id.
2602 (bfd_link_input_bfd): Update use of import_file_id.
2603 (xcoff_write_global_symbol): Likewise.
2604
d286971a
RS
26052009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2606
2607 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2608
26092009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2610
2611 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2612 a .loader section for relocatable links.
2613 (xcoff_need_ldrel_p): New function.
2614 (xcoff_mark): Use it.
2615 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2616 a loader section.
2617 (xcoff_build_ldsym): New function, split out from...
2618 (xcoff_build_ldsyms): ...here. Rename to...
2619 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2620 call xcoff_build_ldsym, if there's a loader section.
2621 (xcoff_build_loader_section): New function, extracted verbatim from...
2622 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2623 there's a loader section. Only add an __rtinit loader symbol
2624 if there's a loader section. Update after above name change.
2625 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2626 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2627 and xcoff_create_ldrel.
2628 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2629 (xcoff_reloc_link_order): Likewise, but only call it if there's
2630 a loader section. Use xcoff_symbol_section.
2631 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2632 if there's a loader section.
2633
8707bb87
RS
26342009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2635
2636 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2637
e780aef2
CL
26382009-04-01 Christophe Lyon <christophe.lyon@st.com>
2639
2640 * elf32-arm.c (group_sections): Rewrite loops for better
2641 readability.
2642
c301e700
DD
26432009-03-30 DJ Delorie <dj@redhat.com>
2644
2645 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2646 relocs when doing a relocatable link.
2647
3895f852
MM
26482009-03-28 Mark Mitchell <mark@codesourcery.com>
2649
2650 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2651 "ERROR:", in error messages.
2652 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2653 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2654 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2655 (elf32_arm_merge_eabi_attributes): Likewise.
2656 (elf32_arm_merge_private_bfd_data): Likewise.
2657
ea882e87
NC
26582009-03-27 Nick Clifton <nickc@redhat.com>
2659
2660 * section.c (bfd_get_section_contents): Detect and handle the case
2661 where a section has the SEC_IN_MEMORY flag set but no actual
2662 contents allocated.
2663
9433b9b1
AM
26642009-03-26 Alan Modra <amodra@bigpond.net.au>
2665
2666 PR 6494
2667 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2668 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2669 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2670 if we don't find matching PT_LOAD when copying.
2671
dc1aa734
SR
26722009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2673
2674 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2675 the reloc descriptions.
2676
34d3d6b9
HPN
26772009-03-25 Hans-Peter Nilsson <hp@axis.com>
2678
2679 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2680 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2681 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2682
34274ccc
L
26832009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2684
2685 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2686 (bfd_i386_arch_intel_syntax): Likewise.
2687 (i8086_arch): Likewise.
2688 (bfd_x86_64_arch): Likewise.
2689
019c5a2e
HPN
26902009-03-24 Hans-Peter Nilsson <hp@axis.com>
2691
6718f446
HPN
2692 * elf32-cris.c (cris_elf_relocate_section): <case
2693 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2694 symbols for non-allocated sections. Don't check whether to
2695 generate R_CRIS_DTPMOD for non-allocated sections.
2696 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2697 handle relocation GC:ing if applied to non-allocated section.
2698 (cris_elf_check_relocs): Similar.
2699
019c5a2e
HPN
2700 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2701 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2702 when emitting a known TP offset in the GOT.
2703
ffcfec52
AM
27042009-03-23 Alan Modra <amodra@bigpond.net.au>
2705
2706 * elf64-ppc.c (synthetic_opd): Delete.
2707 (compare_symbols): Look for .opd name rather than section match.
2708 (ppc64_elf_get_synthetic_symtab): Likewise.
2709
c6dd29ce
AM
27102009-03-21 Alan Modra <amodra@bigpond.net.au>
2711
2712 * elf32-ppc.c (is_pic_glink_stub): Delete.
2713 (is_nonpic_glink_stub): New function.
2714 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2715 than first pic one.
2716 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2717
8c21ca21
AK
27182009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2719 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2720
2721 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 2722 macros for visibilty and locality checks.
8c21ca21
AK
2723 (elf_s390_adjust_dynamic_symbol): Likewise.
2724 (allocate_dynrelocs): Likewise.
2725 (elf_s390_relocate_section): Likewise.
2726 (elf_s390_finish_dynamic_symbol): Likewise.
2727 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2728 (elf_s390_adjust_dynamic_symbol): Likewise.
2729 (allocate_dynrelocs): Likewise.
2730 (elf_s390_relocate_section): Likewise.
2731 (elf_s390_finish_dynamic_symbol): Likewise.
2732
156621f3
KT
27332009-03-19 Kai Tietz <kai.tietz@onevision.com>
2734
2735 * bfd-in2.h: Regenerated.
2736 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2737 for debugging sections and map memory read/write dependent on
2738 SEC_COFF_NOREAD.
2739 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2740 without memory read flags set.
2741 * section.c: Add SEC_COFF_NOREAD to section flags.
2742
d1fa68d3
AS
27432009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2744
2745 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2746 for format string.
2747
ad2adbc8
AM
27482009-03-19 Alan Modra <amodra@bigpond.net.au>
2749
2750 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2751 "no overlays" return. If there are overlays, create overlay
2752 manager entry symbols here, so that..
2753 (spu_elf_build_stubs): ..we don't need to set them up here.
2754 Simplify entry symbol tests.
2755 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2756
67cc5033
MK
27572009-03-18 Mark Kettenis <kettenis@gnu.org>
2758
d1fa68d3 2759 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
2760 (elfcore_grok_openbsd_note): New functions.
2761 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
2762
8d25cc3d
AM
27632009-03-18 Alan Modra <amodra@bigpond.net.au>
2764
3889c459 2765 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
2766 * elf32-m68hc1x.c: Include alloca-conf.h.
2767 * xsym.c: Likewise.
2768 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
2769 * som.c: Likewise.
2770 * Makefile.am: Run "make dep-am".
2771 * Makefile.in: Regenerate.
2772
a89e6478
DJ
27732009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2774
2775 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2776
a7e11ee1
AM
27772009-03-17 Alan Modra <amodra@bigpond.net.au>
2778
2779 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
2780 Add compact_stub.
2781 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
2782 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
2783 ovly_return fields with ovly_entry[2]. Adjust all users.
2784 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
2785 when soft-icache.
2786 (spu_elf_build_stubs): Likewise.
2787 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
2788 ovly_flavour changes. Update all callers.
2789 (ovl_stub_size_log2): New function.
2790 (build_stub): Handle compact icache stubs. Use different manager
2791 entry point for stubs in non-icache area.
2792 (spu_elf_size_stubs): Don't allocate space for indirect branch
2793 descriptors.
2794 (spu_elf_build_stubs): And don't built them.
2795
607a83c9
AS
27962009-03-16 Andrew Stubbs <ams@codesourcery.com>
2797
2798 * dwarf2.c (read_section): Always use rawsize, if available.
2799
588f62fc
AM
28002009-03-16 Alan Modra <amodra@bigpond.net.au>
2801
2802 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
2803 of rawsize and size for buffer.
2804
a14c90c1
UW
28052009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2806
2807 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
2808 parameter just because fixed sections fit into local store.
2809 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
2810 generating overlays if fixed sections plus reserved stack
2811 and heap space fit into local store.
2812
30c665df
AM
28132009-03-15 Alan Modra <amodra@bigpond.net.au>
2814
2815 * elf32-spu.c (build_stub): Correct icache set_id.
2816 (spu_elf_relocate_section): Likewise.
2817
f95942a3
RS
28182009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2819
2820 * xcofflink.c (xcoff_link_check_archive_element): Only free the
2821 symbol table if it was created by the current call.
2822
670562e9
RS
28232009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2824
2825 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
2826 class XMC_DS rather than XMC_UA.
2827
b64232cc
RS
28282009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2829
2830 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
2831 bfd_boolean export_defineds parameter with an unsigned int
2832 auto_export_flags parameter.
2833 * bfd-in2.h: Regenerate.
2834 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
2835 split out from xcoff_build_ldsyms.
2836 (xcoff_covered_by_expall_p): New function.
2837 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
2838 but with extra code to handle -bexpfull and -bexpall.
2839 (xcoff_mark_auto_exports): New function.
2840 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
2841 a function should be automatically exported.
2842 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
2843 parameter with an auto_export_flags parameter. Update ldinfo
2844 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
2845 exported symbols.
2846
7d504122
RS
28472009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2848
2849 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
2850 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
2851 init and fini functions. Do garbage collection for objects
2852 without an entry point too.
2853
8602d4fe
RS
28542009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2855
2856 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
2857 check whether a symbol has csect information.
2858 (coff_print_aux): Likewise.
2859 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
2860 information for C_AIX_WEAKEXT too.
2861 (_bfd_xcoff_swap_aux_out): Likewise.
2862 (xcoff_reloc_type_br): Handle defweak symbols too.
2863 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
2864 information for C_AIX_WEAKEXT too.
2865 (_bfd_xcoff64_swap_aux_out): Likewise.
2866 (xcoff64_reloc_type_br): Handle defweak symbols too.
2867 * coffgen.c (coff_print_symbol): Handle auxillary function
2868 information for C_AIX_WEAKEXT too.
2869 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
2870 instead of BSF_GLOBAL if the L_WEAK flag is set.
2871 (xcoff_dynamic_definition_p): New function.
2872 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
2873 defines h. Don't change h if ldsym isn't the definition. Otherwise,
2874 always take the symbol class from the ldsym. Use weak bfd symbol
2875 types for weak ldsyms.
2876 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
2877 Fix the check for whether a definition is from a shared object.
2878 Allow redefinitions of weak symbols.
2879 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
2880 (xcoff_keep_symbol_p): Likewise.
2881 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
2882 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
2883 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
2884 but mark them as L_WEAK.
2885 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
2886 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2887
5b49f6dc
RS
28882009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2889
2890 * xcofflink.c (xcoff_mark): When walking the relocations,
2891 only mark the target symbol or the target section, not both.
2892 (xcoff_final_definition_p): New function.
2893 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
2894 symbol is a valid definition of the associated output symbol.
2895 Use XCOFF_ALLOCATED to stop the same hash table entry having
2896 two output symbols.
2897 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
2898 keeping a symbol.
2899 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
2900
c4037431
RS
29012009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2902
2903 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
2904 symbols as XMC_XO.
2905
3df13c4a
RS
29062009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2907
2908 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
2909 * libcoff.h: Regenerate.
2910 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
2911 line-number counts in the bfd's lineno_counts field.
2912 Don't keep per-csect line-number counts.
2913 (xcoff_sweep): Don't update per-csect line-number counts.
2914 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
2915 entries in each output section.
2916 (xcoff_link_input_bfd): Get the number of line numbers from
2917 the bfd's lineno_counts field, rather than recalculating it
2918 from scratch. Fix the range check when updating C_BINCL and
2919 C_EINCL symbols.
2920 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
2921 here. Don't expect csects to have line-number counts.
2922
e450936a
RS
29232009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2924
2925 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
2926 * libcoff.h: Regenerate.
2927 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
2928 "skip" logic from xcoff_link_input_bfd.
2929 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
2930 objects in a dynamic link, rather than checking whether csectpp
2931 is null. Always allocate debug_index for other objects,
2932 and always go through the loop. Update the type of debug_index
2933 after the change above. Read the auxillary csect information
2934 and use xcoff_keep_symbol_p to decide whether a symbol should
2935 be kept. Set its debug_index to -2 if not.
2936 (xcoff_link_input_bfd): Update the type of debug_index after
2937 the change above and always expect it to be nonnull. Use it to
2938 test whether a symbol should be stripped, rather than making the
2939 decision here. Postpone all symbol creation to the second pass.
2940
47dfb2ca
RS
29412009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2942
2943 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
2944 creating a descriptor.
2945 (xcoff_sweep): Don't mark toc_section unless it's needed.
2946 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
2947 when marking every bfd.
2948 (xcoff_link_input_bfd): Skip all TOC anchors.
2949 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
2950 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
2951 to -1; call xcoff_find_tc0 instead.
2952
4cc02a02
RS
29532009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2954
2955 * libcoff-in.h (xcoff_section_tdata): Update commentary.
2956 * libcoff.h: Regenerate.
2957 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
2958 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
2959 the previous symbol's csect. Treat last_symndx as an inclusive value
2960 and simplify its handling.
2961 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
2962 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 2963 relocations against undefined or absolute sections.
4cc02a02
RS
2964 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
2965 of bfd_und_section_ptr.
2966 (xcoff_link_input_bfd): Likewise.
2967
858ef0ce
RS
29682009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2969
2970 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
2971 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
2972 flag is set. Assert that all undefined symbols are either
2973 imported or defined by a dynamic object.
2974 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2975 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
2976 handling to all relocations. Only set XCOFF_CALLED for function
2977 symbols.
2978 (xcoff_find_function): New function, split out from...
2979 (bfd_xcoff_export_symbol) ...here.
2980 (xcoff_set_import_path): New function, split out from...
2981 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
2982 meaning of XCOFF_CALLED.
2983 (xcoff_mark_symbol): If we mark an undefined and unimported
2984 symbol, find some way of defining it. If the symbol is a function
2985 descriptor, fill in its definition automatically. If the symbol
2986 is a function, mark its descriptor and allocate room for global
2987 linkage code. Otherwise mark the symbol as implicitly imported.
2988 Move the code for creating function descriptors from...
d1fa68d3 2989 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
2990 check for symbols that were implicitly defined.
2991 (xcoff_mark): Don't count any dynamic relocations against
2992 function symbols.
2993 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
2994 in the xcoff link info.
2995 (xcoff_link_input_bfd): Remove handling of undefined and
2996 unexported symbols.
2997
12b2cce9
RS
29982009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2999
3000 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3001 if the target is absolute. Fix comment typo.
3002 (xcoff_ppc_relocate_section): Remove FIXME.
3003 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3004 if the target is absolute.
3005
0e3212ad
RS
30062009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3007
3008 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3009 R_POS and R_NEG relocations against absolute symbols to the
3010 .loader section.
3011
d19d97e9
RS
30122009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3013
3014 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3015 to 2 for bfd_mach_ppc_620.
3016
e5231592
RS
30172009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3018
3019 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3020 * configure.in: Likewise.
3021 * configure: Regenerate.
3022
3516e984
L
30232009-03-13 H.J. Lu <hongjiu.lu@intel.com>
3024
3025 PR binutils/9945
3026 * elf.c (assign_section_numbers): Generate symbol table if there
3027 is any relocation in output.
3028 (_bfd_elf_compute_section_file_positions): Likewise.
3029
ce98a316
NC
30302009-03-13 Nick Clifton <nickc@redhat.com>
3031
3032 PR 9934
3033 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3034 * elflink.c (elf_link_read_relocs_from_section): Use
3035 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
3036 relocs but no symbol table.
3037 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3038
c4fb387b
L
30392009-03-12 H.J. Lu <hongjiu.lu@intel.com>
3040
3041 PR ld/9938
3042 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3043 to check ___tls_get_addr.
3044
3045 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3046 strncmp to check __tls_get_addr.
3047
53638231
AS
30482009-03-12 Andrew Stubbs <ams@codesourcery.com>
3049
3050 * dwarf2.c (read_section): Always check the offset, even when the
3051 section has been read before.
3052
09e8c3bf
L
30532009-03-11 H.J. Lu <hongjiu.lu@intel.com>
3054
3055 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3056 comments.
3057
36e4dce6
CD
30582009-03-11 Chris Demetriou <cgd@google.com>
3059
3060 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3061 * bfd-in2.h: Regenerate.
3062 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3063 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3064 mode.
3065 (bsd_write_armap): Likewise.
3066 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3067 flag is set, do nothing.
3068 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3069 for timestamp.
3070
9b175a76
UW
30712009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
3072
3073 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3074 used to update stack pointer.
3075
f501de17
DA
30762009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3077
3078 PR binutils/9921
3079 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3080 for unknown symbols in absolute section.
3081
d11fd249
NC
30822009-03-06 Nick Clifton <nickc@redhat.com>
3083
3084 * po/es.po: Updated Spanish translation.
3085
8cd931b7
CL
30862009-03-05 Christophe Lyon <christophe.lyon@st.com>
3087
3088 * elf32-arm.c (group_sections): Take next section size into
3089 account before accepting to group it.
3090
5fa9e92f
CL
30912009-03-05 Christophe Lyon <christophe.lyon@st.com>
3092
3093 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3094 PLT entries.
3095 (elf32_arm_final_link_relocate): Likewise.
3096
b92997d6
AM
30972009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
3098
3099 PR 9923
3100 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3101
727fc41e
AM
31022009-03-04 Alan Modra <amodra@bigpond.net.au>
3103
3104 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3105 * section.c (struct bfd_section): Add has_tls_get_addr_call.
3106 (BFD_FAKE_SECTION): Init new flag.
3107 * ecoff.c (bfd_debug_section): Likewise.
3108 * bfd-in2.h: Regenerate.
3109 * libbfd.h: Regenerate.
3110 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3111 (ppc_elf_reloc_type_lookup): Handle new relocs.
3112 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3113 without marker relocs.
3114 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3115 if section has no old-style calls.
3116 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3117 Don't try to optimize new-style __tls_get_addr call when handling
3118 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3119 relocs.
3120 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3121 (ppc64_elf_reloc_type_lookup): Handle new relocs.
3122 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3123 without marker relocs.
3124 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3125 if section has no old-style calls. Set toc_ref for new relocs as
3126 appropriate.
3127 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3128 Don't try to optimize new-style __tls_get_addr call when handling
3129 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3130 relocs.
3131
51dec227
AM
31322009-03-04 Alan Modra <amodra@bigpond.net.au>
3133
3134 PR 6768
3135 * configure.in: Test for ld --as-needed support. Link shared
3136 libbfd against libm.
3137 * configure: Regenerate.
3138
a1f7ca36
AM
31392009-03-03 Alan Modra <amodra@bigpond.net.au>
3140
3141 * Makefile.am: Run "make dep-am".
3142 * Makefile.in: Regenerate.
3143
c3b7224a
NC
31442009-03-02 Qinwei <qinwei@sunnorth.com.cn>
3145
3146 * elf32-score7.c: New file.
3147 * elf32-score.h: New file.
3148 * elf32-score.c: Add code to support score 7. Set score7 as the
3149 default.
3150 * cpu-score.c: Add score7 architecure.
3151 (compatibile): New function.
3152 * Makefile.am: Add rules for building elf32-score7 object.
3153 * Makefile.in: Regenerate.
3154 * configure.in: Add elf32-score7 object to score vectors.
3155 * configure: Regenerate.
3156 * reloc.c: Add score7 relocs.
3157 * archures.c: Add score3 and score7 machine numbers.
3158 * bfd-in2.h: Regenerate.
3159 * libbfd.h: Regenerate.
3160
58e24671
RW
31612009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3162
3163 * configure: Regenerate.
3164
5887528b
DA
31652009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3166
d45b7d74
DA
3167 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3168 (elf32_hppa_check_relocs): Use it.
3169
5887528b
DA
3170 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3171 elf64-hppa.c.
3172 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3173 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3174 (elf_hppa_is_dynamic_loader_symbol): Likewise.
3175 (elf_hppa_record_segment_addrs): Likewise.
3176 (elf_hppa_final_link): Likewise.
3177 (elf_hppa_relocate_insn): Likewise.
3178 (elf_hppa_final_link_relocate): Likewise.
3179 (elf64_hppa_relocate_section): Likewise.
3180 * elf64-hppa.c: Insert above.
3181
a03bd320
DA
31822009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3183
3184 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3185 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3186 (elf_hppa_relocate_section): Likewise.
3187 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3188 from struct elf_link_hash_entry. Add count field.
3189 (struct elf64_hppa_dyn_hash_table): Delete.
3190 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3191 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3192 (hppa_elf_hash_entry, eh_name): Define.
3193 (elf64_hppa_new_dyn_hash_entry): Delete.
3194 (elf64_hppa_dyn_hash_lookup): Delete.
3195 (elf64_hppa_dyn_hash_traverse): Delete.
3196 (get_dyn_name): Delete.
3197 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3198 of struct elf64_hppa_dyn_hash_entry *.
3199 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3200 allocate_global_data_plt, allocate_global_data_stub,
3201 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3202 Likewise.
3203 (hppa64_link_hash_newfunc): New.
3204 (elf64_hppa_hash_table_create): Rework.
3205 (count_dyn_reloc): Likewise.
3206 (hppa64_elf_local_refcounts): New.
3207 (elf64_hppa_check_relocs): Rework using standard technique for recording
3208 local DLT, PLT and OPD reference counts.
3209 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3210 elf_link_hash_entry *.
3211 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3212 allocate_global_data_plt, allocate_global_data_stub,
3213 allocate_global_data_opd, allocate_dynrel_entries,
3214 elf64_hppa_adjust_dynamic_symbol,
3215 elf64_hppa_mark_milli_and_exported_functions): Likewise.
3216 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3217 Use hppa_link_hash_table. Rework.
3218 (elf64_hppa_link_output_symbol_hook): Rework.
3219 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3220 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3221 elf64_hppa_finish_dynamic_sections): Likewise.
3222
ebe24dd4
CL
32232009-02-26 Christophe Lyon <christophe.lyon@st.com>
3224
3225 * elf32-arm.c (stub_reloc_type): Removed.
3226 (insn_sequence): Renamed reloc_type field to r_type.
3227 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3228 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3229 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3230 (elf32_arm_stub_type): Add new enum entries for the new stubs.
3231 (arm_stub_is_thumb): Catch new stubs.
3232 (arm_type_of_stub): Handle new stubs.
3233 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3234 (bfd_elf32_arm_process_before_allocation): Remove useless
3235 condition.
3236
b9d678e0
L
32372009-02-25 H.J. Lu <hongjiu.lu@intel.com>
3238
3239 * elf.c (elf_find_function): Use is_function_type to check
3240 function symbol.
3241
56fb3749
SA
32422009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3243
3244 * xtensa-modules.c: Revert to previous version 1.11 due
3245 to inadvertant commit.
3246
658ff993
SA
32472009-02-24 Sterling Augustine <sterling@tensilica.com>
3248
3249 * elf32-xtensa.c (text_action_add): Separate test for action
3250 type. Break if saved action is ta_widen_insn at same offset.
3251
cf3eccff
DJ
32522009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3253
3254 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3255 to elf32_arm_stub_long_branch_any_arm_pic.
3256 (elf32_arm_stub_long_branch_any_thumb_pic): New.
3257 (enum elf32_arm_stub_type, arm_type_of_stub)
3258 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3259 separately.
3260
07d72278
DJ
32612009-02-24 Joseph Myers <joseph@codesourcery.com>
3262
3263 * elf32-arm.c (PREV_SEC): Update comment.
3264 (group_sections): Rename argument to stubs_always_after_branch.
3265 Reverse the list and place stubs at the end of input sections.
3266 Undefine NEXT_SEC.
3267 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3268
4e31c731
DJ
32692009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3270
3271 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3272 Fix formatting.
3273 (arm_size_one_stub): Remove unnecessary break.
3274 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3275
32762009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
3277
3278 * elf32-arm.c (stub_insn_type): New type.
3279 (stub_reloc_type): Likewise.
3280 (insn_sequence): Likewise.
3281 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3282 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3283 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3284 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3285 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3286 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3287 (elf32_arm_stub_hash_entry): Add new helper fields.
3288 (stub_hash_newfunc): Initialize these new fields.
3289 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3290 to take endianness into account.
3291 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3292 (arm_map_one_stub): Code is now more generic, thanks to
3293 insn_sequence.
3294
c2b4a39d
CL
32952009-02-23 Christophe Lyon <christophe.lyon@st.com>
3296
3297 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3298 code.
3299 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3300 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3301 BLX is not available. Fix typo in warning message. Add comments
3302 and improve formatting.
3303 (arm_build_one_stub): Adjust to new
3304 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3305 (arm_map_one_stub): Likewise.
3306
0c376465 33072009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
3308 Eric Botcazou <ebotcazou@adacore.com>
3309 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
3310
3311 * vms.h: Update copyright year, fix comments, reorder declarations.
3312 (_bfd_save_vms_section): Remove the prototype.
3313 (EGPS_S_V_NO_SHIFT): New constant.
3314 (bfd_vms_set_section_flags): New prototype.
3315 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3316 constants.
3317 (EGSY_S_W_FLAGS): Ditto.
3318 (EGSY_S_V_QUAD_VAL): Ditto.
3319 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3320 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3321 EGST_S_B_NAMLNG): Ditto.
3322 (ESRF_S_B_NAMLNG): Ditto.
3323 (ETIR_S_C_HEADER_SIZE): Ditto.
3324 (EGPS_S_V_ALLOC_64BIT): Ditto.
3325 (DST_S_C_EPILOG): Ditto.
3326 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3327 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3328 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3329 (DST_S_L_PCLINE_UNSLONG): Ditto.
3330 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3331 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3332 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3333 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3334 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3335 (DST_S_B_SRC_UNSBYTE): Ditto.
3336 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3337 Add prototypes.
3338 (vms_section, vms_reloc): Remove types.
3339 (hdr_struc): Replaced by ...
3340 (hdr_struct): ... new type.
3341 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3342 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3343 (EMH_DATE_LENGTH): Ditto.
3344 (eom_struc): Replaced by ...
3345 (eom_struct): ... new type.
3346 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3347 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3348 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3349 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3350 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3351 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3352 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3353 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3354 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3355 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3356 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3357 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3358 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3359 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3360 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3361 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3362 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3363 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3364 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3365 (enum file_type_enum): New type.
3366 (struct location_struct): Removed.
3367 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3368 (struct funcinfo, struct module): Ditto.
3369 (struct vms_private_data_struct): Update fields.
3370 (struct vms_section_data_struct): New type.
3371
3372 * vms.c: Update copyright year, fix comments,
3373 Fix includes for DECC, add prototypes.
3374 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3375 some initializers.
3376 Use flavour to set is_vax, location_stack is removed.
3377 (struct pair): Declare.
3378 (fill_section_ptr): Initialize variables at declaration.
3379 Add guard to set SECTION_SYM flag, handlde und section.
3380 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3381 (_bfd_vms_slurp_object_records): New function, replaces previous
3382 vms_object_p.
3383 (vms_slurp_module): New function.
3384 (vms_slurp_image): Ditto.
3385 (vms_object_p): Complete rewrite.
3386 (vms_mkobject): Use is_vax field to slect architecture.
3387 (free_reloc_stream): New function.
3388 (vms_convert_to_var): Ditto.
3389 (vms_convert_to_var_1): Ditto.
3390 (vms_convert_to_var_unix_filename): Ditto.
3391 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3392 VAR format on VMS.
3393 (vms_new_section_hook): Set alignment to 0, allocate private data.
3394 (vms_get_section_contents): Load content.
3395 (vms_get_symbol_info): Handle undefined section.
3396 (vms_find_nearest_line): Handle.
3397 (alloc_reloc_stream): New function.
3398 (vms_slurp_reloc_table): Ditto.
3399 (vms_get_reloc_upper_bound): Make it real.
3400 (vms_canonicalize_reloc): Do the real work.
3401 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3402 ALPHA_R_BOH.
3403 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3404 (vms_set_arch_mach): Check arch.
3405 (vms_set_section_contents): Copy the content after allocation.
3406 (vms_alpha_vec): Update object flags.
3407
3408 * vms-tir.c: Update copyright year, fix comments,
3409 add prototypes for new functions.
3410 (dst_define_location): New function.
3411 (dst_restore_location): New function.
3412 (dst_retrieve_location): New function.
3413 (dst_check_allocation): New function.
3414 (image_dump): Call dst_check_allocation.
3415 (image_write_b): Ditto.
3416 (image_write_w): Ditto.
3417 (image_write_l): Ditto.
3418 (image_write_q): Ditto.
3419 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3420 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3421 CTL_STKDL.
3422 Call error handler instead of abort if name is not known.
3423 (etir_sta): Add quarter_relocs argument and set it.
3424 Fix cast.
3425 (etir_sto): Ditto.
3426 (etir_opr): Ditto, return FALSE in case of error.
3427 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3428 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3429 (etir_stc): Add quarter_relocs argument and set it, fix cast.
3430 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3431 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3432 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3433 Return FALSE in case of error.
3434 (tir_sta): Change sign of psect.
3435 (tir_ctl): Ditto.
3436 (tir_cmd): Fix cast. Makes tir_table static const.
3437 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3438 add argument to explain.
3439 (analyze_etir): Initialize maxptr, add quarter_relocs
3440 declaration, move some declarations into inner scopes.
3441 Handle quarter_relocs and STO_IMM.
3442 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3443 (_bfd_vms_slurp_relocs): New function.
3444 (_bfd_vms_decode_relocs): New function.
3445 (sto_imm): Rewritten.
3446 (start_first_etbt_record): New function.
3447 (start_another_etbt_record): Ditto.
3448 (etir_output_check): Ditto.
3449 (defer_reloc_p): Ditto.
3450 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3451 a for-loop. Correctly deals with contents, deals with .vmsdebug,
3452 rewritte relocations handling.
3453 (_bfd_vms_write_tbt): Removed.
3454 (_bfd_vms_write_dbg): Ditto.
3455
3456 * vms-misc.c: Update copyright year, Fix comments.
3457 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3458 (maybe_adjust_record_pointer_for_object): New function.
3459 (_bfd_vms_get_first_record): New function, replaces ...
3460 (_bfd_vms_get_record): .. removed.
3461 (_bfd_vms_get_object_record): New function.
3462 (_bfd_vms_get_object_record): New function.
3463 (vms_get_remaining_object_record): New function, replaces ...
3464 (_bfd_vms_get_next_record): ... removed.
3465 (add_new_contents): Removed.
3466 (_bfd_save_vms_section): Removed.
3467 (_bfd_get_vms_section): Removed.
3468 (_bfd_vms_output_flush): Write in VAR format.
3469 (new_symbol): Don't make UND section.
3470
3471 * vms-hdr.c: Update copyright year, update list of record handled.
3472 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3473 (_bfd_vms_write_hdr): Strip vms and unix patches,
3474 add comments, truncate module name at 31 characters,
3475 use constants instead of hard-coded value,
3476 write BFD version instead of a fixed string.
3477 (_bfd_vms_slurp_ihd): New function.
3478 (_bfd_vms_slurp_isd): Ditto.
3479 (_bfd_vms_slurp_ihs): Ditto.
3480 (new_module): Ditto.
3481 (parse_module): Ditto
3482 (build_module_list): Ditto.
3483 (module_find_nearest_line): Ditto.
3484 (_bfd_vms_find_nearest_dst_line): Ditto.
3485 (vms_slurp_debug): Ditto.
3486 (_bfd_vms_slurp_dbg): Ditto.
3487 (_bfd_vms_slurp_tbt): Ditto.
3488 (_bfd_vms_write_dbg): Ditto.
3489 (_bfd_vms_write_tbt): Ditto.
3490
3491 * vms-gsd.c: Update copyright year, update list of records handled.
3492 (EVAX_LITERALS_NAME): New macro.
3493 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3494 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3495 (register_universal_symbol): New function and prototype.
3496 (_bfd_vms_slurp_gsd): Fix indentations and casts,
3497 improve debug messages,
3498 use constants instead of hard-coded value,
3499 fix missing endianness conversion,
3500 handle global symbol (SYMG).
3501 (bfd_vms_set_section_flags): New function.
3502 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3503 handle section literals,
3504 fix indentation,
3505 handle section bfd and vms flags,
3506 don't output LIB$INITIALIZE symbol,
3507 fix handling of weak symbols,
3508 fix evax vs vax procedure descriptor,
3509 handle absolute symbols.
3510
3511 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3512 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3513
3514 * makefile.vms (DEFS): Fix flags for VMS.
3515
3516 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3517
3518 * bfd-in2.h: Regenerated.
3519 * libbfd.h: Regenerated.
3520
47149254
CC
35212009-02-20 Cary Coutant <ccoutant@google.com>
3522
3523 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3524 in struct stat.
3525
6b1cecf3
DK
35262009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3527
3528 PR gas/7059
3529 * coffcode.h (coff_write_object_contents): Don't let the string
3530 table offset overflow the s_name field when using long section names.
3531
88183869
DK
35322009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3533
3534 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3535 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3536 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3537 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3538 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3539 (bfd_pmac_xcoff_backend_data): Likewise.
3540 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3541 (bfd_xcoff_aix5_backend_data): Likewise.
3542 (xcoff64_write_object_contents): Delete unused long_section_names
3543 local variable.
3544 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3545 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3546 struct non-const.
3547 * coffcode.h (documentation): Update to describe long section names.
3548 (COFFLONGSECTIONCATHELPER): New helper macro.
3549 (BLANKOR1TOODD): Likewise.
3550 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3551 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3552 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3553 (bfd_coff_set_long_section_names_allowed): New function.
3554 (bfd_coff_set_long_section_names_disallowed): Likewise.
3555 (struct bfd_coff_backend_data): Add new backend hook function
3556 pointer _bfd_coff_set_long_section_names.
3557 (bfd_coff_set_long_section_names): New backend hook.
3558 (coff_write_object_contents): Only generate long section names if
3559 bfd_coff_long_section_names() indicates they are currently enabled.
3560 (bfd_coff_std_swap_table): Make non-const, and initialise long
3561 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3562 (ticoff0_swap_table): Likewise to both.
3563 (ticoff1_swap_table): Again, likewise to both.
3564 * coffgen.c (make_a_section_from_file): Allow long section names
3565 as inputs even if not currently allowed for outputs.
3566 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3567 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3568 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3569 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3570 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3571 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3572 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3573 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3574 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3575 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3576 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3577 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3578 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3579 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3580 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3581 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3582 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3583 * libcoff-in.h: Update copyright year to cause updated copyright
3584 year in generated libcoff.h, and fix typo.
3585 * libcoff.h: Regenerated.
3586 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3587 (_bfd_ecoff_no_long_sections): Add prototype.
3588 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3589 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3590 defined by an including .c file.
3591 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3592 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3593 (ticoff1_swap_table): Likewise to both.
3594
90d8a22c
CL
35952009-02-18 Christophe Lyon <christophe.lyon@st.com>
3596
3597 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3598 stub. Catch default case error.
3599 (arm_map_one_stub): Add missing Thumb mapping symbol.
3600
12123067
NC
36012009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3602
3603 PR 9841
3604 * elf32-avr.c: Handle case where no local symbos exist correctly.
3605
fea2b4d6
CL
36062009-02-16 Christophe Lyon <christophe.lyon@st.com>
3607
3608 bfd/
3609 * elf32-arm.c (arm_long_branch_stub,
3610 arm_thumb_v4t_long_branch_stub,
3611 arm_thumb_thumb_long_branch_stub,
3612 arm_thumb_arm_v4t_long_branch_stub,
3613 arm_thumb_arm_v4t_short_branch_stub,
3614 arm_pic_long_branch_stub):
3615 Renamed to elf32_arm_stub_long_branch_any_any,
3616 elf32_arm_stub_long_branch_v4t_arm_thumb,
3617 elf32_arm_stub_long_branch_thumb_only,
3618 elf32_arm_stub_long_branch_v4t_thumb_arm,
3619 elf32_arm_stub_short_branch_v4t_thumb_arm,
3620 elf32_arm_stub_long_branch_any_any_pic.
3621 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3622 arm_thumb_thumb_stub_long_branch,
3623 arm_thumb_arm_v4t_stub_long_branch,
3624 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3625 Renamed to arm_stub_long_branch_any_any,
3626 arm_stub_long_branch_v4t_arm_thumb,
3627 arm_stub_long_branch_thumb_only,
3628 arm_stub_long_branch_v4t_thumb_arm,
3629 arm_stub_short_branch_v4t_thumb_arm,
3630 arm_stub_long_branch_any_any_pic.
3631
13e0a874
DA
36322009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3633
3634 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3635 in branch offset check.
3636
3a71aa26
AM
36372009-02-15 Alan Modra <amodra@bigpond.net.au>
3638
3639 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3640 add toc.symndx and toc.add.
3641 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3642 Set up toc.add.
3643 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3644 callers.
3645 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3646 (branch_reloc_hash_match): New function, extracted from..
3647 (ppc64_elf_tls_optimize): ..here.
3648 (ppc64_elf_relocate_section): Properly set addends when optimizing
3649 tls sequences. Avoid unnecessary reading and writing of insns.
3650 Only redo reloc when symbol changed. Bypass symbol checks when
3651 using tlsld_got.
3652 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3653 (branch_reloc_hash_match): New function, extracted from..
3654 (ppc_elf_tls_optimize): ..here.
3655 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3656 Don't clear addend on zapped __tls_get_addr reloc.
3657
2c2b4ed4
NC
36582009-02-12 Nick Clifton <nickc@redhat.com>
3659
3660 PR 9827
3661 * elflink.c (bfd_elf_final_link): When counting the relocations,
3662 if the header size has not been set yet then assume that it will
3663 match the output section's reloc type.
3664
453f5985
NS
36652009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3666
3667 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3668 relocatable link.
3669
3209bffa
AM
36702009-02-09 Alan Modra <amodra@bigpond.net.au>
3671
3672 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3673 (find_function): Likewise.
3674 (pasted_function): Don't error if no prior function found.
3675 (discover_functions): Revert 2008-12-10 change. Extend first
3676 function range to start of section.
3677
813c8a3c
DA
36782009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3679
3680 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3681 functions to C90.
3682 * elf64-hppa.h: Likewise.
3683
2d0f9ad9
JM
36842009-02-06 Joseph Myers <joseph@codesourcery.com>
3685
3686 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3687 .sbss handling.
3688
50e00962
AM
36892009-02-04 Alan Modra <amodra@bigpond.net.au>
3690
3691 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3692 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3693
52b6b6b9
JM
36942009-02-03 Sandip Matte <sandip@rmicorp.com>
3695
3696 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3697 * archures.c (bfd_mach_mips_xlr): Define.
3698 * bfd-in2.h: Regenerate.
3699 * cpu-mips.c (I_xlr): Define.
3700 (arch_info_struct): Add XLR entry.
3701 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3702 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3703 (mips_mach_extensions): Add XLR entry.
3704
654c3c9f
EW
37052009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3706
3707 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3708
31dd3154
JM
37092009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3710
3711 * configure.in: AC_SUBST pdfdir.
d1fa68d3 3712 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
3713 and install-pdf-recursive targets. Define pdfdir.
3714 * doc/Makefile.am: Define pdf__strip_dir. Add
3715 install-pdf and install-pdf-am targets.
d1fa68d3 3716 * po/Make-in: Add install-pdf target.
31dd3154
JM
3717 * configure: Regenerate.
3718 * Makefile.in: Regenerate
3719 * doc/Makefile.in: Regenerate.
3720
cf869cce
NC
37212009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3722
3723 * bfd-in2.h: Regenerate.
3724 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3725 fields from n_entries to n_slots where appropriate, update comments.
3726 (HOWTO): Add TLS relocations.
3727 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3728 (enum elf_m68k_got_offset_size): New enum.
3729 (struct elf_m68k_got_entry.type): Move field to ...
3730 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3731 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3732 functions.
3733 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3734 functions.
3735 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3736 fields into n_entries array. Update comments.
3737 (elf_m68k_init_got): Simplify, update all uses.
3738 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3739 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3740 GOT entries; update name, update all uses.
3741 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3742 (elf_m68k_get_got_entry): Update.
3743 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3744 simplify.
3745 (elf_m68k_remove_got_entry_type): Simplify.
3746 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3747 (elf_m68k_can_merge_gots): Update.
3748 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3749 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3750 GOT entries, simplify.
3751 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3752 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3753 field, remove obsoleted local_n_entries field.
3754 (elf_m68k_partition_multi_got_2): New static function.
3755 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3756 update.
3757 (elf_m68k_remove_got_entry_type): Update.
3758 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 3759 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
3760 update of sgot->size and srelgot->size.
3761 (elf_m68k_gc_sweep_hook): Update.
3762 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3763 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
3764 TLS relocations.
3765 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
3766 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
3767
c1a0a41f
DD
37682009-02-02 DJ Delorie <dj@redhat.com>
3769
3770 * elf32-mep.c (config_names): Regenerate configuration.
3771
72a80a16
AM
37722009-02-02 Alan Modra <amodra@bigpond.net.au>
3773
3774 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
3775 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
3776 * elf.c (bfd_elf_get_str_section): Make static.
3777 (bfd_elf_find_section): Delete.
3778 * libbfd.h: Regenerate.
3779
273f4430
JK
37802009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3781
3782 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
3783 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
3784
010e5ae2
AM
37852009-01-31 Alan Modra <amodra@bigpond.net.au>
3786
3787 * elflink.c (on_needed_list): New function.
3788 (elf_link_add_object_symbols): Link in --as-needed libs if they
3789 satisfy undefined symbols in other libs.
3790
33a7ffc2
JM
37912009-01-30 Julian Brown <julian@codesourcery.com>
3792
3793 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
3794 EXEC_P or DYNAMIC flags, and skip sections which are being linked
3795 with --just-symbols (-R).
3796
13d72a14
AN
37972009-01-29 Adam Nemet <anemet@caviumnetworks.com>
3798
3799 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
3800 high_pc in order to properly sign-extend VMAs.
3801
d334575b 38022009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
3803 Mark Shinwell <shinwell@codesourcery.com>
3804 Catherine Moore <clm@codesourcery.com>
d334575b
JM
3805
3806 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
3807
528aeb62
CM
38082009-01-28 Catherine Moore <clm@codesourcery.com>
3809
3810 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
3811 SEC_LOAD for dynamic relocation sections.
3812
f6f05983
HPN
38132009-01-27 Hans-Peter Nilsson <hp@axis.com>
3814
3815 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
3816 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
3817 the size of local TLS data.
3818
27cc28f9
AS
38192009-01-27 Andreas Schwab <schwab@suse.de>
3820
3821 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
3822 architectures in the archive.
3823
b3bf42d8
HPN
38242009-01-27 Hans-Peter Nilsson <hp@axis.com>
3825
f551b6f0
HPN
3826 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
3827 <R_CRIS_32_DTPREL>: Correct relocation value.
3828
b3bf42d8
HPN
3829 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
3830 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
3831 symbols with non-default visibility.
3832
9bc4e62b
NS
38332009-01-26 Nathan Sidwell <nathan@codesourcery.com>
3834
3835 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
3836 describing the trampolines.
3837 (ppc_elf_relocate_section): Update relocs to describe the
3838 trampolines.
3839
aeaf6540
DA
38402009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3841
3842 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
3843 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
3844 and R_PARISC_PCREL12F relocations.
3845
1e8fa21e
AM
38462009-01-24 Alan Modra <amodra@bigpond.net.au>
3847
3848 PR 6022
3849 * elflink.c (find_version_for_sym): New function split out from,
3850 but without export_dynamic test, ..
3851 (_bfd_elf_link_assign_sym_version): ..here.
3852 (_bfd_elf_export_symbol): Use it.
3853
28caa186
AM
38542009-01-23 Alan Modra <amodra@bigpond.net.au>
3855
3856 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
3857 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
3858 * elflink.c: ..here, somewhat modified.
3859 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
3860 _bfd_elf_link_find_version_dependencies,
3861 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
3862 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3863 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
3864 declare..
3865 * elflink.c: ..and make static here.
3866 (_bfd_elf_link_find_version_dependencies): Adjust for removal
3867 of output_bfd from struct elf_find_verdep_info.
3868 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
3869 struct elf_info_failed.
3870 (bfd_elf_size_dynamic_sections): Adjust.
3871
be04437d
AM
38722009-01-22 Alan Modra <amodra@bigpond.net.au>
3873
3874 PR 6832
3875 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
3876 after comp_unit_find_line call.
3877
58f9615c
NC
38782009-01-21 Nick Clifton <nickc@redhat.com>
3879
3880 PR 9769
3881 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
3882 tm_gmtoff field in struct tm.
3883
fb266b8b
AM
38842009-01-21 Alan Modra <amodra@bigpond.net.au>
3885
3886 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
3887 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
3888 sections in soft-icache lines unless non_ia_text. Don't add
3889 rodata if doing so would exceed line size.
3890
451ffe63
HPN
38912009-01-19 Hans-Peter Nilsson <hp@axis.com>
3892
3893 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
3894 types than bfd_link_hash_indirect, before early return, call
3895 _bfd_elf_link_hash_copy_indirect.
3896
5aa6ff7c
AS
38972009-01-19 Andrew Stubbs <ams@codesourcery.com>
3898
3899 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
3900 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
3901 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
3902 (elf_backend_obj_attrs_order): New define.
3903 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
3904 (elfNN_bed): Add elf_backend_obj_attrs_order.
3905
3483fe2e
AS
39062009-01-19 Andrew Stubbs <ams@codesourcery.com>
3907
3908 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
3909 (obj_attr_size): Likewise.
3910 (write_obj_attribute): Likewise.
3911 (_bfd_elf_copy_obj_attributes): Likewise.
3912 (_bfd_elf_parse_attributes): Likewise.
3913 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
3914 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
3915 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
3916 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
3917 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
3918 with macros.
3919
2d0bb761
AS
39202009-01-19 Andrew Stubbs <ams@codesourcery.com>
3921
3922 * elf-attrs.c (is_default_attr): Support defaultless attributes.
3923 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
3924 (bfd_elf_add_obj_attr_string): Likewise.
3925 (bfd_elf_add_obj_attr_int_string): Likewise.
3926 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
3927 * elf-bfd.h (struct obj_attribute): Document new flag bit.
3928 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
3929 Tag_nodefaults has no default value.
3930 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
3931 comment to reflect the new state.
3932
a77e83b7
AM
39332009-01-19 Alan Modra <amodra@bigpond.net.au>
3934
3935 PR 9695
3936 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
3937 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
3938 (adjust_z_magix): Delete dead code handling QMAGIC.
3939
f6d29e26
KT
39402009-01-16 Kai Tietz <kai.tietz@onevision.com>
3941
3942 * coffcode.h (styp_to_sec_flags): Correct interpretation of
3943 IMAGE_SCN_MEM_DISCARDABLE.
3944
29670fb9
AM
39452009-01-16 Alan Modra <amodra@bigpond.net.au>
3946
3947 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
3948 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
3949 * configure.in (commonbfdlib): Delete.
3950 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
3951 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
3952 is available, not just for linux.
3953 * po/SRC-POTFILES.in: Regenerate.
3954 * Makefile.in: Regenerate.
3955 * configure: Regenerate.
3956
91e22acd
AS
39572009-01-15 Andrew Stubbs <ams@codesourcery.com>
3958 Julian Brown <julian@codesourcery.com>
3959
3960 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
3961 ARM attributes in ABI 2.07.
3962 * elf32-arm.c (get_secondary_compatible_arch): New function.
3963 (set_secondary_compatible_arch): New function.
3964 (tag_cpu_arch_combine): New function.
3965 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
3966 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
3967 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
3968 make it fit with order_01243.
3969 Add support for Tag_also_compatible_with,
3970 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
3971 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
3972 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
3973 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
3974 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
3975 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
3976 Rework the way unknown attributes are handled.
3977 Defer errors until all attributes have been processed.
3978
7b86a9fa
AS
39792009-01-15 Andrew Stubbs <ams@codesourcery.com>
3980
3981 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
3982 bfd_elf_add_obj_attr_int_string.
3983 Read Tag_compatibility from its new location in the attribute array,
3984 rather than the attribute list.
3985 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
3986 bfd_elf_add_obj_attr_int_string.
3987 (_bfd_elf_parse_attributes): Likewise.
3988 (_bfd_elf_merge_object_attributes): There's now only one
3989 Tag_compatibility, and it's in the array, not the list.
3990 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
3991 Tag_compatibility.
3992 (bfd_elf_add_obj_attr_compat): Rename to
3993 bfd_elf_add_obj_attr_int_string.
3994 (bfd_elf_add_proc_attr_compat): Rename to
3995 bfd_elf_add_proc_attr_int_string.
3996 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
3997 Tag_compatibility.
3998
01e1a5bc
NC
39992009-01-15 Douglas B Rupp <rupp@gnat.com>
4000
4001 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4002 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4003 (vmsutil.lo): Add dependency rule.
4004 * Makefile.in: Regenerate.
4005 * config.bfd (ia64*-*-*vms*): Add case.
4006 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4007 * configure: Regenerate.
4008 * vmsutil.c: New file.
4009 * vmsutil.h: New file.
4010 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4011 attr to bfd_vma.
4012 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4013 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4014 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4015 elfNN_vms_object_p): New functions
4016 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4017
a33dafc3
L
40182009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4019
4020 PR ld/9727
4021 * elflink.c (elf_gc_sweep): Exclude the group section if the
4022 first member of the section group is excluded.
4023
13c0e967
AM
40242009-01-14 Alan Modra <amodra@bigpond.net.au>
4025
4026 PR 9735
4027 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4028 saved filename, use bfd_alloc rather than bfd_malloc for it.
4029
460e679b
AM
40302009-01-13 Alan Modra <amodra@bigpond.net.au>
4031
4032 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4033
25076afa
AM
40342009-01-13 Alan Modra <amodra@bigpond.net.au>
4035
4036 * elf32-spu.c (remove_cycles): Always set call->max_depth.
4037
37107878
AM
40382009-01-12 Alan Modra <amodra@bigpond.net.au>
4039
4040 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4041
cd4a7468
AM
40422009-01-12 Alan Modra <amodra@bigpond.net.au>
4043
4044 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4045 num_lines_log2.
4046 (struct got_entry): Add br_addr.
4047 (struct call_info): Add priority.
4048 (struct function_info): Add lr_store and sp_adjust.
4049 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4050 (spu_elf_find_overlays): For soft-icache, mark any section within cache
4051 area as an overlay, and check that no other overlays exist. Look up
4052 icache overlay manager entry sym.
4053 (BRA_STUBS, BRA, BRASL): Define.
4054 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4055 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
4056 in branch insn.
4057 (count_stub, build_stub): Support soft-icache.
4058 (build_spuear_stubs, process_stubs): Adjust build_stub call.
4059 (spu_elf_size_stubs): Size soft-icache stubs.
4060 (overlay_index): New function.
4061 (spu_elf_build_stubs): Make static. Support soft-icache.
4062 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4063 (find_function_stack_adjust): Save lr store and stack adjust insn
4064 offsets.
4065 (maybe_insert_function): Adjust find_function_stack_adjust call.
4066 (mark_functions_via_relocs): Retrieve priority.
4067 (remove_cycles): Only warn about pruned arcs when stack_analysis.
4068 (sort_calls): Sort by priority first.
4069 (mark_overlay_section): Ignore .ovl.init.
4070 (sum_stack): Only print when stack_analysis.
4071 (print_one_overlay_section): New function, extracted from..
4072 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
4073 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4074 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4075 analysis. Call spu_elf_build_stubs.
4076 (spu_elf_relocate_section): For soft-icache encode overlay index
4077 into addresses.
4078 (spu_elf_output_symbol_hook): Support soft-icache.
4079 (spu_elf_modify_program_headers: Likewise.
37107878 4080
cd4a7468
AM
4081 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
4082 num_regions to num_lines. Add line_size and max_branch.
4083 (enum _ovly_flavour): Add ovly_soft_icache.
4084 (spu_elf_build_stubs): Delete.
4085
80c29487
JK
40862009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
4087
4088 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4089 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4090
1bc86aea
HPN
40912009-01-07 Hans-Peter Nilsson <hp@axis.com>
4092
4093 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
4094 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
4095 the program, the known offset starts at the negative size of the
4096 TLS section.
4097 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
4098 Similar.
4099
3baa454d 41002009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 4101
3baa454d 4102 * config.bfd: Add lm32-*-rtems*.
75606e85 4103
9dbe8890
L
41042009-01-03 H.J. Lu <hongjiu.lu@intel.com>
4105
4106 * coff-ppc.c: Add 2009 to Copyright.
4107 * elf32-cris.c: Likewise.
4108 * elflink.c: Likewise.
4109
0bdf8d40
HPN
41102009-01-03 Hans-Peter Nilsson <hp@axis.com>
4111
4112 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4113 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
4114
54ac0771
L
41152009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4116
4117 PR ld/9679
4118 * elflink.c (elf_merge_st_other): New.
4119 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4120 hide them if needed.
4121 (elf_link_add_object_symbols): Updated.
4122
d8880531
L
41232009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4124
4125 PR ld/9676
4126 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4127 ref_dynamic and dynamic_def fields when setting def_regular
4128 to 1.
4129
b70b5c14
NC
41302009-01-02 Curtis Mackie <curtmackevo@gmail.com>
4131
4132 PR 9682
4133 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4134 literal.
4135
d8880531 4136For older changes see ChangeLog-2008
56882138
AM
4137\f
4138Local Variables:
4139mode: change-log
4140left-margin: 8
4141fill-column: 74
4142version-control: never
4143End:
This page took 0.851012 seconds and 4 git commands to generate.