1 2005-07-16 Alan Modra <amodra@bigpond.net.au>
3 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
4 for zero size sections. Don't set .sbss syms here.
5 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
7 2005-07-16 Alan Modra <amodra@bigpond.net.au>
9 * Makefile.am: Run "make dep-am".
10 * Makefile.in: Regenerate.
12 2005-07-15 Bob Wilson <bob.wilson@acm.org>
14 * elf32-xtensa.c (vsprint_msg): Add prototype.
15 (build_encoding_error_message): Delete. Code moved into....
16 (elf_xtensa_do_reloc): ....here, and changed to give better
17 error messages for out of range literals.
19 2005-07-15 Alan Modra <amodra@bigpond.net.au>
21 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
22 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
23 defined in output sections. Call bfd_elf_record_link_assignment.
24 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
25 * bfd-in2.h: Regenerate.
27 2005-07-14 Jim Blandy <jimb@redhat.com>
29 Add support for m32c-*-elf (Renesas m32c and m16c).
30 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
31 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
32 (BFD32_BACKENDS): Add elf32-m32c.lo.
33 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
34 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
35 * Makefile.in: Regenerated.
36 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
38 (bfd_m32c_arch): New arch info object.
39 (bfd_archures_list): List bfd_m32c_arch.
40 * bfd-in2.h: Regenerated.
41 * config.bfd: Add case for the m32c.
42 * configure.in: Add case for the m32c.
43 * configure: Regenerated.
44 * cpu-m32c.c, elf32-m32c.c: New files.
45 * libbfd.h: Regenerated.
46 * targets.c (bfd_elf32_m32c_vec): Declare.
47 (_bfd_target_vector): List bfd_elf32_m32c_vec.
49 2005-07-14 Alan Modra <amodra@bigpond.net.au>
51 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
52 (_bfd_elf_provide_section_bound_symbols): Remove param name.
54 * bfd-in2.h: Regenerate.
55 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
56 (_bfd_elf_provide_symbol): Formatting.
57 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
58 create section relative syms.
59 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
60 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
61 _bfd_elf_provide_section_bound_symbols.
62 * reloc.c (bfd_mark_used_section): Delete.
63 (bfd_generic_gc_sections): Don't call the above.
65 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
68 * cache.c (bfd_last_cache): Initialise to NULL.
70 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
71 Nick Clifton <nickc@redhat.com>
73 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
74 Alpha binaries and issue a helpful error message.
75 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
76 symbol index to 15 to allow for binaries produced by DEC
79 2005-07-13 Steve Ellcey <sje@cup.hp.com>
81 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
83 2005-07-12 Alan Modra <amodra@bigpond.net.au>
85 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
88 2005-07-12 Alan Modra <amodra@bigpond.net.au>
90 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
92 2005-07-12 Alan Modra <amodra@bigpond.net.au>
94 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
96 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
98 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
101 2005-07-08 Paul Koning <pkoning@equallogic.com>
103 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
104 where addresses are sign extended.
106 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
108 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
109 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
110 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
111 sparc*-*-rtemsaout* as removed
113 2005-07-08 Alan Modra <amodra@bigpond.net.au>
115 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
116 of the usual sections are found.
117 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
118 Strip .dynbss if it is zero size.
119 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
120 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
121 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
122 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
124 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
125 when it is zero size.
126 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
127 of .dynbss and zero size sections.
128 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
130 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
131 .dynbss if zero size.
132 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
134 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
135 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
136 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
137 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
138 .plt.* and .got.plt.* if zero size.
139 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
140 .got* and .dynbss if zero size.
141 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
142 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
143 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
145 (create_got_section): Always create new .got and .rela.got sections.
146 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
147 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
148 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
149 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
150 dynamic bss sections correctly.
151 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
152 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
153 .dynbss if zero size.
155 2005-07-08 Ben Elliston <bje@au.ibm.com>
157 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
158 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
160 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
162 * elf-bfd.h (elf_backend_data): Add special_sections.
164 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
167 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
168 (elf_backend_special_sections): New. Defined.
169 * elf32-m32r.c: Likewise.
170 * elf32-m68hc11.c: Likewise.
171 * elf32-m68hc12.c: Likewise.
172 * elf32-mcore.c: Likewise.
173 * elf32-sh64.c: Likewise.
174 * elf32-v850.c: Likewise.
175 * elf32-xtensa.c: Likewise.
176 * elf64-alpha.c: Likewise.
177 * elf64-hppa.c: Likewise.
178 * elf64-ppc.c: Likewise.
179 * elf64-sh64.c: Likewise.
180 * elfxx-ia64.c: Likewise.
181 * elfxx-mips.c: Likewise.
182 * elfxx-mips.h: Likewise.
184 * elfxx-target.h (elf_backend_special_sections): New.
185 (elfNN_bed): Initialize special_sections.
187 2005-07-07 Bob Wilson <bob.wilson@acm.org>
189 * xtensa-modules.c: Update tables with Xtensa MMU features.
191 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
193 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
195 * vms.h (_bfd_vms_debug): Add format attribute.
196 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
198 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
201 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
202 symbol with default visibility is local.
204 2005-07-07 Ben Elliston <bje@gnu.org>
206 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
208 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
210 * dwarf2.c (varinfo): Add addr.
211 (lookup_symbol_in_variable_table): Also check addr.
212 (scan_unit_for_symbols): Set addr for variable.
213 (comp_unit_find_line): Updated.
215 2005-07-06 Nick Clifton <nickc@redhat.com>
217 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
218 message if an unknown reloc is encountered.
219 (alpha_relocate_section): Likewise.
221 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
222 with a missing howto field.
224 2005-07-06 Alan Modra <amodra@bigpond.net.au>
226 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
229 2005-07-05 Paul Brook <paul@codesourcery.com>
231 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
232 (ppc_elf_vxworks_get_sec_type_attr): New function.
233 (elf_backend_special_sections): Remove vxwords definition.
234 (elf_backend_get_sec_type_attr): Define for vxworks.
236 2005-07-05 Nick Clifton <nickc@redhat.com>
238 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
240 2005-07-05 Paul Brook <paul@codesourcery.com>
242 * config.bfd: Add separate case for ppc-vxworks.
243 * configure: Regenerate.
244 * configure.in: Include elf-vxworks.lo on ppc targets.
245 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
247 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
248 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
249 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
250 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
251 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
252 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
253 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
254 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
255 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
256 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
257 (ppc_elf_create_got): Create .got.plt for VxWorks.
258 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
260 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
261 (allocate_got): VxWorks does not need a got header.
262 (allocate_dynrelocs): Handle VxWorks plt format.
263 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
264 VxWorks. Handle VxWorks plt/got.
265 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
266 (ppc_elf_vxworks_special_sections): New.
267 (ppc_elf_vxworks_link_hash_table_create,
268 ppc_elf_vxworks_add_symbol_hook,
269 elf_i386_vxworks_link_output_symbol_hook,
270 ppc_elf_vxworks_final_write_processing): New functions.
271 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
272 (_bfd_target_vector): Use it.
274 2005-07-05 Jakub Jelinek <jakub@redhat.com>
276 * libbfd-in.h (struct artdata): Add extended_names_size field.
278 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
279 allocated object by bfd_zalloc.
280 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
281 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
282 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
283 (get_extended_arelt_filename): Fail if index is bigger or equal to
285 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
286 get_extended_arelt_filename already did that.
287 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
288 Allocate one extra byte and clear it, in case extended names table
291 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
292 bfd_zalloc2): New prototypes.
293 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
294 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
295 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
296 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
297 elf_map_symbols, map_sections_to_segments,
298 assign_file_positions_for_segments, copy_private_bfd_data,
299 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
301 * bfd-in2.h: Rebuilt.
304 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
305 verdef or verneed section.
306 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
307 verneed sections gracefully.
308 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
309 bogus relocation values.
310 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
311 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
312 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
313 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
314 * elfxx-ia64.c (lookup_howto): Likewise.
316 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
317 the end of strtab and clear it.
320 2005-07-05 Nick Clifton <nickc@redhat.com>
322 * po/vi.po: New Vietnamese translation.
323 * configure.in (ALL_LINGUAS): Add vi.
324 * configure: Regenerate.
326 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
328 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
329 touchup logic like i386/ppc.
331 2005-07-05 Alan Modra <amodra@bigpond.net.au>
333 * elf.c (special_sections): Move const qualifier.
334 (special_sections_b..special_sections_t): Likewise.
335 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
337 (elf32_arm_symbian_special_sections): Move const qualifier.
338 * elf32-m32r.c: Similarly.
339 * elf32-m68hc11.c: Similarly.
340 * elf32-m68hc12.c: Similarly.
341 * elf32-mcore.c: Similarly.
342 * elf32-ppc.c: Similarly.
343 * elf32-sh64.c: Similarly.
344 * elf32-v850.c: Similarly.
345 * elf32-xtensa.c: Similarly.
346 * elf64-alpha.c: Similarly.
347 * elf64-hppa.c: Similarly.
348 * elf64-ppc.c: Similarly.
349 * elf64-sh64.c: Similarly.
350 * elfxx-ia64.c: Similarly.
351 * elfxx-mips.c: Similarly.
353 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
355 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
356 info->executable instead of !info->shared where appropriate.
358 2005-07-04 Alan Modra <amodra@bigpond.net.au>
361 * elf.c (assign_file_positions_for_segments): Remove excluded
362 sections from the segment map.
364 2005-07-04 Alan Modra <amodra@bigpond.net.au>
367 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
369 (_bfd_elf_get_special_section): Declare.
370 (bfd_elf_special_section): Update prototype.
371 * elf.c (special_sections): Remove unused outer entries.
372 (get_special_section): Delete.
373 (_bfd_elf_get_special_section): New function.
374 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
375 special_sections indexing.
376 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
377 * elf32-arm.c (symbian_special_sections_d): Delete.
378 (symbian_special_sections_g, symbian_special_sections_h): Delete.
379 (symbian_special_sections_i, symbian_special_sections_f): Delete.
380 (symbian_special_sections_p): Delete.
381 (elf32_arm_symbian_special_sections): Merge above to here.
382 (elf32_arm_symbian_get_sec_type_attr): New function.
383 (elf_backend_special_sections): Don't define.
384 (elf_backend_get_sec_type_attr): Define.
385 * elf32-m32r.c: Similarly to elf32-arm.c.
386 * elf32-m68hc11.c: Likewise.
387 * elf32-m68hc12.c: Likewise.
388 * elf32-mcore.c: Likewise.
389 * elf32-sh64.c: Likewise.
390 * elf32-v850.c: Likewise.
391 * elf32-xtensa.c: Likewise.
392 * elf64-alpha.c: Likewise.
393 * elf64-hppa.c: Likewise.
394 * elf64-ppc.c: Likewise.
395 * elf64-sh64.c: Likewise.
396 * elfxx-ia64.c: Likewise.
397 * elfxx-mips.c: Likewise.
398 * elf32-ppc.c: Likewise.
399 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
400 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
401 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
402 (elf_backend_get_sec_type_attr): Define.
403 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
404 (elf_backend_special_sections): Don't define.
407 2005-07-01 Nick Clifton <nickc@redhat.com>
409 * cpu-d10v.c: Update to ISO C90 style function declarations and
411 * cpu-d30v.c: Likewsie.
412 * cpu-i370.c: Likewsie.
413 * cpu-xstormy16.c: Likewsie.
414 * elf32-arc.c: Likewsie.
415 * elf32-d10v.c: Likewsie.
416 * elf32-d30v.c: Likewsie.
417 * elf32-dlx.c: Likewsie.
418 * elf32-i370.c: Likewsie.
419 * elf32-i960.c: Likewsie.
420 * elf32-ip2k.c: Likewsie.
421 * elf32-m32r.c: Likewsie.
422 * elf32-mcore.c: Likewsie.
423 * elf32-openrisc.c: Likewsie.
424 * elf32-or32.c: Likewsie.
425 * elf32-pj.c: Likewsie.
426 * elf32-v850.c: Likewsie.
427 * elf32-xstormy16.c: Likewsie.
429 2005-07-01 Alan Modra <amodra@bigpond.net.au>
431 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
433 (elf64_alpha_create_dynamic_sections): Always make new sections
434 by using bfd_make_section_anyway_with_flags. Check that .got not
436 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
439 2005-06-30 Alan Modra <amodra@bigpond.net.au>
441 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
442 _SDA_BASE_ and _SDA2_BASE_ symbols.
443 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
444 sym if not def_regular.
445 (_bfd_elf_provide_section_bound_symbols): Similarly.
447 2005-06-30 Ben Elliston <bje@gnu.org>
449 * config.bfd: Mark as obsolete:
454 2005-06-29 Alan Modra <amodra@bigpond.net.au>
456 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
457 .eh_frame specially..
458 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
459 Don't recheck sections we have already marked.
460 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
461 * section.c (struct bfd_section): Add gc_mark_from_eh.
462 (STD_SECTION): Adjust.
463 * ecoff.c (bfd_debug_section): Adjust.
464 * bfd-in2.h: Regenerate.
466 2005-06-29 Alan Modra <amodra@bigpond.net.au>
468 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
469 not been processed by check_relocs.
471 2005-06-29 Paul Brook <paul@codesourcery.com>
473 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
474 * bfd-in2.h: Regenerate.
475 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
477 * elflink.c (bfd_elf_set_symbol): Add section argument.
478 (_bfd_elf_provide_symbol): Ditto.
479 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
481 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
483 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
485 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
486 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
487 (struct elf32_hppa_link_hash_table): Use etab and bstab.
488 (stub_hash_newfunc): Use hh.
489 (hppa_link_hash_newfunc): Use hsh_cache.
490 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
491 (elf32_hppa_link_hash_table_free): Use bstab.
492 (hppa_stub_name): Use eh.
493 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
494 (hppa_add_stub): Use bstab.
495 (hppa_type_of_stub): Use eh.
496 (hppa_build_one_stub): Use hh and bh_root.
497 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
498 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
499 (elf32_hppa_gc_sweep_hook): Use hdh_next.
500 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
501 (allocate_plt_static): Use etab.
502 (allocate_dynrelocs): Use etab, and hdh_next.
503 (readonly_dynrelocs): Use hdh_next.
504 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
505 (get_local_syms): Use eh, bstab, and hh.
506 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
507 (elf32_hppa_set_gp): Use etab.
508 (elf32_hppa_build_stubs): Use bstab.
509 (final_link_relocate): Use eh, bh_root.
510 (elf32_hppa_relocate_section): Use elf, etab.
511 (elf32_hppa_finish_dynamic_sections): Use etab.
513 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
515 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
518 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
520 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
521 (hppa_stub_hash_entry): Define.
522 (stub_hash_newfunc): Rename variables.
523 (hppa_link_hash_newfunc): Likewise.
524 (elf32_hppa_link_hash_table_free): Likewise.
525 (hppa_stub_name): Likewise.
526 (hppa_get_stub_entry): Likewise.
527 (hppa_add_stub): Likewise.
528 (hppa_type_of_stub): Likewise.
529 (hppa_build_one_stub): Likewise.
530 (hppa_size_one_stub): Likewise.
531 (elf32_hppa_create_dynamic_sections): Likewise.
532 (elf32_hppa_copy_indirect_symbol): Likewise.
533 (elf32_hppa_check_relocs): Likewise.
534 (elf32_hppa_gc_mark_hook): Likewise.
535 (elf32_hppa_gc_sweep_hook): Likewise.
536 (elf32_hppa_grok_psinfo): Likewise.
537 (elf32_hppa_hide_symbol): Likewise.
538 (elf32_hppa_adjust_dynamic_symbol): Likewise.
539 (allocate_dynrelocs): Likewise.
540 (clobber_millicode_symbols): Likewise.
541 (readonly_dynrelocs): Likewise.
542 (elf32_hppa_size_dynamic_sections): Likewise.
543 (get_local_syms): Likewise.
544 (elf32_hppa_size_stubs): Likewise.
545 (hppa_record_segment_addr): Likewise.
546 (final_link_relocate): Likewise.
547 (elf32_hppa_relocate_section): Likewise.
548 (elf32_hppa_finish_dynamic_symbol): Likewise.
550 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
553 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
555 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
556 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
557 * elf32-cris.c (cris_elf_check_relocs): Likewise.
558 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
559 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
560 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
561 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
562 * elf32-i370.c (i370_elf_check_relocs): Likewise.
563 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
564 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
565 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
566 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
567 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
568 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
569 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
570 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
571 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
572 * elf32-s390.c (elf_s390_check_relocs): Likewise.
573 * elf32-sh.c (sh_elf_check_relocs): Likewise.
574 * elf32-v850.c (v850_elf_check_relocs): Likewise.
575 * elf32-vax.c (elf_vax_check_relocs): Likewise.
576 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
577 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
578 * elf64-s390.c (elf_s390_check_relocs): Likewise.
579 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
580 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
581 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
583 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
586 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
589 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
592 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
593 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
595 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
597 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
598 BFD_RELOC_X86_64_GOTPC32.
599 * bfd-in2.h: Regenerated.
601 2005-06-17 Jakub Jelinek <jakub@redhat.com>
603 * elf.c (bfd_section_from_shdr): Kill bogus warning.
605 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
606 symbol, relocation, group or versym sections.
608 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
610 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
611 doesn't point into the section.
613 2005-06-17 Jan Beulich <jbeulich@novell.com>
615 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
616 and BFD_RELOC_X86_64_GOTPC32.
617 * libbfd.h (bfd_reloc_code_real_names): Likewise.
618 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
619 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
620 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
621 and R_X86_64_GOTPC32.
622 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
623 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
624 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
625 (elf64_x86_64_relocate_section): Likewise.
626 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
628 2005-06-15 Mark Kettenis <kettenis@gnu.org>
630 * archive.c: Include "libiberty.h".
632 2005-06-15 Nick Clifton <nickc@redhat.com>
634 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
635 produced by the GreenHills toolchain can be assimilated.
637 2005-06-14 Steve Ellcey <sje@cup.hp.com>
639 * som.c (som_find_inliner_info): New.
641 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
643 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
645 2005-06-14 Jakub Jelinek <jakub@redhat.com>
647 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
648 Prevent endless recursion on broken objects.
650 * archive.c (do_slurp_coff_armap): Check for overflows.
652 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
654 * elfcode.h (elf_write_relocs): Do nothing if there are no
657 2005-06-10 Alan Modra <amodra@bigpond.net.au>
659 * dwarf2.c (decode_line_info): Revert last change. Instead set
660 initial low_pc to -1 to avoid need to test whether loc_pc has
663 2005-06-09 Christopher Faylor <cgf@timesys.com>
665 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
666 either SEC_ALLOC OR SEC_LOAD.
668 2005-06-09 Christopher Faylor <cgf@timesys.com>
670 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
671 section header. Do not add STYP_NOLOAD since it does not appear to be
674 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
677 * dwarf2.c (lookup_address_in_line_info_table): Restore code
678 handling NULL function info, removed with 2005-04-03 change.
680 2005-06-08 Mark Mitchell <mark@codesourcery.com>
682 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
684 2005-06-09 Alan Modra <amodra@bigpond.net.au>
686 * elflink.c (elf_mark_used_section): Delete.
687 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
688 * reloc.c (bfd_mark_used_section): New function.
689 (bfd_generic_gc_sections): Call bfd_mark_used_section.
691 2005-06-08 Alan Modra <amodra@bigpond.net.au>
693 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
696 2005-06-07 Mark Mitchell <mark@codesourcery.com>
698 * opncls.c (bfd_fdopenr): Add missing break statements.
700 2005-06-07 Mark Mitchell <mark@codesourcery.com>
702 * opncls.c (bfd_fopen): New API.
704 (bfd_fdopenr): Likewise.
705 * bfd-in2.h: Regenerated.
707 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
708 Michael Snyder <msnyder@redhat.com>
709 Stan Cox <scox@redhat.com>
711 * Makefile.am (ALL_MACHINES): Add ms1 support.
712 (ALL_MACHINES_CFILES): Same.
713 (BFD32_BACKENDS): Same.
714 (BFD32_BACKENDS_CFILES): Same.
716 * Makefile.in: Regenerate.
718 * archures.c (bfd_architecture): Add ms1 entries.
719 Externalize bfd_ms1_arch.
720 (bfd_archures_list): Add bfd_ms1_arch.
722 * bfd-in2.h: Regenerate.
724 * cpu-ms1.c: New file.
726 * elf32-ms1.c: New file.
728 * targets.c: Define extern of bfd_elf32_ms1_vec.
729 Add bfd_elf32_ms1_vec to _bfd_target_vector.
731 * configure.in: Add bfd_elf32_ms1_vec case.
733 * configure: Regenerate.
735 * config.bfd: Add ms1-*-elf to table.
737 2005-06-07 Zack Weinberg <zack@codesourcery.com>
739 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
741 2005-06-07 Alan Modra <amodra@bigpond.net.au>
743 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
744 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
746 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
749 * bfd.c (bfd_find_line): New.
751 * dwarf2.c (comp_unit): Add variable_table.
752 (funcinfo): Add file, line, and sec.
754 (lookup_symbol_in_function_table): New.
755 (lookup_symbol_in_variable_table): New.
756 (scan_unit_for_functions): Renamed to ...
757 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
759 (comp_unit_find_nearest_line): Updated.
760 (comp_unit_find_line): New.
761 (_bfd_dwarf2_find_line): New.
763 * elf-bfd.h (_bfd_elf_find_line): New.
764 (_bfd_generic_find_line): New. Defined.
766 * elf.c (_bfd_elf_find_line): New.
768 * libbfd-in.h (_bfd_dwarf2_find_line): New.
769 (_bfd_generic_find_line): New.
771 * bfd-in2.h: Regenerated.
772 * libbfd.h: Likewise.
774 * libbfd.c (_bfd_generic_find_line): New.
776 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
777 with _bfd_generic_find_line.
778 (bfd_target): Add _bfd_find_line.
780 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
782 * dwarf2.c (decode_line_info): Properly set low_pc.
784 2005-06-06 Alan Modra <amodra@bigpond.net.au>
786 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
787 case, include addend when indexing .opd section map.
788 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
789 clear opd_adjust array if no_opd_opt set. Tidy code.
790 Ignore zero size .opd. Check bfd_alloc return value.
791 (ppc_stub_name): Return immediately on bfd_malloc fail.
792 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
794 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
796 * dwarf2.c (comp_unit): Fix a typo in comment.
798 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
800 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
801 (reloc_type_lookup): Dito.
802 (elf_vax_discard_copies): Dito.
803 (elf_vax_instantiate_got_entries): Dito.
804 (elf_vax_link_hash_traverse): Dito.
805 (elf_vax_link_hash_newfunc): Dito.
806 (elf_vax_link_hash_table_create): Dito.
807 (elf32_vax_set_private_flags): Dito.
808 (elf32_vax_merge_private_bfd_data): Dito.
809 (elf32_vax_print_private_bfd_data): Dito.
810 (elf_vax_check_relocs): Dito.
811 (elf_vax_gc_mark_hook): Dito.
812 (elf_vax_gc_sweep_hook): Dito.
813 (elf_vax_size_dynamic_sections): Dito.
814 (elf_vax_discard_copies): Dito.
815 (elf_vax_instantiate_got_entries): Dito.
816 (elf_vax_relocate_section): Dito.
817 (elf_vax_finish_dynamic_symbol): Dito.
818 (elf_vax_finish_dynamic_sections): Dito.
819 (elf_vax_hash_table): Break-up of line isn't needed.
820 (elf_vax_check_relocs): Remove leading whitespace
821 (elf_vax_relocate_section): Remove redundant whitespace
822 (elf_vax_link_hash_newfunc): Don't cast NULL.
823 (elf_vax_link_hash_table_create): Dito.
824 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
826 2005-06-03 Alan Modra <amodra@bigpond.net.au>
829 * configure.in: Bump version
830 * configure: Regenerate.
831 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
832 discarded section sym refs and kill linker output.
833 * simple.c (simple_dummy_einfo): New function.
834 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
836 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
839 2005-06-02 Alan Modra <amodra@bigpond.net.au>
841 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
842 restrictive of func code and func descr for undefined syms as well
845 2005-05-31 Jim Blandy <jimb@redhat.com>
847 * Makefile.am: Regenerate dependencies with 'make dep-am'.
848 * Makefile.in: Regenerate.
850 2005-05-31 Richard Henderson <rth@redhat.com>
852 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
853 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
854 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
855 (elf64_alpha_want_plt): Update to match.
856 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
857 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
859 2005-05-31 Zack Weinberg <zack@codesourcery.com>
861 * elf32-arm.c (elf32_arm_reloc_type_lookup)
862 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
863 Use ISO C90 function declaration style.
865 2005-05-31 James E Wilson <wilson@specifixinc.com>
867 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
868 header PF_R flag on PT_LOAD segments.
870 2005-05-30 Richard Henderson <rth@redhat.com>
872 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
873 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
875 2005-05-29 Richard Henderson <rth@redhat.com>
877 * configure.in (--enable-secureplt): New.
878 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
879 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
880 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
881 (elf64_alpha_use_secureplt): New.
882 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
883 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
884 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
885 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
886 (struct alpha_elf_link_hash_entry): Add plt_offset.
887 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
888 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
889 (PLT_ENTRY_WORD3): Remove.
890 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
891 on .plt and create .got.plt.
892 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
893 (get_got_entry): Initialize plt_offset.
894 (elf64_alpha_want_plt): New.
895 (elf64_alpha_check_relocs): Use it.
896 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
898 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
900 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
902 (elf64_alpha_size_plt_section): Size .got.plt section.
903 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
905 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
906 Add PLTRO DYNAMIC entry.
907 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
908 (elf64_alpha_finish_dynamic_sections): Likewise.
910 2005-05-28 David Daney <ddaney@avtrex.com>
912 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
913 calculation of DT_RELSZ to occur after all dynamic relocations
916 2005-05-28 Eli Zaretskii <eliz@gnu.org>
918 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
919 * config.in, configure: Regenerate.
921 2005-05-26 Mark Kettenis <kettenis@gnu.org>
922 Maciej W. Rozycki <macro@linux-mips.org>
924 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
925 stop processing of options if one of invalid size is
927 (_bfd_mips_elf_section_from_shdr): Likewise.
928 (_bfd_mips_elf_fake_sections): Reset the type of empty special
931 2005-05-26 Richard Henderson <rth@redhat.com>
933 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
934 plt_old_section, plt_old_value.
935 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
936 (elf64_alpha_size_plt_section_1): Don't use it.
938 2005-05-26 Jakub Jelinek <jakub@redhat.com>
940 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
941 first shdr has sh_size == 0. Fail if e_shnum is large to cause
942 arithmetic overflow when allocating the i_shdr array.
943 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
945 2005-05-25 Richard Henderson <rth@redhat.com>
947 * elf64-alpha.c: Update all function definitions to ISO C. Remove
948 all function prototypes; rearrange functions into def-use order.
950 2005-05-25 Richard Henderson <rth@redhat.com>
952 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
953 in the presence of deleting elements.
954 (elf64_alpha_size_got_sections): Zero dead got section size.
956 2005-05-23 Fred Fish <fnf@specifixinc.com>
958 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
959 (struct funcinfo): Add caller_func, caller_file, caller_line.
960 tag, and nesting_level members.
961 (lookup_address_in_function_table): Change first passed parameter
962 from "struct funcinfo *" to "struct comp_unit *".
963 (lookup_address_in_function_table): Dereference unit to find function
965 (lookup_address_in_function_table): Traverse the function list to
966 create a chain of inlined functions back to the first non inlined
968 (scan_unit_for_functions): Remember tag and nesting level. Handle
969 DW_AT_call_file and DW_AT_call_line.
970 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
971 call to pass unit pointer instead of function table pointer. For
972 inlined functions, save pointer to the inliner chain.
973 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
974 (_bfd_dwarf2_find_inliner_info): New function that returns information
975 from the inliner chain after a call to bfd_find_nearest_line.
977 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
978 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
979 NAME##_find_inliner_info.
980 (bfd_target): Add _bfd_find_inliner_info.
981 * bfd-in2.h: Regenerate.
983 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
984 macro that always returns bfd_false.
985 (_bfd_dwarf2_find_inliner_info): Declare.
986 * libbfd.h: Regenerate.
988 * elf32-arm.c (elf32_arm_find_inliner_info): New function
989 that calls _bfd_dwarf2_find_inliner_info.
990 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
992 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
993 that calls _bfd_dwarf2_find_inliner_info.
994 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
995 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
996 _bfd_mips_elf_find_inliner_info.
997 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
998 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1000 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1001 _bfd_dwarf2_find_inliner_info.
1002 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1003 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1004 _bfd_elf_find_inliner_info.
1006 * coffgen.c (coff_find_inliner_info): New function that
1007 calls _bfd_dwarf2_find_inliner_info.
1008 * libcoff-in.h (coff_find_inliner_info): Declare.
1009 * libcoff.h: Regenerate.
1010 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1011 (pmac_xcoff_vec) Ditto.
1012 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1013 (aix5coff64_vec): Ditto.
1015 * aout-target.h (MY_find_inliner_info): Define as
1016 _bfd_nosymbols_find_inliner_info.
1017 * aout-tic30.c (MY_find_inliner_info): Ditto.
1018 * binary.c (binary_find_inliner_info): Ditto.
1019 * i386msdos.c (msdos_find_inliner_info): Ditto.
1020 * ihex.c (ihex_find_inliner_info): Ditto.
1021 * libaout.h (aout_32_find_inliner_info): Ditto.
1022 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1023 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1024 * mmo.c (mmo_find_inliner_info): Ditto.
1025 * nlm-target.h (nlm_find_inliner_info): Ditto.
1026 * pef.c (bfd_pef_find_inliner_info): Ditto.
1027 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1028 * srec.c (srec_find_inliner_info): Ditto.
1029 * tekhex.c (tekhex_find_inliner_info): Ditto.
1030 * versados.c (versados_find_inliner_info): Ditto.
1031 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1033 * ieee.c (ieee_find_inliner_info): New function that always
1035 * oasys.c (oasys_find_inliner_info): Ditto.
1036 * vms.c (vms_find_inliner_info): Ditto.
1038 2005-05-24 Alan Modra <amodra@bigpond.net.au>
1040 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1041 force old plt layout.
1043 2005-05-22 Richard Henderson <rth@redhat.com>
1045 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1047 (elf64_alpha_check_relocs): Likewise.
1048 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1049 non-allocated sections.
1051 2005-05-22 Richard Henderson <rth@redhat.com>
1053 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1054 undefweak to use zero register. Call elf64_alpha_relax_got_load
1055 if not all uses removed.
1056 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1057 (elf64_alpha_relax_section): Handle undefweak symbols.
1058 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1059 (elf64_alpha_size_rela_got_1): Likewise.
1060 (elf64_alpha_relocate_section): Likewise.
1062 2005-05-22 Richard Henderson <rth@redhat.com>
1064 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1065 on SEC_CODE sections.
1067 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1069 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1071 (som_write_space_strings): Change type of tmp_space and p to char *.
1072 (som_write_symbol_strings): Likewise. Also change type of comp to
1074 (som_begin_writing): Change type of strings_size to unsigned int.
1075 (som_finish_writing): Likewise.
1076 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1078 * som.h (struct som_section_data_struct): Change type of reloc_stream
1079 field to unsigned char *.
1081 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1083 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1084 copy relocations for VxWorks.
1086 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1088 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1090 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1091 (ppc_elf_check_relocs): Set has_sda_refs.
1092 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1093 copy relocations. Use has_sda_refs to place variables in .sbss.
1094 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1097 2005-05-20 Bob Wilson <bob.wilson@acm.org>
1099 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1100 xtensa_default_isa is initialized.
1102 2005-05-20 Alan Modra <amodra@bigpond.net.au>
1104 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1105 for second and subsequent list entries. Only allocate multiple
1106 glink stubs when shared or pie.
1107 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1108 glink stub is needed.
1110 2005-05-19 Zack Weinberg <zack@codesourcery.com>
1112 * Makefile.am: Have 'all' depend on 'info'.
1113 * Makefile.in: Regenerate.
1115 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1117 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1118 init_offset. Add init_got_refcount, init_plt_refcount,
1119 init_got_offset and init_plt_offset.
1120 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1121 (_bfd_elf_link_hash_hide_symbol): Likewise.
1122 (_bfd_elf_link_hash_table_init): Likewise.
1123 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1124 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1125 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1126 (bfd_elf_size_dynamic_sections): Likewise.
1127 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1128 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1129 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1130 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1131 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1132 (struct plt_entry): New.
1133 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1134 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1135 use _bfd_elf_link_hash_copy_indirect.
1136 (update_plt_info, find_plt_ent): New functions.
1137 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1138 and adjust for use of plt list rather than refcount.
1139 (ppc_elf_gc_sweep_hook): Likewise.
1140 (ppc_elf_tls_optimize): Likewise.
1141 (ppc_elf_adjust_dynamic_symbol): Likewise.
1142 (allocate_dynrelocs): Likewise.
1143 (ppc_elf_relax_section): Likewise.
1144 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1145 when performing a relocatable link.
1146 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1147 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1150 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1152 * elf.c (assign_file_positions_for_segments): Use maximum of
1153 maxpagesize and section alignment when adjusting initial
1154 segment offset and section offsets.
1156 2005-05-18 Zack Weinberg <zack@codesourcery.com>
1158 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1161 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1163 * elf.c (group_signature): Undo the last change. Check if the
1164 symbol table section is correct.
1166 2005-05-17 Zack Weinberg <zack@codesourcery.com>
1168 * elf32-arm.c: Wherever possible, use official reloc names
1170 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1171 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1172 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1173 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1174 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1175 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1176 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1177 Add many new relocations from AAELF.
1178 (elf32_arm_howto_from_type): Update to match.
1179 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1180 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1181 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1182 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1183 (elf32_arm_final_link_relocate): Add support for
1184 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1185 case entries redundant with default.
1187 * reloc.c: Reorganize ARM relocations. Add Thumb
1188 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1189 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1190 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1191 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1192 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1193 * bfd-in2.h, libbfd.h: Regenerate.
1195 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1197 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1199 * format.c (bfd_check_format_matches): Set output_has_begun
1201 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1202 special case for both_direction.
1204 2005-05-17 Nick Clifton <nickc@redhat.com>
1206 * elf.c (group_signature): Check for a group section which is
1207 actually a (corrupt) symbol table section in disguise and prevent
1208 an infinite loop from occurring.
1210 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1212 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1215 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1217 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1218 predicate on slot 0 only if slot 0 isn't br.
1220 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1223 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1224 empty sdynbss section.
1225 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1227 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
1229 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1232 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1234 * elf32-ppc.c (LIS_11. LIS_12): Define.
1235 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1236 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1237 for --data-plt when building non-pie executables.
1239 2005-05-17 Nick Clifton <nickc@redhat.com>
1241 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1242 the situation where a symbols's section is not known but a section
1243 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1246 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1247 the presence of a symbol table to just before the symbol table is
1250 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1253 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1254 (elfNN_ia64_relax_section): Use it.
1256 2005-05-14 Mark Kettenis <kettenis@gnu.org>
1258 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1261 2005-05-14 Alan Modra <amodra@bigpond.net.au>
1263 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1265 (ppc_elf_finish_dynamic_sections): Likewise.
1267 2005-05-13 Fred Fish <fnf@specifixinc.com>
1269 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1270 * libbfd.h: Rebuilt.
1272 2005-05-13 Bob Wilson <bob.wilson@acm.org>
1274 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1275 periods in linkonce_kind values.
1277 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1279 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1280 against protected function when building executable.
1282 2005-05-12 Alan Modra <amodra@bigpond.net.au>
1284 * elf32-ppc.c (LWZU_0_X_11): Delete.
1285 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1286 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1287 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1289 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1291 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1292 Generate .glink branch table and updated stubs.
1294 2005-05-11 Alan Modra <amodra@bigpond.net.au>
1296 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1297 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1298 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1299 (CROR_151515, CROR_313131): Delete.
1300 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1301 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1302 LWZU_0_X_11): Define.
1303 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1304 and R_PPC_REL16_HA entries.
1305 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1306 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1307 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1308 new_plt, and old_plt.
1309 (ppc_elf_create_dynamic_sections): Create .glink section.
1310 (ppc_elf_check_relocs): Set new_plt and old_plt.
1311 (ppc_elf_select_plt_layout): New function.
1312 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1313 (allocate_got): Handle differences between old and new got layout.
1314 (allocate_dynrelocs): Likewise for plt.
1315 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1316 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1317 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1318 destination of R_PPC_PLTREL24 relocs.
1319 (ppc_elf_relocate_section): Handle new relocs and changed destination
1321 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1322 differences in layout.
1323 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1324 put a blrl in new got. Write glink contents.
1325 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1326 * libbfd.h: Regenerate.
1327 * bfd-in2.h: Regenerate.
1329 2005-05-11 Andreas Schwab <schwab@suse.de>
1331 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1334 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1336 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1337 section if SEC_ALLOC isn't set.
1339 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1341 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1342 * acinclude.m4: Don't sinclude accross.m4.
1343 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1345 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1347 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1348 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1349 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1350 (func_desc_adjust): Hide fake function descriptors when function
1351 code entry is defined.
1352 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1354 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1356 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1358 2005-05-08 Dave Korn <dave.korn@artimi.com>
1360 * coff-tic80.c: Undefine _CONST after system headers to prevent
1361 clash with tic80-specific definition in include/coff/tic80.h
1363 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1366 * elflink.c (elf_link_output_extsym): Use output_bfd if
1367 h->root.u.def.section is bfd_abs_section_ptr when reporting
1370 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1372 * elf-bfd.h (elf_backend_data): Update special_sections to
1373 array of pointer to bfd_elf_special_section.
1374 * elf.c (special_sections): Likewise.
1375 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1376 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1377 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1378 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1379 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1380 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1381 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1382 * elf32-v850.c (v850_elf_special_sections): Likewise.
1383 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1384 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1385 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1386 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1387 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1388 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1389 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1390 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1392 * elf.c (get_special_section): Updated.
1394 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1396 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1397 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1398 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1400 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1401 * elf32-frv.c (_frv_create_got_section): Likewise.
1402 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1403 (elf_backend_got_symbol_offset): Don't define.
1404 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1405 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1407 (ppc_elf_create_got): Tidy.
1408 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1409 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1410 (ppc_elf_gc_sweep_hook): Likewise.
1411 (ppc_elf_relocate_section): Likewise.
1412 (ppc_elf_finish_dynamic_symbol): Likewise.
1413 (allocate_got): New function.
1414 (allocate_dynrelocs): Use allocate_got.
1415 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1416 so that local got can refcount it. Set got_header_size.
1417 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1419 (ppc_elf_finish_dynamic_sections): Likewise.
1420 (elf_backend_got_symbol_offset): Don't define.
1421 (elf_backend_got_header_size): Ditto.
1423 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1425 * configure.in (ACX_HEADER_STRING): New.
1426 * configure: Regenerate.
1427 * config.in: Regenerate.
1428 * sysdep.h (STRING_WITH_STRINGS): Use.
1430 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1432 * elf.c (_bfd_elf_close_and_cleanup): Only call
1433 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1435 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1437 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1438 "__bss_start" instead of "_edata" as fallback.
1440 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1442 * bfd-in2.h: Regenerated.
1444 2005-05-05 Paul Brook <paul@codesourcery.com>
1446 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1447 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1449 * configure: Regenerate.
1450 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1451 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1452 (elf32-i386.lo): Depend on elf-vxworks.h.
1453 (elf-vxworks.lo): New rule.
1454 * Makefile.in: Regenerate.
1455 * elf-bfd.h (elf_backend_data): Update type of
1456 elf_backend_emit_relocs.
1457 (_bfd_elf_link_output_relocs): Update prototype.
1458 * elflink.c (_bfd_elf_link_output_relocs): Always use
1459 bed->elf_backend_emit_relocs when outputting relocations.
1460 * elfxx-target.h (elf_backend_emit_relocs): Default to
1461 _bfd_elf_link_output_relocs.
1462 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1463 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1464 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1465 (elf_i386_plt0_entry): Remove padding.
1466 (elf_i386_pic_plt0_entry): Ditto.
1467 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1468 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1469 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1470 plt0_pad_byte fields.
1471 (elf_i386_link_hash_table_create): Zero them.
1472 (elf_i386_create_dynamic_sections): Create static relocation section.
1473 (allocate_dynrelocs): Allocate space for static PLT relocations.
1474 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1475 symbols. Give PLT symbols function type. Don't strip PLT sections
1476 if we have exported symbols from them.
1477 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1478 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1480 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1481 Add relocation for GOT location. Fill in PLT static relocations.
1482 (elf_i386_vxworks_link_hash_table_create): New function.
1483 (elf_i386_vxworks_link_output_symbol_hook): New function.
1484 * elf-vxworks.h: New file.
1486 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1488 * section.c (bfd_make_section_anyway_with_flags): New.
1489 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1490 (bfd_make_section_with_flags): New.
1491 (bfd_make_section): Call bfd_make_section_with_flags.
1493 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1494 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1495 instead of bfd_make_section/bfd_make_section and don't call
1496 bfd_set_section_flags.
1497 (mn10300_elf_check_relocs): Likewise.
1498 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1499 * elf32-arm.c (create_got_section): Likewise.
1500 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1501 (elf32_arm_check_relocs): Likewise.
1502 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1503 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1504 (_frv_create_got_section): Likewise.
1505 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1506 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1507 (elf32_hppa_check_relocs): Likewise.
1508 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1509 (i370_elf_check_relocs): Likewise.
1510 * elf32-i386.c (create_got_section): Likewise.
1511 (elf_i386_check_relocs): Likewise.
1512 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1513 (create_got_section): Likewise.
1514 (m32r_elf_create_dynamic_sections): Likewise.
1515 (m32r_elf_check_relocs): Likewise.
1516 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1517 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1518 (ppc_elf_create_dynamic_sections): Likewise.
1519 (ppc_elf_add_symbol_hook): Likewise.
1520 (ppc_elf_check_relocs): Likewise.
1521 * elf32-s390.c (create_got_section): Likewise.
1522 (elf_s390_check_relocs): Likewise.
1523 * elf32-sh.c (create_got_section): Likewise.
1524 (sh_elf_create_dynamic_sections): Likewise.
1525 (sh_elf_check_relocs): Likewise.
1526 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1527 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1528 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1529 (add_extra_plt_sections): Likewise.
1530 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1531 (elf64_alpha_create_got_section): Likewise.
1532 (elf64_alpha_create_dynamic_sections): Likewise.
1533 (elf64_alpha_check_relocs): Likewise.
1534 * elf64-hppa.c (get_reloc_section): Likewise.
1535 (get_opd): Likewise.
1536 (get_plt): Likewise.
1537 (get_dlt): Likewise.
1538 (get_stub): Likewise.
1539 (elf64_hppa_create_dynamic_sectionso): Likewise.
1540 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1541 * elf64-ppc.c (create_linkage_sections): Likewise.
1542 (ppc64_elf_check_relocs): Likewise.
1543 * elf64-s390.c (create_got_section): Likewise.
1544 (elf_s390_check_relocs): Likewise.
1545 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1546 (sh64_elf64_create_dynamic_sections): Likewise.
1547 * elf64-x86-64.c (create_got_section): Likewise.
1548 (elf64_x86_64_check_relocs): Likewise.
1549 * elflink.c (_bfd_elf_create_got_section): Likewise.
1550 (_bfd_elf_link_create_dynamic_sections): Likewise.
1551 (elf_link_add_object_symbols): Likewise.
1552 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1553 (elfNN_ia64_create_dynamic_sections): Likewise.
1554 (get_fptr): Likewise.
1555 (get_pltoff): Likewise.
1556 (get_reloc_section): Likewise.
1557 (elfNN_ia64_object_p): Likewise.
1558 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1559 (mips_elf_create_compact_rel_section): Likewise.
1560 (mips_elf_create_got_section): Likewise.
1561 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1562 * elfxx-sparc.c (create_got_section): Likewise.
1563 (_bfd_sparc_elf_check_relocs): Likewise.
1565 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1566 on linker created sections.
1568 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1571 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1572 script on executable.
1574 2005-05-05 John Levon <levon@movementarian.org>
1576 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1577 allocated memory before returning.
1578 (decode_line_info): Likewise.
1579 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1580 allocated by functions in this file.
1581 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1582 * elf.c (_bfd_elf_close_and_cleanup): Call
1583 _bfd_dwarf2_cleanup_debug_info.
1585 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1587 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1588 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1589 * configure, config.in, Makefile.in: Regenerate.
1590 * sysdep.h (stpcpy): Revert last change.
1592 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1594 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1596 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1598 * elfxx-ia64.c (ARCH_SIZE): New.
1599 (LOG_SECTION_ALIGN): Likewise.
1600 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1601 align relocation sections.
1602 (get_fptr): Likewise.
1603 (get_reloc_section): Likewise.
1604 (elfNN_ia64_tprel_base): Likewise.
1605 (elfNN_ia64_check_relocs): Support 32bit relocations.
1606 (allocate_global_fptr_got): Likewise.
1607 (allocate_dynrel_entries): Likewise.
1608 (set_got_entry): Likewise.
1609 (set_pltoff_entry): Likewise.
1610 (elfNN_ia64_relocate_section): Likewise.
1612 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1614 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1615 * configure: Regenerate.
1616 * config.in: Likewise.
1618 * sysdep.h (stpcpy): New.
1620 2005-05-04 Nick Clifton <nickc@redhat.com>
1622 * Update the address and phone number of the FSF organization in
1623 the GPL notices in the following files:
1624 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1625 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1626 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1627 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1628 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1629 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1630 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1631 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1632 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1633 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1634 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1635 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1636 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1637 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1638 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1639 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1640 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1641 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1642 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1643 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1644 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1645 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1646 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1647 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1648 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1649 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1650 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1651 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1652 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1653 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1654 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1655 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1656 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1657 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1658 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1659 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1660 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1661 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1662 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1663 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1664 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1665 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1666 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1667 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1668 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1669 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1670 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1671 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1672 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1673 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1674 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1675 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1676 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1677 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1678 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1679 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1680 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1681 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1682 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1683 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1684 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1685 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1686 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1687 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1688 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1689 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1690 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1691 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1692 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1693 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1696 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1698 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1699 * bfd-in2.h: Regenerated.
1701 * elflink.c (bfd_elf_set_symbol): New.
1702 (_bfd_elf_provide_symbol): Call it.
1703 (_bfd_elf_provide_section_bound_symbols): New.
1705 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1707 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1708 at the end, if a strong definition has already been seen.
1710 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1712 * section.c (struct bfd_section): Replace link_order_head and
1713 link_order_tail with map_head and map_tail union.
1714 (STD_SECTION): Update.
1715 (_bfd_strip_section_from_output): Delete.
1716 * aoutx.h: Update throughout for above changes.
1717 * coff-ppc.c: Likewise.
1718 * cofflink.c: Likewise.
1719 * ecoff.c: Likewise.
1720 * elf-eh-frame.c: Likewise.
1721 * elf-m10300.c: Likewise.
1723 * elf32-arm.c: Likewise.
1724 * elf32-cris.c: Likewise.
1725 * elf32-hppa.c: Likewise.
1726 * elf32-i386.c: Likewise.
1727 * elf32-m32r.c: Likewise.
1728 * elf32-m68hc1x.c: Likewise.
1729 * elf32-m68k.c: Likewise.
1730 * elf32-ppc.c: Likewise.
1731 * elf32-s390.c: Likewise.
1732 * elf32-sh.c: Likewise.
1733 * elf32-vax.c: Likewise.
1734 * elf32-xtensa.c: Likewise.
1735 * elf64-alpha.c: Likewise.
1736 * elf64-hppa.c: Likewise.
1737 * elf64-ppc.c: Likewise.
1738 * elf64-s390.c: Likewise.
1739 * elf64-sh64.c: Likewise.
1740 * elf64-x86-64.c: Likewise.
1741 * elflink.c: Likewise.
1742 * elfxx-ia64.c: Likewise.
1743 * elfxx-mips.c: Likewise.
1744 * elfxx-sparc.c: Likewise.
1745 * linker.c: Likewise.
1746 * merge.c: Likewise.
1747 * pdp11.c: Likewise.
1748 * xcofflink.c: Likewise.
1749 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1750 out from bfd_elf_size_dynamic_sections.
1751 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1752 * bfd-in2.h: Regenerate.
1754 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1756 * section.c (bfd_section_list_remove): Don't clear s->next.
1757 (bfd_section_list_append): Always init s->prev.
1758 (bfd_section_list_prepend): Define.
1759 (bfd_section_list_insert_after): Minor optimization.
1760 (bfd_section_removed_from_list): Rewrite.
1761 * elf.c (assign_section_numbers): Simplify list traversal now that
1762 bfd_section_list_remove doesn't destroy removed section next ptr.
1763 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1764 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1765 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1766 * bfd-in2.h: Regenerate.
1768 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1770 * bfd.c (bfd): Remove section_tail and add section_last.
1771 (bfd_preserve): Likewise.
1772 (bfd_preserve_save): Likewise.
1773 (bfd_preserve_restore): Likewise.
1774 * opncls.c (_bfd_new_bfd): Likewise.
1776 * coffcode.h (coff_compute_section_file_positions): Updated.
1777 (coff_compute_section_file_positions): Likewise.
1778 * elf.c (assign_section_numbers): Likewise.
1779 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1780 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1781 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1782 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1783 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1784 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1786 * ecoff.c (bfd_debug_section): Initialize prev.
1788 * section.c (bfd_section): Add prev.
1789 (bfd_section_list_remove): Updated.
1790 (bfd_section_list_append): New.
1791 (bfd_section_list_insert_after): New.
1792 (bfd_section_list_insert_before): New.
1793 (bfd_section_list_insert): Removed.
1794 (bfd_section_removed_from_list): Updated.
1795 (STD_SECTION): Initialize prev.
1796 (bfd_section_init): Updated.
1797 (bfd_section_list_clear): Updated.
1799 * bfd-in2.h: Regenerated.
1801 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1803 * elf.c (_bfd_elf_new_section_hook): Don't call
1804 _bfd_elf_get_sec_type_attr on sections from input files.
1806 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1808 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1809 hash table size 16699 instead of bfd_hash_table_init.
1811 2005-05-01 Paul Brook <paul@codesourcery.com>
1813 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1814 definition has already been seen.
1816 2005-05-01 Paul Brook <paul@codesourcery.com>
1818 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1819 R_ARM_PLT32 the same as R_ARM_PC24.
1820 (arm_add_to_rel): Ditto.
1822 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1824 * config.bfd: Add h8300*-*-rtemscoff.
1825 Switch h8300*-*-rtems* to elf.
1827 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1829 * aclocal.m4, Makefile.in: Regnerated.
1831 2005-04-28 Paul Brook <paul@codesourcery.com>
1833 Merge changes only applied to Makefile.in.
1834 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1835 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1836 (elfxx-sparc.lo): New rule.
1837 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1838 (elf64-sparc.lo): Likewise.
1840 2005-04-28 Julian Brown <julian@codesourcery.com>
1842 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1845 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1847 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1849 * elf.c (bfd_elf_sym_name): Updated.
1850 (group_signature): Likewise.
1851 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1852 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1853 (ppc64_elf_edit_toc): Likewise.
1854 (ppc64_elf_relocate_section): Likewise.
1855 * elfcode.h (elf_slurp_symbol_table): Likewise.
1856 * elflink.c (elf_link_input_bfd): Likewise.
1858 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1859 bfd_elf_sym_name to get local symbol name when reporting errors.
1861 2005-04-27 Nick Clifton <nickc@redhat.com>
1863 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1864 formatted input file results in a reloc which has no associated
1867 2005-04-26 Jerome Guitton <guitton@gnat.com>
1869 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1871 2005-04-25 David S. Miller <davem@davemloft.net>
1873 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1874 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1875 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1878 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1881 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1882 to discarded section an error.
1884 2005-04-21 Jerome Guitton <guitton@gnat.com>
1886 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1887 corresponding AC_CHECK_DECLS.
1888 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1890 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1891 * configure: Regenerate.
1894 2005-04-21 Andreas Schwab <schwab@suse.de>
1896 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1897 unsigned from type of dynamic_interpreter.
1898 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1901 * elf.c (assign_section_numbers): Fix comment.
1903 2005-04-21 Jerome Guitton <guitton@gnat.com>
1905 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1906 for struct som_exec_auxhdr fields.
1908 2005-04-21 Nick Clifton <nickc@redhat.com>
1910 * aout-adobe.c: Convert to ISO C and fix formatting.
1911 * aout-arm.c: Convert to ISO C and fix formatting.
1912 * aout-cris.c: Convert to ISO C and fix formatting.
1913 * aout-ns32k.c: Convert to ISO C and fix formatting.
1914 * aout-tic30.c: Convert to ISO C and fix formatting.
1915 * coffcode.h: Convert to ISO C and fix formatting.
1916 * coffswap.h: Convert to ISO C and fix formatting.
1917 * i386aout.c: Convert to ISO C and fix formatting.
1918 * libaout.h: Convert to ISO C and fix formatting.
1919 * libcoff-in.h: Convert to ISO C and fix formatting.
1920 * libcoff.h: Convert to ISO C and fix formatting.
1921 * libecoff.h: Convert to ISO C and fix formatting.
1922 * libnlm.h: Convert to ISO C and fix formatting.
1923 * libpei.h: Convert to ISO C and fix formatting.
1924 * libxcoff.h: Convert to ISO C and fix formatting.
1925 * nlm-target.h: Convert to ISO C and fix formatting.
1926 * nlm.c: Convert to ISO C and fix formatting.
1927 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1928 * nlm32-i386.c: Convert to ISO C and fix formatting.
1929 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1930 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1931 * nlmcode.h: Convert to ISO C and fix formatting.
1932 * nlmswap.h: Convert to ISO C and fix formatting.
1933 * pe-mips.c: Convert to ISO C and fix formatting.
1934 * peXXigen.c: Convert to ISO C and fix formatting.
1935 * peicode.h: Convert to ISO C and fix formatting.
1936 * vms-gsd.c: Convert to ISO C and fix formatting.
1937 * vms-hdr.c: Convert to ISO C and fix formatting.
1938 * vms-misc.c: Convert to ISO C and fix formatting.
1939 * vms-tir.c: Convert to ISO C and fix formatting.
1940 * vms.c: Convert to ISO C and fix formatting.
1941 * vms.h: Convert to ISO C and fix formatting.
1943 * coffgen.c (coff_print_symbol): Restore correct formatting of
1946 2005-04-20 David S. Miller <davem@davemloft.net>
1948 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1949 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1950 (allocate_dynrelocs): Likewise.
1952 2005-04-20 Jerome Guitton <guitton@gnat.com>
1954 * configure.in: Fix the check for basename declaration. Add check
1955 for declarations of ftello, ftello64, fseeko, fseeko64.
1956 * configure: Regenerate.
1958 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1960 2005-04-19 David S. Miller <davem@davemloft.net>
1962 * elfxx-sparc.c: New file.
1963 * elfxx-sparc.h: New file.
1964 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1965 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1966 (elfxx-sparc.lo): New rule.
1967 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1968 (elf64-sparc.lo): Likewise.
1969 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1970 (bfd_elf64_sparc_vec): Likewise.
1971 * configure: Regenerate.
1972 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1973 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1974 which is more consistent with elf32-sparc.c
1976 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1978 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1979 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1981 2005-04-19 Alan Modra <amodra@bigpond.net.au>
1983 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1984 dynamic relocs in non-SEC_ALLOC sections.
1985 (ppc_elf_gc_sweep_hook): Likewise.
1986 (ppc_elf_relax_section): Likewise.
1987 (ppc_elf_relocate_section): Likewise.
1989 2005-04-18 Nick Clifton <nickc@redhat.com>
1991 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1992 assigning a value to return_value.
1994 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1997 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2000 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2003 * elf.c (setup_group): Properly handle zero group count.
2005 2005-04-17 Mark Kettenis <kettenis@gnu.org>
2007 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2008 (som_is_subspace, compare_subspaces, som_compute_checksum)
2009 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2011 (hppa_som_reloc, compare_syms, compare_subspaces)
2012 (som_print_symbol, som_get_section_contents)
2013 (som_set_section_contents): Remove space after 'void *'.
2014 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2015 (som_bfd_merge_private_bfd_data)
2016 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2019 2004-04-15 Julian Brown <julian@codesourcery.com>
2021 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2022 * bfd-in2.h: Regenerate.
2023 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2024 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2025 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2026 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2027 relocations if requested to.
2028 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2029 use_blx rather than symbian_p.
2030 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2031 use_blx is in effect.
2032 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2035 2005-04-15 Nick Clifton <nickc@redhat.com>
2037 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2040 2005-04-15 Alan Modra <amodra@bigpond.net.au>
2043 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2044 used as a list pointer.
2046 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2048 * Makefile.am (NO_WERROR): Define.
2049 * warning.m4: New file
2050 * acinclude.m4: Include warning.m4.
2051 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2052 * Makefile.in: Regenerate.
2053 * configure: Regenerate.
2055 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2057 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2058 Write trailing padding.
2060 * merge.c (merge_strings): Round up section size for alignment.
2062 2005-04-14 David S. Miller <davem@davemloft.net>
2064 Add TLS support for 64-bit Sparc ELF.
2065 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2066 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2067 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2068 sparc64_elf_hash_entry, sparc64_elf_tdata,
2069 sparc64_elf_local_got_tls_type): New defines.
2070 (sparc64_elf_mkobject): New function.
2071 (sparc64_elf_link_hash_table): Add members for dynamic linker
2072 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2073 uion to track TLS GOT references. Add sym_sec to cache
2074 mappings from local sym to section.
2075 (link_hash_newfunc): New function.
2076 (sparc64_elf_bfd_link_hash_table_create): Rename to
2077 sparc64_elf_link_hash_table_create for consistency.
2078 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2079 (sparc64_elf_create_dynamic_sections): Initialize new section
2080 members of sparc64_elf_link_hash_table. Only init srelbss
2082 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2084 (SPARC_NOP): Define.
2085 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2086 sparc64_elf_plt_ptr_offset): Delete.
2087 (sparc64_plt_entry_build): New function to build PLT entries
2088 gradually instread of all at once at the end of linking.
2089 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2090 local vars. Get them from sparc64_elf_hash_table instead.
2091 Check early on if r_symndx is in bounds. Handle TLS transitions.
2092 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2093 For TLS relocs, record the tls_type in either
2094 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2095 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2096 to the __tls_get_addr symbol. For PLT relocs, track references
2097 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2098 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2099 symbol references, count the number of relocations needed for
2100 that symbol. For default switch case, don't error, this lets
2101 the TLS relocs not explicitly handled by this function get
2103 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2104 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2105 it from sparc64_elf_hash_table. Store the real PLT offset
2106 in h->plt.offset, and build PLT entries one at a time. Also
2107 get .dynbss section pointer from htab.
2108 (allocate_dynrelocs, readonly_dynrelocs,
2109 sparc64_omit_section_dynsym): New functions.
2110 (sparc64_elf_omit_section_dynsym): Use these new functions as
2112 (dtpoff_base, tpoff): New functions.
2113 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2114 locals, get them from sparc64_elf_hash_table. Handle TLS
2115 relocations and refcounting in main relocation loop.
2116 (sparc64_elf_finish_dynamic_symbol): Use
2117 sparc64_elf_link_hash_table. Build PLT entries as we see
2118 them. Handle TLS GOT relocations.
2119 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2120 from sparc64_elf_hash_table. Initialize only PLT header
2121 not all entries since we not build PLT entries one by one.
2122 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2123 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2124 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2126 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2128 * elflink.c (elf_link_input_bfd): Update check for removed
2131 2005-04-12 Alan Modra <amodra@bigpond.net.au>
2133 * Makefile.am: Run "make dep-am".
2134 * Makefile.in: Regenerate.
2135 * aclocal.m4: Regenerate.
2136 * libcoff.h: Regenerate.
2138 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2140 * linker.c (_bfd_generic_link_output_symbols): Also check if
2141 the output section of an input section has been removed from
2144 * section.c (bfd_section_list_remove): Clear the next field
2145 of the removed section.
2146 (bfd_section_removed_from_list): New.
2147 * bfd-in2.h: Regenerated.
2149 2005-04-11 David S. Miller <davem@davemloft.net>
2151 * elf32-sparc.c (elf32_sparc_relocate_section,
2152 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2153 R_SPARC_TLS_LE_{HIX22,LOX10}.
2154 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2155 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2156 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2157 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2159 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2161 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2163 2005-04-11 Nick Clifton <nickc@redhat.com>
2165 * aout-target.h: Convert to ISO C.
2166 * aoutf1.h: Convert to ISO C.
2167 * aoutx.h: Convert to ISO C.
2168 * bout.c: Convert to ISO C.
2169 * dwarf1.c: Convert to ISO C.
2170 * ecoffswap.h: Convert to ISO C.
2171 * freebsd.h: Convert to ISO C.
2172 * genlink.h: Convert to ISO C.
2173 * ieee.c: Convert to ISO C.
2174 * ihex.c: Convert to ISO C.
2175 * libcoff-in.h: Convert to ISO C.
2176 * mach-o.c: Convert to ISO C.
2177 * mach-o.h: Convert to ISO C.
2178 * netbsd.h: Convert to ISO C.
2179 * ns32k.h: Convert to ISO C.
2180 * ns32knetbsd.c: Convert to ISO C.
2181 * oasys.c: Convert to ISO C.
2182 * pdp11.c: Convert to ISO C.
2183 * pef-traceback.h: Convert to ISO C.
2184 * pef.c: Convert to ISO C.
2185 * pef.h: Convert to ISO C.
2186 * riscix.c: Convert to ISO C.
2187 * som.c: Convert to ISO C.
2188 * som.h: Convert to ISO C.
2189 * srec.c: Convert to ISO C.
2190 * stabs.c: Convert to ISO C.
2191 * sunos.c: Convert to ISO C.
2192 * tekhex.c: Convert to ISO C.
2193 * versados.c: Convert to ISO C.
2194 * version.h: Convert to ISO C.
2195 * xcoff-target.h: Convert to ISO C.
2196 * xcofflink.c: Convert to ISO C.
2197 * xsym.c: Convert to ISO C.
2198 * xsym.h: Convert to ISO C.
2200 2005-04-08 Paul Brook <paul@codesourcery.com>
2202 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2203 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2204 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2205 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2206 (elf32_arm_to_thumb_stub): Create PIC stubs.
2207 (record_arm_to_thumb_glue): Use different stub size for relocatable
2210 2005-04-05 Alan Modra <amodra@bigpond.net.au>
2212 * elf64-ppc.c (dec_dynrel_count): New function split out from
2213 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2214 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2215 (ppc64_elf_tls_optimize): Likewise.
2217 2005-04-05 Mark Kettenis <kettenis@gnu.org>
2219 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2220 CORE_WCOOKIE_OFFSET.
2221 (SPARC64_WCOOKIE_OFFSET): New.
2222 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2224 2005-04-05 Nick Clifton <nickc@redhat.com>
2226 * po/rw.po: New translation: Kinyarwanda
2227 * configure.in (ALL_LINGUAS): Add rw
2228 * configure: Regenerate.
2230 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
2232 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2233 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2234 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2236 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2237 to check for SHT_MIPS_OPTIONS sections.
2238 (_bfd_mips_elf_set_section_contents): Likewise.
2240 2005-04-04 Eric Christopher <echristo@redhat.com>
2242 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2243 Clean up gp handling code.
2245 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2247 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2249 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2250 sections for relocatable files only. Remove the linker created
2252 (_bfd_elf_compute_section_file_positions): Pass link_info to
2253 assign_section_numbers.
2255 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2256 (elf_backend_object_p): Defined.
2258 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2260 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2262 2005-04-03 Fred Fish <fnf@specifixinc.com>
2264 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2265 dwarf_ranges_size members.
2266 (struct comp_unit): Add base_address member.
2267 (struct funcinfo): Replace low/high members with an arange.
2268 (arange_add): Replace incoming "unit" parameter with "abfd" and
2269 "first_arange" pointers. Reorganize/rewrite function body.
2270 (decode_line_info): Change arange_add call to pass bfd and arange
2272 (lookup_address_in_line_info_table): Use arange list instead of
2273 individual low/high members. Walk function's arange list to find
2274 lowest PC in list, to test for overlapping functions.
2275 (read_debug_ranges): New function, reads the debug_ranges section.
2276 (lookup_address_in_function_table): Use arange list instead of
2277 individual low/high members. Rewrite to find smallest range that
2279 (read_rangelist): Read a given rangelist from debug_ranges.
2280 (scan_unit_for_functions): Use arange list instead of individual
2281 low/high members. Handle a DW_AT_ranges attribute.
2282 (parse_comp_unit): Use arange list instead of individual low/high
2283 members. Save comp unit base address. Handle a DW_AT_ranges
2286 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2288 * elf.c (assign_section_numbers): Really use the kept section.
2290 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2292 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2294 * elf.c (assign_section_numbers): When sh_link points to a
2295 discarded section, call _bfd_elf_check_kept_section to see if
2296 the kept section can be used. Otherwise reject sh_link
2297 pointing to discarded section.
2299 * elflink.c (_bfd_elf_check_kept_section): New.
2300 (elf_link_input_bfd): Use it.
2302 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2304 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2305 that we no longer need.
2307 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2309 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2311 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2313 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2315 * elf.c (assign_section_numbers): Fix a typo.
2317 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2319 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2321 (_bfd_elf_section_already_linked): Likewise.
2323 2005-03-31 Jerome Guitton <guitton@gnat.com>
2325 * config.in: Regenerate.
2327 2005-03-31 Jerome Guitton <guitton@gnat.com>
2329 * config.in (HAVE_DECL_BASENAME): New configure macro.
2330 * configure.in: Check for basename.
2331 * configure: Regenerate.
2333 2005-03-30 Julian Brown <julian@codesourcery.com>
2335 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2336 bfd_elf32_is_arm_mapping_symbol_name.
2337 * bfd-in2.h: Regenerate.
2338 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2339 bfd_elf32_is_arm_mapping_symbol_name.
2340 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2341 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2342 (arm_elf_find_function): Likewise.
2343 (elf32_arm_output_symbol_hook): Likewise.
2345 2005-03-30 Julian Brown <julian@codesourcery.com>
2347 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2348 * bfd-in2.h: Regenerate.
2349 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2350 bfd_elf32_is_arm_mapping_symbol_name.
2351 (elf32_arm_output_symbol_hook): Likewise.
2352 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2354 (is_arm_mapping_symbol_name): Function moved from here...
2355 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2358 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2360 * configure.in: Check for ffs decl and alphabetize.
2361 * config.in: Regenerate.
2362 * configure: Regenerate.
2363 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2365 2005-03-29 Fred Fish <fnf@specifixinc.com>
2367 * dwarf2.c (struct comp_unit): Fix typo.
2368 (scan_unit_for_functions): Remove unused local variable "name"
2369 and dead code that set it.
2371 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2372 Phil Blundell <philb@gnu.org>
2374 * bfd-in2.h, libbfd.h: Regenerated.
2375 * reloc.c: Add ARM TLS relocations.
2376 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2378 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2379 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2380 (elf32_arm_tls_ie32_howto): New.
2381 (elf32_arm_howto_from_type): Support TLS relocations.
2382 (elf32_arm_reloc_map): Likewise.
2383 (elf32_arm_reloc_type_lookup): Likewise.
2385 (struct elf32_arm_obj_tdata): New.
2386 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2387 (elf32_arm_mkobject): New function.
2388 (struct elf32_arm_relocs_copied): Add pc_count.
2389 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2390 (GOT_TLS_IE): Define.
2391 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2392 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2393 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2394 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2395 (dtpoff_base, tpoff): New functions.
2396 (elf32_arm_final_link_relocate): Handle TLS relocations.
2397 (IS_ARM_TLS_RELOC): Define.
2398 (elf32_arm_relocate_section): Warn about TLS mismatches.
2399 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2400 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2401 TLS relocations and pc_count.
2402 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2403 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2405 (elf32_arm_size_dynamic_sections): Handle TLS.
2406 (elf32_arm_finish_dynamic_symbol): Likewise.
2407 (bfd_elf32_mkobject): Define.
2409 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2411 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2412 relocation types. Don't count relocations which will use a PLT.
2414 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2416 * elf.c (elfcore_grok_nto_status): Print tid as long.
2417 (elfcore_grok_nto_regs): Likewise.
2419 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2421 * irix-core.c: Remove some unnecessary prototypes.
2423 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2425 * irix-core.c: Convert to ISO C.
2427 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2429 * irix-core.c (do_sections): Replace + by | in expression.
2430 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2431 to unused parameters to avoid a compiler warning.
2433 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2435 * netbsd-core.c: Convert to ISO C. Fix formatting.
2437 2005-03-24 Eric Christopher <echristo@redhat.com>
2439 * elfxx-mips.c: Revert previous patch.
2441 2005-03-24 Nick Clifton <nickc@redhat.com>
2443 * targets.c (_bfd_target_vector): Only include the
2444 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2445 all targets enabled.
2447 2005-03-24 James E Wilson <wilson@specifixinc.com>
2449 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2450 (BFD64_BACKENDS): Add elf32-ia64.lo.
2451 * Makefile.in: Regenerate.
2453 2005-03-23 Eric Christopher <echristo@redhat.com>
2455 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2456 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2457 after emitting relocation.
2458 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2459 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2462 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2463 Nick Clifton <nickc@redhat.com>
2465 * config.bfd: Accept any C library to accompany a GNU Linux
2466 implementation, not just the GNU C library.
2467 * configure.in: Likewise.
2468 * configure: Regenerate.
2470 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2472 * bfd-in.h (_bfd_elf_provide_symbol): New.
2473 * bfd-in2.h: Regenerated.
2475 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2476 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2479 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2482 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2484 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2486 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2488 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2489 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2490 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2491 (xtensa_opcode_decode): Rearrange code.
2493 2005-03-22 Nick Clifton <nickc@redhat.com>
2495 * binary.c: Convert to ISO C90 formatting.
2496 * coff-arm.c: Convert to ISO C90 formatting.
2497 * coffgen.c: Convert to ISO C90 formatting.
2498 * elf32-gen.c: Convert to ISO C90 formatting.
2499 * elf64-gen.c: Convert to ISO C90 formatting.
2500 * hash.c: Convert to ISO C90 formatting.
2501 * ieee.c: Convert to ISO C90 formatting.
2503 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2505 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2506 unresolved symbols in R_ARM_NONE relocations.
2508 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2510 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2511 UNRESOLVED_RELOC_P argument. Set it appropriately.
2512 (elf32_arm_relocate_section): Update call to
2513 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2514 unresolved_reloc instead.
2516 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2518 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2519 .gnu.warning.* sections.
2521 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2523 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2525 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2526 (elf_create_pointer_linker_section): Delete info parm. Don't make
2527 h dynamic. Don't set written_address_p.
2528 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2529 (bfd_put_ptr): Delete.
2530 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2531 Always write section contents. Assert global sym is def_regular.
2532 Use offset bottom bit as a written flag.
2533 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2536 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2538 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2539 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2542 2005-03-21 Nick Clifton <nickc@redhat.com>
2544 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2546 (t2a1_bx_pc_insn): Likewise.
2547 (t2a2_noop_insn): Likewise.
2548 (t2a3_b_insn): Likewise.
2549 (t2a1_push_insn): Likewise.
2550 (t2a2_ldr_insn): Likewise.
2551 (t2a3_mov_insn): Likewise.
2552 (t2a4_bx_insn): Likewise.
2553 (t2a5_pop_insn): Likewise.
2554 (t2a6_bx_insn): Likewise.
2555 (coff_arm_relocate_section): Only declare the high_address
2556 variable for non WINCE targets.
2558 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2560 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2561 SEC_LINKER_CREATED. Attach to dynobj.
2562 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2564 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2566 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2567 sym_offset. Add name, bss_name, sym_name, sym_val.
2568 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2569 Add sdata array of elf_linker_section_t.
2570 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2571 (enum elf_linker_section_enum): Delete.
2572 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2573 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2574 the special sections are needed. Adjust htab->sdata refs.
2575 Ensure dynobj is set in sreloc code.
2576 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2577 (ppc_elf_set_sdata_syms): New function.
2578 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2579 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2580 sym_val instead of sym_hash.
2581 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2583 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2585 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2586 (ppc_elf_merge_private_bfd_data): Likewise.
2588 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2590 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2591 (ppc_elf_create_linker_section): Don't create rel_section.
2592 (elf_create_pointer_linker_section): Don't size relocs.
2593 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2594 Don't generate relocs.
2595 (ppc_elf_relocate_section): Adjust calls to
2596 elf_finish_pointer_linker_section.
2598 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2600 * elf32-ppc.c (is_ppc_elf_target): New function.
2601 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2602 for bfd_target_elf_flavour. Do this test before endian check.
2603 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2604 (ppc_elf_size_dynamic_sections): Likewise.
2606 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2608 * elf-bfd.h (elf_backend_data): Add int to
2609 elf_backend_section_from_shdr.
2610 (bfd_elf_section_data): Update comment for this_idx.
2611 (_bfd_elf_make_section_from_shdr): Add int.
2612 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2614 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2615 and use it to set this_idx in bfd_elf_section_data.
2616 (bfd_section_from_shdr): Pass shindex to
2617 _bfd_elf_make_section_from_shdr.
2618 (_bfd_elf_section_from_bfd_section): Use this_idx in
2619 bfd_elf_section_data to find section index.
2621 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2622 index and pass it to _bfd_elf_make_section_from_shdr.
2623 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2624 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2625 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2626 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2627 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2628 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2629 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2630 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2631 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2633 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2634 Ross Ridge <rridge@csclub.uwaterloo.ca>
2636 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2637 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2640 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2642 * elflink.c (elf_mark_used_section): Remove check for special
2645 2005-03-18 Andreas Schwab <schwab@suse.de>
2647 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2648 from bfd_vma to ia64_insn, remove broken cast.
2650 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2652 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2653 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2654 elf_m68k_finish_dynamic_sections): Use it.
2656 2005-03-17 Paul Brook <paul@codesourcery.com>
2657 Dan Jacobowitz <dan@codesourcery.com>
2658 Mark Mitchell <mark@codesourcery.com>
2660 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2661 (elf32_arm_additional_program_headers): Likewise.
2662 (elf_backend_modify_segment_map): Define.
2663 (elf_backend_additional_program_headers): Likewise.
2664 (elf32_arm_symbian_modify_segment_map): Use
2665 elf32_arm_modify_segment_map.
2667 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2669 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2670 for special sections.
2672 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2674 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2675 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2676 section_sym_count param, and return number of section symbols.
2677 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2678 .dynsym contents. Don't bother calling swap_symbol_out on the
2679 first all-zero dynsym.
2680 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2681 special sections like bfd_abs_section.
2682 (bfd_elf_gc_sections): Spelling fix.
2684 2005-03-16 Fred Fish <fnf@specifixinc.com>
2687 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2688 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2690 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2692 * elflink.c (elf_mark_used_section): New.
2693 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2694 non-relocatable link if we don't do GC.
2696 2005-03-16 Nick Clifton <nickc@redhat.com>
2697 Ben Elliston <bje@au.ibm.com>
2699 * configure.in (werror): New switch: Add -Werror to the
2700 compiler command line. Enabled by default. Disable via
2702 * configure: Regenerate.
2704 2005-03-16 Nick Clifton <nickc@redhat.com>
2706 * ecoff.c: Convert to ISO C90 formatting.
2708 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2710 * elf32-ppc.c: Divide file into general and linker specific
2711 functions. Sort linker functions into roughly the order in which
2712 they are called by the ELF linker code.
2714 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2716 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2717 on section. Correct comment, and add FIXME.
2718 (ppc_elf_additional_program_headers): Don't bump header count for
2719 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2720 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2721 do allocate memory if they need it.
2723 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2725 * config.bfd (x86_64-elf): Add target.
2727 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2729 * po/es.po: Commit new Spanish translation.
2731 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2733 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2734 for global symbol when reporting overflow.
2736 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2738 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2739 * libbfd.h: Rebuilt.
2740 * archive.c (_bfd_ar_spacepad): New function.
2741 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2742 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2743 coff_write_armap): Use it.
2744 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2746 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2748 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2750 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2751 has_table to the start of the function.
2753 2005-03-10 Ben Elliston <bje@au.ibm.com>
2755 * archive.c: Include hashtab.h.
2756 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2757 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2758 (hash_file_ptr): New function.
2759 (eq_file_ptr): Likewise.
2760 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2761 * libbfd-in.h: Include hashtab.h.
2762 (struct artdata): Change `cache' member type to htab_t.
2763 * libbfd.h: Rebuild.
2765 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2767 * configure.in: Bump version to 2.16.90.
2768 * configure: Regenerated.
2770 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2772 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2773 close is a function like macro in system headers.
2775 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2778 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2779 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2781 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2783 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2785 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2787 * po/bfd.pot: Regenerate.
2789 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2791 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2793 (func_desc_adjust): Force dot-syms local in executables as well
2796 2005-03-04 David Daney <ddaney@avtrex.com>
2798 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2799 '__gnu_local_gp' symbol used by gas -mno-shared.
2801 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2803 * elf-bfd.h (elf_backend_data): Add "const char *" to
2804 elf_backend_section_from_phdr.
2806 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2807 elf_backend_section_from_phdr hook.
2809 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2810 Joseph Myers <joseph@codesourcery.com>
2812 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2813 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2815 (struct mips_elf_got_per_bfd_arg): Add global_count.
2816 (struct mips_elf_count_tls_arg): New.
2817 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2818 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2819 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2820 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2821 (TLS_RELOC_P): Define.
2822 (TP_OFFSET, DTP_OFFSET): Define.
2823 (dtprel_base, tprel_base): New functions.
2824 (mips_elf_link_hash_newfunc): Initialize tls_type.
2825 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2826 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2828 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2829 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2830 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2831 (mips_tls_got_index): New functions.
2832 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2833 arguments. Pass them to mips_elf_create_local_got_entry. Use
2835 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2837 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2838 mips_elf_create_local_got_entry.
2839 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2840 arguments. Handle TLS entries.
2841 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2842 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2844 (mips_elf_record_global_got_symbol): Likewise.
2845 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2847 (mips_elf_merge_gots): Handle TLS entries when merging.
2848 (mips_elf_initialize_tls_index): New function.
2849 (mips_elf_set_global_got_offset): Handle TLS entries.
2850 (mips_elf_adjust_gp): Handle TLS.
2851 (mips_elf_multi_got): Remove redundant call to
2852 mips_elf_resolve_final_got_entries. Initialize global_count.
2853 Correct a comment. Initialize new TLS members of mips_got_info.
2854 Assign TLS GOT indexes for new GOTs.
2855 (mips_elf_create_got_section): Initialize new TLS members of
2857 (mips_elf_calculate_relocation): Handle TLS relocs.
2858 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2860 (_bfd_mips_elf_always_size_sections): Handle TLS.
2861 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2862 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2864 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2865 (_bfd_mips_elf_hide_symbol): Handle TLS.
2866 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2867 (mips_reloc_map): Add TLS relocs.
2868 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2869 * elf64-mips.c (mips_elf64_howto_table_rel)
2870 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2871 * reloc.c: Define new MIPS TLS relocations.
2872 * libbfd.h, bfd-in2.h: Regenerated.
2874 2005-03-02 Jan Beulich <jbeulich@novell.com>
2876 * Makefile.am: Add dependency of cache.o on libiberty.h.
2877 * cache.c: Include libiberty.h.
2878 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2880 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2882 * elf.c (bfd_section_from_shdr <default case>): Call
2883 elf_backend_section_from_shdr hook unconditionally, and return
2885 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2886 * elfxx-target.h (elf_backend_section_from_shdr)
2887 (elf_backend_section_from_phdr): Default to
2888 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2891 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2893 * targets.h: Typo fix.
2894 * bfd-in2.h: Regenerate.
2896 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2897 structs to size on-disk structures.
2898 (b_out_set_section_contents): Size the external struct, not the
2899 internal one for on-disk size.
2900 (b_out_sizeof_headers): Likewise.
2902 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2904 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2905 entry points with the func descriptor as well as undefweak.
2907 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2909 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2910 present when IMPORT_NAME_UNDOECRATE is used.
2912 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2915 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2918 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2919 to _bfd_elf_merge_symbol.
2921 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2922 unsigned int to return the alignment of the old common symbol
2923 in the dynamic object.
2924 (_bfd_elf_add_default_symbol): Pass NULL to
2925 _bfd_elf_merge_symbol.
2926 (elf_link_add_object_symbols): Pass &old_alignment to
2927 _bfd_elf_merge_symbol. Get the alignment of the new common
2928 symbol in the dynamic object.
2930 2005-02-24 Ben Elliston <bje@au.ibm.com>
2932 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2933 * format.c (bfd_check_format_matches): Likewise.
2934 * archive.c (BFD_GNU960_ARMAG): Likewise.
2935 (bfd_generic_archive_p): Likewise.
2936 (_bfd_write_archive_contents): Likewise.
2938 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2940 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2941 * configure: Regenerate.
2943 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2945 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2946 COMDAT group sections to have default visibility.
2948 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2950 * coffcode.h (coff_print_aux): Warning fix.
2951 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2952 instead of section pointer to identify.
2953 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2954 the correct size buffer for local sym mangling too.
2955 (h8300_bfd_link_add_symbols): Likewise.
2956 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2958 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2959 * elf32-xtensa.c (literal_value_hash): Warning fix.
2960 * versados.c (process_otr): Warning fix.
2961 (versados_canonicalize_reloc): Likewise.
2962 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2963 * vms.c (fill_section_ptr): Warning fix.
2965 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2967 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2968 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2970 2005-02-23 Nick Clifton <nickc@redhat.com>
2972 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2973 the relvaddr field of the Elf32_crinfo structure.
2975 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2976 variables that are passed by reference to
2977 m68hc11_get_relocation_value in case that function does not
2980 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2981 return statements and replace with a single return at the end of
2982 the function. This helps pacify the flow analysis code in gcc 4.0.
2984 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2985 strtab to avoid compile time warning.
2987 2005-02-23 Ben Elliston <bje@au.ibm.com>
2989 * opncls.c (bfd_zalloc): Document this function.
2991 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2993 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2994 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2995 Replace SEC_SHARED with SEC_COFF_SHARED.
2996 (styp_to_sec_flags): Likewise.
2998 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2999 (TARGET_LITTLE_SYM): Likewise.
3001 * section.c (SEC_ARCH_BIT_0): Removed.
3002 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3003 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3004 (SEC_SHARED): Renamed to ...
3005 (SEC_COFF_SHARED): This.
3006 (SEC_BLOCK): Renamed to ...
3007 (SEC_TIC54X_BLOCK): This.
3008 (SEC_CLINK): Renamed to ...
3009 (SEC_TIC54X_CLINK): This.
3010 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3011 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3013 * bfd-in2.h: Regenerated.
3015 2005-02-21 Fred Fish <fnf@specifixinc.com>
3017 * dwarf2.c (find_abstract_instance_name): Call recursively
3018 to handle a DW_AT_specification.
3020 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3022 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3023 mips_elf_create_dynamic_relocation,
3024 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3025 Remove #if 0'd code.
3027 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3029 * Makefile.am: Run "make dep-am"
3030 * Makefile.in: Regenerate.
3032 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3034 * coffgen.c (bfd_coff_get_comdat_section): Check that
3035 coff_section_data isn't NULL.
3037 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3039 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3040 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3041 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3042 useless assignments.
3043 (xcoff_write_archive_contents_big): Likewise.
3044 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3045 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3046 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3047 * cofflink.c (process_embedded_commands): Warning fixes.
3048 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3050 * dwarf2.c: Warning fixes.
3051 * elf-bfd.h: Likewise.
3052 * elf-eh-frame.c: Likewise.
3053 * elf-strtab.c: Likewise.
3055 * elf32-m68k.c: Likewise.
3056 * elf32-ppc.c: Likewise.
3057 * elf32-sh-symbian.c: Likewise.
3058 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3059 * elf64-sh64.c: Likewise.
3060 * peicode.h: Likewise.
3061 * elf64-mmix.c: Warning fixes.
3062 * elfcode.h: Likewise.
3063 * elfxx-mips.c: Likewise.
3064 * libbfd-in.h: Likewise.
3065 * libbfd.c: Likewise.
3066 * mach-o.c: Likewise.
3067 * merge.c: Likewise.
3069 * opncls.c: Likewise.
3072 * vms-hdr.c: Likewise.
3073 * vms-tir.c: Likewise.
3074 * xtensa-isa.c: Likewise.
3075 * xtensa-modules.c: Likewise.
3077 (pstrcmp): Use correct choice of string lengths. Fix return value.
3078 (bfd_sym_module_name): Correct string length.
3079 * bfd-in2.h: Regenerate.
3080 * libbfd.h: Regenerate.
3082 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3084 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3085 uninitialized check_segment[1] in TLSMOFF case.
3086 Reported by Alan Modra.
3087 (elf32_frv_relocate_section): Improve errors and warnings.
3089 2005-02-17 Alan Modra <amodra@bigpond.net.au>
3091 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3093 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3095 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3096 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3097 * pef.c (bfd_pef_scan): Don't ignore return value of
3098 bfd_pef_scan_start_address.
3099 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3100 bfd_mach_o_scan_start_address.
3101 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3102 * elfxx-mips.c: Remove unnecessary prototypes.
3103 (sort_dynamic_relocs_64): Abort if not BFD64.
3105 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3107 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3108 Skip toc reloc adjust if reloc_count is zero.
3110 2005-02-15 Nigel Stephens <nigel@mips.com>
3111 Maciej W. Rozycki <macro@mips.com>
3113 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3114 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3115 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3116 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3117 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3119 (mips16_gprel_reloc): Remove bit shuffling; call
3120 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3121 and _bfd_mips16_elf_reloc_shuffle() instead.
3122 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3123 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3125 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3126 elf_mips16_howto_table_rel.
3127 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3128 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3129 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3130 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3131 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3133 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3134 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3135 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3137 (mips16_gprel_reloc): Remove bit shuffling; call
3138 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3139 and _bfd_mips16_elf_reloc_shuffle() instead.
3140 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3141 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3143 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3144 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3145 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3146 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3147 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3148 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3149 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3151 (mips16_gprel_reloc): Remove bit shuffling; call
3152 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3153 and _bfd_mips16_elf_reloc_shuffle() instead.
3154 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3155 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3157 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3158 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3159 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3160 handle bit shuffling for MIPS16 relocs.
3161 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3162 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3163 and _bfd_mips16_elf_reloc_shuffle().
3164 (_bfd_mips_elf_generic_reloc): Likewise.
3165 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3167 (mips_elf_obtain_contents): Remove bit shuffling.
3168 (mips_elf_perform_relocation): Likewise; call
3169 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3171 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3173 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3174 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3175 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3176 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3177 (BFD_RELOC_MIPS16_LO16): Likewise.
3178 * bfd-in2.h: Regenerate.
3179 * libbfd.h: Regenerate.
3181 2005-02-15 Jan Beulich <jbeulich@novell.com>
3183 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3184 R_IA64_DTPMOD64[LM]SB.
3186 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3188 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3189 backward branch in the same section.
3190 (elfNN_ia64_relocate_section): Inform users that the input
3191 section is too big to relax br instruction when overflow
3192 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3193 and R_IA64_PCREL21F.
3195 2005-02-14 Orjan Friberg <orjanf@axis.com>
3197 * elfcore.h (elf_core_file_p): Move the call to
3198 elf_backend_object_p to allow the correct machine to be set before
3199 processing the program headers.
3201 2005-02-14 Nick Clifton <nickc@redhat.com>
3204 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3205 aware flag from the input bfd to the output bfd.
3207 2005-02-11 Maciej W. Rozycki <macro@mips.com>
3209 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3210 R_MIPS_LITERAL relocations for external symbols.
3211 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3212 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3214 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3216 * bfd-in2.h: Rebuilt.
3218 2005-02-11 Paul Brook <paul@codesourcery.com>
3220 * elf-bfd.h (struct elf_link_hash_table): Add
3221 is_relocatable_executable.
3222 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3223 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3224 symbols in relocatable executables.
3225 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3226 relocatable executables.
3227 (_bfd_elf_link_renumber_dynsyms): Ditto.
3228 (bfd_elf_final_link): Ditto.
3229 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3230 relocations into relocatable executables.
3231 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3232 executables. Also copy absolute relocations.
3233 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3234 in relocatable executables.
3235 (allocate_dynrelocs): Copy relocations for relocatable executables.
3236 Output dynamic symbols for symbols defined in linker scripts.
3238 2005-02-11 Nick Clifton <nickc@redhat.com>
3240 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3241 to avoid a compile time warning.
3243 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3246 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3247 inclusion of coffcode.h so that it is actually picked up.
3249 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3250 case it is not used.
3252 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3253 structure and macro.
3255 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3258 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3259 to protect the declaration of this array.
3261 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3262 Avoid call to memcpy with a size of 0.
3264 2005-02-12 Alan Modra <amodra@bigpond.net.au>
3266 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3267 old-style branches to undefined dot-symbols which will be
3268 satisfied by a plt call.
3270 2005-02-11 Alan Modra <amodra@bigpond.net.au>
3272 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3273 (ppc64_elf_copy_indirect_symbol): ..here.
3274 (func_desc_adjust): Use move_plt_plist.
3276 2005-02-10 Paul Brook <paul@codesourcery.com>
3278 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3280 2005-02-10 Paul Brook <paul@codesourcery.com>
3282 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3284 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3285 (elf_link_renumber_local_hash_table_dynsyms): New function.
3286 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3288 2005-02-10 Jakub Jelinek <jakub@redhat.com>
3290 * bfd-in.h (BFD_LINKER_CREATED): Define.
3291 * bfd-in2.h: Rebuilt.
3292 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3293 BFD_LINKER_CREATED bfds when determining input bfds without
3294 .note.GNU-stack section.
3296 2005-02-10 Maciej W. Rozycki <macro@mips.com>
3298 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3299 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3300 relocations against external symbols unchanged.
3302 2005-02-08 Paul Brook <paul@codesourcery.com>
3304 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3307 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
3309 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3312 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3314 * elf64-mips.c: Fix formatting throughout.
3316 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3318 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3320 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
3322 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3323 *ABS*/*UND* sections.
3324 (elf32_frv_relocate_section): Move zero-addend-required error...
3325 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3326 missing needed TLS section.
3328 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
3330 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3331 being the last symbol.
3332 (aout_link_add_symbols): Just return TRUE if a warning
3335 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3337 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3338 R_MIPS_GPREL32 relocations against external symbols.
3339 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3342 2005-02-07 Alan Modra <amodra@bigpond.net.au>
3344 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3345 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3346 elf_string_from_elf_strtab.
3347 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3348 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3349 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3350 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3351 looking at cached symtab info first, before iterating over headers.
3352 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3353 * elfcode.h (elf_object_p): Don't load section header stringtab
3356 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3358 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3359 against protected function when building shared library.
3362 * elf64-x86-64.c (is_32bit_relative_branch): New.
3363 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3364 protected function symbol when building shared library for
3365 32bit relative branch instruction.
3367 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3369 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3370 syms when doing a relocatable link.
3371 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3373 (ppc64_elf_tls_setup): Likewise.
3374 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3376 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3378 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3379 (link_hash_newfunc): Clear all locals using memset.
3380 (make_fdh): Remove flags param. Always create fake func desc
3381 weak. Link the descriptor with the code entry sym.
3382 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3383 (add_symbol_adjust): Adjust make_fdh call.
3384 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3385 descriptor to strong undefined if code entry is strong.
3387 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3389 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3390 lookup here. Set to new before calling bfd_link_repair_undef_list.
3391 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3393 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3395 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3397 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3399 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3400 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3401 before the as-needed lib was loaded. Abort on unexpected refs.
3403 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3405 * elflink.c (elf_smash_syms): Expand comments.
3406 (elf_link_add_object_symbols): Only call elf_smash_syms for
3407 as-needed dynamic objects.
3409 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3410 everything, just the field specific to ia64.
3411 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3413 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3415 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3416 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3418 (struct add_symbol_adjust_data): New.
3419 (add_symbol_adjust): Make an undefweak func desc for old ABI
3420 objects to link with --as-needed shared libs. Return fail status.
3421 Don't adjust old ABI func entry sym to weak if func desc syms
3423 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3426 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3428 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3431 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3433 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3434 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3435 remove anything but new and undefweak.
3436 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3438 (_bfd_elf_create_dynamic_sections): Formatting.
3439 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3440 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3441 (struct elf_smash_data): New.
3442 (elf_smash_syms): New function.
3443 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3444 unneeded dynamic objects to loaded list.
3445 (elf_link_output_extsym): Don't handle as-needed here. Strip
3446 bfd_link_hash_new symbols.
3447 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3448 delref when dynindx is already -1.
3449 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3451 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3453 2005-02-01 Ben Elliston <bje@au.ibm.com>
3455 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3457 2005-02-01 Ben Elliston <bje@au.ibm.com>
3459 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3460 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3461 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3462 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3463 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3464 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3465 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3466 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3467 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3468 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3469 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3470 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3471 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3472 throughout. Similarly, collapse #if 1'd code.
3474 2005-02-01 Ben Elliston <bje@au.ibm.com>
3476 * elf-bfd.h (bfd_elf_discard_group): Remove.
3477 * elf.c (bfd_elf_discard_group): Likewise.
3478 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3480 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3482 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3483 (_bfd_elf_eh_frame_address_size): Declare.
3484 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3485 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3486 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3487 (elf_backend_eh_frame_address_size): Define.
3488 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3489 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3490 size from the new backend hook.
3491 (_bfd_elf_write_section_eh_frame): Likewise.
3492 (_bfd_elf_eh_frame_address_size): New function.
3494 2005-01-31 Andrew Cagney <cagney@gnu.org>
3496 * configure: Regenerate to track ../gettext.m4.
3498 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3500 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3501 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3503 2005-01-31 Nick Clifton <nickc@redhat.com>
3505 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3506 sparc-lynxos, vax-vms) be obsolete.
3508 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3510 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3511 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3512 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3513 * elfcode.h (elf_object_p): Use minpagesize instead of
3515 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3516 (elfNN_bed): Include ELF_MINPAGESIZE.
3518 2005-01-28 Julian Brown <julian@codesourcery.com>
3520 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3521 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3522 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3523 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3524 passing flag value from ld. Set flag value in global hash table entry.
3525 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3528 2005-01-27 Andrew Cagney <cagney@gnu.org>
3530 * configure: Regenerate to track ../gettext.m4 change.
3532 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3534 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3537 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3539 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3540 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3542 * reloc.c: Add R_FRV_TLSMOFF.
3543 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3544 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3545 (elf32_frv_relocate_section): Handle it.
3546 (elf32_frv_check_relocs): Likewise.
3547 * libbfd.h, bfd-in2.h: Rebuilt.
3548 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3549 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3550 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3551 such that they return the constant in gr9.
3552 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3554 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3555 too, such that they shrink on relaxation.
3556 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3557 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3558 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3559 if we can guarantee the use of 16-bit constants.
3560 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3561 Introduce TLS support for FR-V FDPIC.
3562 * reloc.c: Add TLS relocations.
3563 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3564 (elf32_frv_rel_tlsdesc_value_howto): New.
3565 (elf32_frv_rel_tlsoff_howto): New.
3566 (frv_reloc_map): Add new mappings.
3567 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3569 (frvfdpic_dynamic_got_plt_info): New.
3570 (frvfdpic_plt_tls_ret_offset): New.
3571 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3572 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3573 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3574 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3576 (struct frvfdpic_relocs_info): Add TLS fields.
3577 (frvfdpic_relocs_info_hash): Warning clean up.
3578 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3579 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3580 (FRVFDPIC_TLS_BIAS): Define.
3581 (tls_biased_base): New.
3582 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3584 (frv_reloc_type_lookup): Likewise.
3585 (frvfdpic_info_to_howto_rel): Likewise.
3586 (elf32_frv_relocate_section): Likewise.
3587 (_frv_create_got_section): Create the PLT section here.
3588 (elf32_frvfdpic_create_dynamic_sections): Not here.
3589 (_frvfdpic_count_nontls_entries): Move out of...
3590 (_frvfdpic_count_got_plt_entries): ... here.
3591 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3592 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3594 (_frvfdpic_relax_tls_entries): New.
3595 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3596 (_frvfdpic_get_tlsdesc_entry): New.
3597 (_frvfdpic_assign_got_entries): Add TLS support.
3598 (_frvfdpic_assign_plt_entries): Likewise.
3599 (_frvfdpic_reset_got_plt_entries): New.
3600 (_frvfdpic_size_got_plt): Move out of...
3601 (elf32_frvfdpic_size_dynamic_sections): ... here.
3602 (_frvfdpic_relax_got_plt_entries): New.
3603 (elf32_frvfdpic_relax_section): New.
3604 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3605 (elf32_frv_check_relocs): Add TLS support.
3606 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3607 * libbfd.h, bfd-in2.h: Rebuilt.
3609 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3611 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3612 loadable reloc sections.
3613 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3614 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3616 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3618 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3619 sections immediately when linking shared libs. Instead, wait until
3620 we know a lib is needed.
3621 (_bfd_elf_link_create_dynstrtab): Extract from..
3622 (_bfd_elf_link_create_dynamic_sections_): ..here.
3623 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3624 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3625 for non-existent .dynamic.
3626 (elf_link_output_extsym): Don't complain about undefined symbols
3627 in as-needed dynamic libs that aren't actually linked.
3629 2005-01-24 Andrew Cagney <cagney@gnu.org>
3631 * configure: Regenerate, ../gettext.m4 was updated.
3633 2005-01-21 Ben Elliston <bje@au.ibm.com>
3635 * aout-encap.c: Remove unused file.
3637 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3640 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3641 non-function symbols are local.
3642 (_bfd_elf_symbol_refs_local_p): Likewise.
3644 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3646 * bfd.c (bfd_link_just_syms): Add abfd param.
3647 * bfd-in2.h: Regenerate.
3649 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3651 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3652 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3653 instructions. If the amount of padding is known, reduce the size
3654 of the CIE or FDE by that amount.
3656 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3658 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3659 augmentation_size. Use bfd_signed_vmas for data_align.
3660 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3661 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3662 functions. Don't read past the end of the enclosing CIE or FDE.
3663 (skip_bytes): New utility function.
3664 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3666 (_bfd_elf_write_section_eh_frame): Use new functions.
3668 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3670 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3671 assert-style REQUIRE() macro to handle sanity checks.
3673 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3675 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3677 (read_unsigned_leb128): Removed.
3678 (read_signed_leb128): Removed.
3679 (find_abstract_instance_name): Updated.
3680 (parse_comp_unit): Accept info_ptr_unit.
3681 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3682 comp unit and pass it to parse_comp_unit.
3684 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3685 (read_signed_leb128): Moved to ...
3688 * libbfd-in.h (read_unsigned_leb128): New prototype.
3689 (read_signed_leb128): Likewise.
3690 * libbfd.h: Regenerated.
3692 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3693 Nick Clifton <nickc@redhat.com>
3695 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3696 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3697 arch_sh4a_nofpu_up in order to match the external names and make the
3698 testsuite's job easier.
3699 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3701 * bfd-in2.h: Regenerate.
3703 2005-01-15 Andrew Cagney <cagney@gnu.org>
3706 * acinclude.m4: Move BFD_NEED_DECLARATION,
3707 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3708 the new file bfd.m4. Include ../bfd/bfd.m4.
3709 * configure: Re-generate.
3711 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3713 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3714 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3716 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3717 R_PPC_RELAX32PC_PLT.
3719 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3721 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3723 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3724 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3725 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3726 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3727 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3728 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3729 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3730 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3731 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3732 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3733 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3734 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3735 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3736 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3738 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3740 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3743 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3745 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3746 * bfd-in2.h: Regenerate.
3747 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3748 to support these new machine values.
3749 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3751 (bfd_maxq_arch): Update values for the maxq20.
3753 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3755 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3756 non-shared object, do not reserve space in .plt and .rela.plt for
3757 regular symbols neither defined nor referenced in shared objects.
3759 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3761 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3762 to zero the structure.
3763 (create_got_section): Use BFD_ASSERT instead of abort.
3764 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3766 (create_got_section): New function.
3767 (sparc64_elf_create_dynamic_sections): Likewise.
3768 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3769 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3770 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3771 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3772 (sparc64_elf_finish_dynamic_symbol): Likewise.
3773 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3774 (elf_backend_create_dynamic_sections): Define to
3775 sparc64_elf_create_dynamic_sections.
3777 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3779 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3780 (elf_backend_omit_section_dynsym): Define to it.
3781 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3782 (elf_backend_omit_section_dynsym): Define to it.
3784 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3786 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3787 PT_DYNAMIC segment, unless .dynamic.
3789 2005-01-06 Paul Brook <paul@codesourcery.com>
3791 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3792 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3793 * configure: Regenerate.
3794 * elf32-arm.c: Add VxWorks target bfd.
3796 (elf32_arm_link_hash_table): Add use_rel.
3797 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3798 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3799 Correct offset calculation for RELA case.
3800 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3801 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3802 (elf32_arm_vxworks_link_hash_table_create): New function.
3803 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3804 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3805 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3807 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3809 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3811 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3812 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3813 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3814 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3815 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3816 (toc_adjusting_stub_needed): Rewrite.
3817 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3818 toc tests. Adjust for toc_adjusting_stub_needed changes.
3819 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3820 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3821 * section.c: Expand comment on backend bits.
3822 * bfd-in2.h: Regenerate.
3823 * libbfd.h: Regenerate.
3825 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3827 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3828 toc adjusting stub, do not test source section flags.
3830 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3832 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3833 from STABS debugging sections again.
3835 2005-01-05 Fred Fish <fnf@specifixinc.com>
3837 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3838 (find_abstract_instance_name): New function.
3839 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3840 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3841 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3843 2004-12-31 Paul Brook <paul@copdesourcery.com>
3845 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3847 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3849 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3850 Commit missing changes from 2004-12-22.
3851 * bfd-in2.h: Regenerate.
3853 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3855 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3857 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3859 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3860 Add 'base' argument for constructing register sections. Reformat.
3861 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3862 gp and fp regs. Reformat.
3864 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3866 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3867 * bfd-in2.h: Regenerate.
3868 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3869 (avr_reloc_map): Likewise.
3870 (avr_final_link_relocate): Likewise.
3872 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3874 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3875 as-needed dynamic libs as undefined.
3876 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3877 libs when finding they are needed.
3879 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3881 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3882 (opd_entry_value): Use opd_relocs if available.
3883 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3884 copy .opd relocations to opd_relocs.
3885 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3887 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3889 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3890 * elf32-v850.c (v850_elf_howto_table): Add entry for
3891 R_V850_LO16_SPLIT_OFFSET.
3892 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3893 (v850_elf_perform_lo16_relocation): New function, extracted from...
3894 (v850_elf_perform_relocation): ...here. Use it to handle
3895 R_V850_LO16_SPLIT_OFFSET.
3896 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3897 R_V850_LO16_SPLIT_OFFSET.
3898 * libbfd.h, bfd-in2.h: Regenerate.
3900 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3902 * config.bfd: Add s390x-ibm-tpf support.
3904 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3906 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3907 to prototype, to make hash info available.
3908 Prevent wrapped symbols from being adjusted twice.
3910 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3912 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3913 overflow for calls to undefined weak symbols.
3915 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3917 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3918 canonical sections syms have a name.
3920 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3922 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3923 have been adjusted for output.
3924 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3926 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3928 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3929 add symtab_hdr param.
3930 (group_signature): Update calls.
3931 * elf-bfd.h (bfd_elf_sym_name): Update.
3932 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3933 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3934 (ppc64_elf_relocate_section): Update.
3935 * elflink.c (elf_link_input_bfd): Update.
3937 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3939 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3940 st_shndx on STT_SECTION sections.
3942 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3944 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3945 ELF section symbols.
3947 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3949 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3950 return a real value, unless it is a PLT symbol.
3951 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3954 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3955 R_MIPS_JALR entry to 0.
3957 * archures.c: Define bfd_mach_mips9000.
3958 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3959 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3960 * cpu-mips.c (I_mips9000): Define.
3961 (arch_info_struct): Add case for bfd_mach_mips9000.
3962 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3963 * bfd-in2.h: Regenerate.
3965 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3967 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3970 2004-12-07 Ben Elliston <bje@gnu.org>
3972 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3974 2004-12-06 Daniel Jacobowitz <dan@debian.org>
3976 Suggested by Fergal Daly <fergal@esatclear.ie>:
3977 * simple.c (simple_dummy_multiple_definition): New function.
3978 (bfd_simple_get_relocated_section_contents): Use it.
3980 2004-12-03 Jan Beulich <jbeulich@novell.com>
3982 * elf.c (elf_find_function): Don't use the last file symbol ever,
3983 seen, but the last one seen prior to the symbol being reported.
3984 Don't report a filename at all for global symbols when that might
3987 2004-12-01 Paul Brook <paul@codesourcery.com>
3989 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3990 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3993 2004-12-01 Paul Brook <paul@codesourcery.com>
3995 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3998 2004-11-30 Paul Brook <paul@codesourcery.com>
4000 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4001 no_pipeline_knowledge
4002 (elf32_arm_link_hash_table_create): Ditto.
4003 (bfd_elf32_arm_process_before_allocation): Ditto.
4004 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4006 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4008 * bfd-in2.h: Regenerate.
4010 2004-11-30 Randolph Chung <tausq@debian.org>
4012 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4013 (elf32_hppa_grok_psinfo): New function.
4014 (elf_backend_grok_prstatus): Define.
4015 (elf_backend_grok_psinfo): Define.
4017 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4020 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4022 2004-11-24 Paul Brook <paul@codesourcery.com>
4024 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4026 2004-11-24 Paul Brook <paul@codesourcery.com>
4028 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4029 (elf32_arm_swap_symbol_out): New function.
4030 (elf32_arm_size_info): Add.
4031 (elf_backend_size_info): Define.
4033 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4035 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4038 2004-11-19 Alan Modra <amodra@bigpond.net.au>
4040 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4041 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4042 * nlmcode.h (nlm_write_object_contents): Warning fix.
4044 2004-11-18 Bob Wilson <bob.wilson@acm.org>
4046 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4048 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4050 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4051 (elf32_arm_plt_thumb_stub): New.
4052 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4054 (elf32_arm_link_hash_traverse): Fix typo.
4055 (elf32_arm_link_hash_table): Add obfd.
4056 (elf32_arm_link_hash_newfunc): Initialize new fields.
4057 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4058 (elf32_arm_link_hash_table_create): Initialize obfd.
4059 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4060 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4061 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4062 interworking BFD is not dynamic.
4063 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4064 not emit glue for PLT references.
4065 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4066 emit glue for PLT references. Support the Thumb PLT prefix.
4067 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4069 (elf32_arm_check_relocs): Likewise.
4070 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4072 (allocate_dynrelocs): Handle Thumb PLT references.
4073 (elf32_arm_finish_dynamic_symbol): Likewise.
4074 (elf32_arm_symbol_processing): New function.
4075 (elf_backend_symbol_processing): Define.
4077 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4079 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4080 add_fde_encoding. Remove need_relative.
4081 * elf-eh-frame.c (extra_augmentation_string_bytes)
4082 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4083 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4084 in cases where the CIE has no existing 'R' augmentation. Use
4085 size_of_output_cie_fde when assigning offsets. Use the final offset
4086 as the new section size.
4087 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4088 Account for any extra augmentation bytes in the returned offset.
4089 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4090 moved before being modified. Pad growing entries with DW_CFA_nops.
4091 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4092 and add_fde_encoding.
4094 2004-11-15 Mark Mitchell <mark@codesourcery.com>
4096 * elf32-arm.c (elf32_arm_relocate_section): Use
4097 arm_real_reloc_type.
4099 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4101 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4102 for discard relocations; don't add an R_MIPS_NONE to the main body
4105 2004-11-04 Paul Brook <paul@codesourcery.com>
4107 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4108 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4109 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4110 default version definition for unversioned symbols.
4111 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4112 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4113 _bfd_elf_slurp_version_tables. Set default version for unversioned
4116 2004-11-15 Paul Brook <paul@codesourcery.com>
4118 * elflink.c (elf_link_add_object_symbols): Don't assume version
4119 indices are consecutive.
4121 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
4123 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4124 composite relocations against the personality data.
4126 2004-11-13 Paul Brook <paul@codesourcery.com>
4128 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4129 R_ARM_PREL31 relocations to PLT entries.
4130 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4131 (elf32_arm_check_relocs): Ditto.
4133 2004-11-12 Bob Wilson <bob.wilson@acm.org>
4135 * xtensa-isa.c (xtensa_interface_class_id): New.
4137 2004-11-11 Bob Wilson <bob.wilson@acm.org>
4139 * elf32-xtensa.c (property_table_compare): Remove assertion about
4140 entries with the same address and non-zero size.
4141 (xtensa_read_table_entries): Report such entries as errors.
4143 2004-11-11 Mark Mitchell <mark@codesourcery.com>
4145 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4146 R_ARM_RELATIVE on Symbian OS.
4148 2004-11-09 Mark Mitchell <mark@codesourcery.com>
4150 * som.c (som_bfd_print_private_bfd_data): New function.
4151 (som_object_setup): Save the auxiliary header. Don't assume that
4152 zero is an invalid entry point for a shared library.
4153 (som_object_p): Allocate the auxiliary header on the heap.
4155 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4157 (elf32_arm_symbian_modify_segment_map): Likewise.
4159 2004-11-09 Daniel Jacobowitz <dan@debian.org>
4161 From David Poole <daveml@mbuf.com>:
4162 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4163 (elf32_arm_size_dynamic_sections): Call it.
4165 2004-11-09 Alan Modra <amodra@bigpond.net.au>
4167 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4168 (ALL_MACHINES_CFILES): Fix typo.
4169 * Makefile.in: Regenerate.
4170 * po/SRC-POTFILES.in: Regenerate.
4172 2004-11-08 Mark Mitchell <mark@codesourcery.com>
4174 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4175 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4176 symbol in the relocation.
4178 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4179 Vineet Sharma <vineets@noida.hcltech.com>
4181 * coff-maxq.c: New File.
4182 * cpu-maxq.c: New File.
4183 * coffcode.h: Likewise.
4184 * config.bfd: Likewise.
4185 * configure.in (maxqcoff_vec): New target vector.
4186 * Makefile.am: Add support for maxq target.
4187 * configure.in: Likewise.
4188 * archures.c:. Likewise.
4189 * targets.c: Likewise.
4190 * bfd_in2.h : Regenerated.
4191 * Makefile.in: Regenerated.
4192 * configure: Regenerated.
4193 * doc/Makefile.in: Regenerated.
4195 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4197 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4198 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4199 C_NT_WEAK aux entries.
4200 (_bfd_coff_generic_relocate_section): Handle undefined
4203 2004-11-07 Andreas Schwab <schwab@suse.de>
4205 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4206 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4207 non-default visibility.
4209 2004-11-01 Mark Mitchell <mark@codesourcery.com>
4211 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4213 (elf32_arm_symbian_modify_segment_map): Don't
4214 reset includes_filehdr and includes_phdrs here.
4216 2004-11-04 Daniel Jacobowitz <dan@debian.org>
4218 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4219 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4220 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4222 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4223 to a new removed list. Remove normal configuration stanzas.
4224 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4225 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4226 elfarm-nabi.lo with elf32-arm.lo.
4227 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4228 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4229 * elf32-arm.h: Remove.
4230 * elfarm-oabi.c: Remove.
4231 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4232 and bfd_elf32_littlearm_oabi_vec.
4233 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4235 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
4237 * config.bfd: Support crisv32-*-* like cris-*-*.
4238 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4239 (bfd_mach_cris_v10_v32): New macros.
4240 * cpu-cris.c: Tweak formatting.
4241 (get_compatible): New function.
4243 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4244 bfd_arch_info_type:s.
4245 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4246 get_compatible for member compatible and link bfd_cris_arch_v32 as
4248 * elf32-cris.c (cris_elf_pcrel_reloc)
4249 (cris_elf_set_mach_from_flags): New functions.
4250 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4251 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4252 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4253 numbers for bfd_mach_cris_v32.
4254 (PLT_ENTRY_SIZE_V32): New macro.
4255 (elf_cris_plt0_entry): Drop last comma in initializer.
4256 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4257 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4259 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4261 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4262 (elf_cris_finish_dynamic_sections): Similar.
4263 (elf_cris_adjust_dynamic_symbol): Similar.
4264 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4266 <switch with PIC relocs>: Emit error and return FALSE for
4267 bfd_mach_cris_v10_v32.
4268 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4269 Emit warning when generating textrel reloc.
4270 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4271 (cris_elf_final_write_processing): Set flags according to mach.
4272 (cris_elf_print_private_bfd_data): Display
4273 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4274 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4275 new_flags. Don't call cris_elf_final_write_processing. Don't
4276 look at the actual elf header flags at all; use
4277 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4278 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4280 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4281 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4282 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4283 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4284 * bfd-in2.h, libbfd.h: Regenerate.
4286 2004-11-04 Alan Modra <amodra@bigpond.net.au>
4288 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4289 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4291 (struct adjust_toc_info): New.
4292 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4294 2004-11-03 Bob Wilson <bob.wilson@acm.org>
4296 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4297 if there are no segments.
4299 2004-11-02 Daniel Jacobowitz <dan@debian.org>
4301 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4303 2004-11-02 Nick Clifton <nickc@redhat.com>
4305 * elf32-iq2000.c: Convert to ISO C90 formatting.
4307 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
4309 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4311 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4313 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4314 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4315 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4317 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4319 * elf32-sh.c (tpoff): Take alignment into account.
4321 2004-10-28 Nick Clifton <nickc@redhat.com>
4323 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4324 performing a relocatable link.
4325 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4326 for MIPS ports under Irix.
4328 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
4330 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4331 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4332 (elf32_arm_final_link_relocate): Ditto.
4333 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4334 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4335 (elf32_arm_adjust_dynamic_symbol): Ditto.
4336 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4337 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4338 (elf32_arm_r_howto): ... To here.
4339 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4341 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4344 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4345 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4346 and R_IA64_SECREL64LSB.
4348 2004-10-26 Paul Brook <paul@codesourcery.com>
4350 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4351 (bfd_elf_size_dynamic_sections): Create default version definition.
4352 (elf_link_output_extsym): Adjust for default symbol version.
4354 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4356 * mmo.c: Adjust to ISO C.
4358 * mmo.c (mmo_write_section_description): New function broken out
4359 of mmo_internal_write_section.
4360 (mmo_internal_write_section): For each of .text and .data, call
4361 mmo_write_section_description before outputting contents if it has
4362 nontrivially deducible vma or contents.
4363 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4364 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4365 symbols if found within the .data address range.
4367 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4369 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4371 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4373 * mmo.c (File Layout): Correct place of misplaced blurb about
4376 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4378 * config.bfd: Add mips64*-*-openbsd.
4380 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4382 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4385 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4387 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4388 * configure: Regenerate.
4390 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4393 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4394 to linker reloc_overflow callback.
4395 (aout_link_input_section_ext): Likewise.
4396 (aout_link_reloc_link_order): Likewise.
4397 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4398 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4400 (alpha_relocate_section): Likewise.
4401 * coff-arm.c (coff_arm_relocate_section): Likewise.
4402 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4403 * coff-h8500.c (extra_case): Likewise.
4404 * coff-i960.c (coff_i960_relocate_section): Likewise.
4405 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4406 * coff-mips.c (mips_relocate_section): Likewise.
4407 * coff-or32.c (coff_or32_relocate_section): Likewise.
4408 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4409 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4410 * coff-sh.c (sh_relocate_section): Likewise.
4411 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4412 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4413 * coff-z8k.c (extra_case): Likewise.
4414 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4415 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4416 (_bfd_coff_generic_relocate_section): Likewise.
4417 * ecoff.c (ecoff_reloc_link_order): Likewise.
4418 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4419 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4420 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4421 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4422 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4423 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4424 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4425 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4426 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4427 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4428 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4429 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4430 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4431 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4432 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4433 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4434 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4435 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4436 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4437 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4438 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4439 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4440 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4441 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4442 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4443 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4444 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4445 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4446 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4447 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4448 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4449 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4450 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4451 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4452 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4453 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4454 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4455 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4456 * elflink.c (elf_reloc_link_order): Likewise.
4457 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4458 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4459 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4460 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4461 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4462 (aout_link_reloc_link_order): Likewise.
4463 * reloc.c (bfd_generic_get_relocated_section_contents):
4465 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4466 * simple.c (simple_dummy_reloc_overflow): Updated.
4468 2004-10-20 Andreas Schwab <schwab@suse.de>
4470 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4471 (elf_backend_plt_sym_val): Define.
4473 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4475 * config.bfd: Set targ_underscore=yes for PE COFF targets
4477 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4479 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4480 (ppc64_elf_edit_opd): Likewise.
4482 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4484 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4485 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4486 set SEC_ALLOC and SEC_LOAD.
4488 2004-10-18 Nick Clifton <nickc@redhat.com>
4490 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4491 'name' for relocs against both local and global symbols.
4493 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4495 * bfd-in2.h: Regenerate.
4496 * bfd.c (struct bfd): Add no_export.
4497 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4499 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4501 * config.bfd: Whitespace cleanup.
4502 * Makefile.am: Run "make dep-am"
4503 * Makefile.in: Regenerate.
4505 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4507 * elflink.c (struct already_linked_section): Removed.
4508 (try_match_symbols_in_sections, already_linked): Removed.
4509 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4510 prefix of section names when finding already_linked_table
4511 chain. Compare section names. Instead of calling already_linked,
4512 do it inline and only for sections in the same already_linked_list.
4514 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4516 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4517 parameter. If called after _bfd_elf_write_section_eh_frame,
4518 don't allow a -2 return unless need_* bit is already set, and
4519 handle offsets adjusted for output_offset.
4520 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4521 * elf.c (_bfd_elf_section_offset): Update call.
4523 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4526 * coffcode.h (coff_compute_section_file_positions): Cast to
4527 bfd_vma when computing page alignment.
4529 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4531 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4532 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4534 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4536 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4537 relocations use a virtual address, not a section offset.
4539 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4541 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4542 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4543 xtensa_format_encode.
4544 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4545 (ebb_add_proposed_action): Delete.
4547 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4549 * elf32-xtensa.c: Use ISO C90 formatting.
4551 2004-10-12 Paul Brook <paul@codesourcery.com>
4553 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4556 2004-10-12 Paul Brook <paul@codesourcery.com>
4558 * elf32-arm.h: Support EABI version 4 objects.
4560 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4563 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4564 Don't mark as default.
4565 (bfd_x86_64_arch): Don't mark as default.
4567 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4569 * elflink.c (enum action_discarded): New.
4570 (elf_section_complain_discarded): Delete.
4571 (elf_action_discarded): New function subsuming the above and also
4572 controlling reloc behaviour.
4573 (elf_link_input_bfd): Use it.
4575 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4577 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4578 (special_sections): Add .gnu.liblist and .gnu.conflict.
4579 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4581 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4584 * elflink.c (elf_link_input_bfd): Try harder to support
4585 relocations against symbols in removed linkonce sections.
4587 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4589 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4592 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4593 sections do not reference symbols in non-SEC_ALLOC sections.
4595 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4598 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4599 (_bfd_elf_link_omit_section_dynsym): Formatting.
4601 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4603 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4604 * libbfd.h: Regnerate.
4605 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4606 * elf32-frv.c: Likewise.
4607 * elf32-m32r.c: Likewise.
4608 * elf32-ppc.c: Likewise.
4609 * elf64-hppa.c: Likewise.
4610 * elfxx-ia64.c: Likewise.
4611 * opncls.c: Likewise.
4613 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4615 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4616 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4617 offsets stored in struct eh_cie_fde entries before doing other
4620 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4621 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4622 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4623 setting offsets for removed CIEs. Don't set "sec", instead set
4624 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4625 CIE in hdr_info. Only set make_relative and make_lsda_relative
4626 for CIEs. Use pointers rather than array indices.
4627 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4628 make_lsda_relative, need_* on cie_inf for FDEs.
4629 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4630 section output_offset. Delete cie_offset, instead use cie_inf
4631 pointer to CIE entry. Use need_relative and need_lsda_relative on
4632 CIE entry for FDEs. Use pointers rather than array indices.
4634 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4636 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4637 bfd_is_target_special_symbol.
4638 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4639 * som.c (som_bfd_is_target_special_symbol): Define.
4641 2004-10-08 Nick Clifton <nickc@redhat.com>
4643 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4644 * configure: Regenerate.
4645 * bfd-in2.h: Regenerate.
4646 * syms.c (bfd_is_target_special_symbol): New interface function.
4647 Returns true when a symbol should be considered to be special.
4648 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4649 the symbol jump table.
4650 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4651 Return true iff the symbol is a mapping symbol.
4652 (bfd_elf32_bfd_is_target_special_symbol): Define.
4653 * elfxx-target.h: Provide a default definition for
4654 bfd_is_target_special_symbol.
4655 * aout-target.h: Likewise.
4656 * aout-tic30.c: Likewise.
4657 * binary.c: Likewise.
4658 * coffcode.h: Likewise.
4659 * i386msdos.c: Likewise.
4662 * libaout.h: Likewise.
4663 * libbfd-in.h: Likewise
4664 * libecoff.h: Likewise.
4665 * mach-o.c: Likewise.
4667 * nlm-target.h: Likewise.
4668 * oasys.c: Likewise.
4670 * ppcboot.c: Likewise.
4672 * tekhex.c: Likewise.
4673 * versados.c: Likewise.
4675 * xcoff-target.h: Likewise.
4677 * libbfd.h: Regenerate.
4679 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4681 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4682 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4683 (elf_backend_section_from_shdr): Define.
4685 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4687 * syms.c (bfd_is_local_label): Return false for file symbols.
4689 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4690 David Heine <dlheine@tensilica.com>
4692 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4693 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4694 (elf32xtensa_no_literal_movement): New global variable.
4695 (elf_howto_table): Add entries for new relocations.
4696 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4697 (property_table_compare): When addresses are equal, compare sizes and
4698 various property flags.
4699 (property_table_matches): New.
4700 (xtensa_read_table_entries): Extend to read new property tables. Add
4701 output_addr parameter to indicate that output addresses should be used.
4702 Use bfd_get_section_limit.
4703 (elf_xtensa_find_property_entry): New.
4704 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4705 (elf_xtensa_check_relocs): Handle new relocations.
4706 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4707 relocations. Use new xtensa-isa.h functions.
4708 (build_encoding_error_message): Remove encode_result parameter. Add
4709 new target_address parameter used to detect alignment errors.
4710 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4711 error handling. Use new is_operand_relocation function.
4712 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4713 Use underbar macro for error messages. Formatting.
4714 (get_const16_opcode): New.
4715 (get_l32r_opcode): Add a separate flag for initialization.
4716 (get_relocation_opnd): Operand number is no longer explicit in the
4717 relocation. Change to decode the opcode and analyze its operands.
4718 (get_relocation_slot): New.
4719 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4720 Use new xtensa-isa.h functions to handle multislot instructions.
4721 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4722 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4723 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4724 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4725 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4726 get_single_format, init_op_single_format_table): New.
4727 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4728 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4729 (contract_asm_expansion): Add error_message parameter and pass it to
4730 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4731 with R_XTENSA_SLOT0_OP.
4732 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4733 instructions. Use new xtensa-isa.h functions.
4734 (r_reloc struct): Add new virtual_offset field.
4735 (r_reloc_init): Add contents and content_length parameters. Set
4736 virtual_offset field to zero. Add contents to target_offset field for
4737 partial_inplace relocations.
4738 (r_reloc_is_defined): Check for null.
4739 (print_r_reloc): New debug function.
4740 (source_reloc struct): Replace xtensa_operand field with pair of the
4741 opcode and the operand position. Add is_abs_literal field.
4742 (init_source_reloc): Specify operand by opcode/position pair. Set
4743 is_abs_literal field.
4744 (source_reloc_compare): When target_offsets are equal, compare other
4745 fields to make sorting predictable.
4746 (literal_value struct): Add is_abs_literal field.
4747 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4748 (init_literal_value): New.
4749 (is_same_value): Replace with ...
4750 (literal_value_equal): ... this function. Add comparisons of
4751 virtual_offset and is_abs_literal fields.
4752 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4753 failure. Initialize has_last_loc field.
4754 (value_map_hash_table_delete): New.
4755 (hash_literal_value): Rename to ...
4756 (literal_value_hash): ... this. Include is_abs_literal flag and
4757 virtual_offset field in the hash value.
4758 (get_cached_value): Rename to ...
4759 (value_map_get_cached_value): ... this. Update calls to
4760 literal_value_hash and literal_value_equal.
4761 (add_value_map): Check for allocation failure. Update calls to
4762 value_map_get_cached_value and literal_value_hash.
4763 (text_action, text_action_list, text_action_t): New types.
4764 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4765 text_action_add, text_action_add_literal, offset_with_removed_text,
4766 offset_with_removed_text_before_fill, find_insn_action,
4767 print_action_list, print_removed_literals): New.
4768 (offset_with_removed_literals): Delete.
4769 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4770 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4771 allocated_relocs_count fields.
4772 (init_xtensa_relax_info): Initialize new fields.
4773 (reloc_bfd_fix struct): Add new translated field.
4774 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4776 (fix_compare, cache_fix_array): New.
4777 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4778 section via get_xtensa_relax_info. Use cache_fix_array to set up
4779 sorted fix_array and use bsearch instead of linear search.
4780 (section_cache_t): New struct.
4781 (init_section_cache, section_cache_section, clear_section_cache): New.
4782 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4783 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4784 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4785 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4787 (retrieve_contents): Use bfd_get_section_limit.
4788 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4789 to compute_removed_literals. Free value_map_hash_table when no longer
4791 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4792 compute_text_actions for all sections.
4793 (find_relaxable_sections): Mark sections as relaxable if they contain
4794 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4795 call. Increment relax_info src_count field only for appropriate
4796 relocation types. Remove is_literal_section check.
4797 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4798 r_reloc_init and find_associated_l32r_irel. Check
4799 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4800 literals. Pass is_abs_literal flag to init_source_reloc.
4801 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4802 CONST16 instructions. Adjust calls to r_reloc_init and
4803 pcrel_reloc_fits. Handle weak symbols conservatively.
4804 (find_associated_l32r_irel): Add bfd parameter and pass it to
4806 (compute_text_actions, compute_ebb_proposed_actions,
4807 compute_ebb_actions, check_section_ebb_pcrels_fit,
4808 check_section_ebb_reduces, text_action_add_proposed,
4809 compute_fill_extra_space): New.
4810 (remove_literals): Replace with ...
4811 (compute_removed_literals): ... this function. Call
4812 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4813 Call xtensa_read_table_entries to get the property table. Skip
4814 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4815 is_removable_literal, remove_dead_literal, and
4816 identify_literal_placement functions.
4817 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4818 instead of linear search.
4819 (is_removable_literal, remove_dead_literal,
4820 identify_literal_placement): New.
4821 (relocations_reach): Update check for literal not referenced by any
4822 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4823 (coalesce_shared_literal, move_shared_literal): New.
4824 (relax_section): Use bfd_get_section_limit. Call
4825 translate_section_fixes. Update calls to r_reloc_init and
4826 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4827 Add call to pin_internal_relocs. Add special handling for
4828 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4829 info to calculate new addend_displacement variable. Replace code for
4830 deleting literals with more general code to perform the actions
4831 determined by the action_list for the section.
4832 (translate_section_fixes, translate_reloc_bfd_fix): New.
4833 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4834 find_removed_literal only if is_operand_relocation. Update call to
4835 offset_with_removed_text. Use new target_offset and removed_bytes
4837 (move_literal): New.
4838 (relax_property_section): Use bfd_get_section_limit. Set new
4839 is_full_prop_section flag and handle new property tables. Update calls
4840 to r_reloc_init and offset_with_removed_text. Check
4841 is_relaxable_asm_section flag. Handle expansion of zero-sized
4842 unreachable entries, with use of offset_with_removed_text_before_fill.
4843 For relocatable links, combine entries only for literal tables.
4844 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4845 calls to offset_with_removed_text. Translate st_size field for
4847 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4848 failure. Add contents parameter. Update call to get_bfd_fix. Update
4849 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4850 R_XTENSA_ASM_EXPAND relocs.
4851 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4852 call to get_bfd_fix. Include offset from contents for partial_inplace
4854 (is_reloc_sym_weak): New.
4855 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4856 (prop_sec_len): New.
4857 (xtensa_is_property_section): Handle new property sections.
4858 (is_literal_section): Delete.
4859 (internal_reloc_compare): When r_offset matches, compare r_info and
4860 r_addend to make sorting predictable.
4861 (internal_reloc_matches): New.
4862 (xtensa_get_property_section_name): Handle new property sections.
4863 (xtensa_get_property_predef_flags): New.
4864 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4865 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4866 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4867 (xtisa_errno, xtisa_error_msg): New variables.
4868 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4869 (xtensa_insnbuf_alloc): Add error handling.
4870 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4871 use xtensa_format_decode. Add error handling.
4872 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4873 instruction length to find the number of bytes to copy.
4874 (xtensa_isa_init): Add error handling. Replace calls to
4875 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4876 tables in the xtensa_modules structure.
4877 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4878 xtensa_extend_isa): Delete.
4879 (xtensa_isa_free): Change to only free lookup tables.
4880 (opname_lookup_compare): Replace with ...
4881 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4882 (xtensa_insn_maxlength): Rename to ...
4883 (xtensa_isa_maxlength): ... this.
4884 (xtensa_insn_length): Delete.
4885 (xtensa_insn_length_from_first_byte): Replace with ...
4886 (xtensa_isa_length_from_chars): ... this function.
4887 (xtensa_num_opcodes): Rename to ...
4888 (xtensa_isa_num_opcodes): ... this.
4889 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4890 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4891 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4892 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4893 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4894 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4895 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4896 (xtensa_opcode_lookup): Add error handling.
4897 (xtensa_decode_insn): Replace with ...
4898 (xtensa_opcode_decode): ... this function, with new format and
4899 slot parameters. Add error handling.
4900 (xtensa_encode_insn): Replace with ...
4901 (xtensa_opcode_encode): ... this function, which does the encoding via
4902 one of the entries in the "encode_fns" array. Add error handling.
4903 (xtensa_opcode_name): Add error handling.
4904 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4905 xtensa_opcode_is_call): New.
4906 (xtensa_num_operands): Replace with ...
4907 (xtensa_opcode_num_operands): ... this function. Add error handling.
4908 (xtensa_opcode_num_stateOperands,
4909 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4910 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4911 xtensa_operand_is_visible): New.
4912 (xtensa_get_operand, xtensa_operand_kind): Delete.
4913 (xtensa_operand_inout): Add error handling and special-case for
4915 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4916 operate on one slot of an instruction. Added error handling.
4917 (xtensa_operand_encode): Handle default operands with no encoding
4918 functions. Check for success by comparing against decoded value.
4920 (xtensa_operand_decode): Handle default operands. Return decoded value
4921 through argument pointer. Add error handling.
4922 (xtensa_operand_is_register, xtensa_operand_regfile,
4923 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4924 (xtensa_operand_isPCRelative): Rename to ...
4925 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4926 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4927 through argument pointer. Add error handling.
4928 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4929 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4930 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4931 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4932 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4933 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4934 xtensa_state_is_exported, xtensa_sysreg_lookup,
4935 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4936 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4937 xtensa_interface_num_bits, xtensa_interface_inout,
4938 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4939 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4940 * xtensa-modules.c: Rewrite to use new data structures.
4941 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4942 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4943 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4944 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4945 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4946 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4947 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4948 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4949 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4950 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4951 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4952 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4953 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4954 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4955 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4956 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4957 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4958 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4959 * Makefile.in: Regenerate.
4960 * bfd-in2.h: Likewise.
4961 * libbfd.h: Likewise.
4963 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4965 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4966 against the absolute section.
4967 (mips_elf64_write_rela): Likewise.
4969 2004-10-07 Jan Beulich <jbeulich@novell.com>
4971 * elf.c (elf_find_function): Don't generally check for matching
4972 section, just for non-file symbols. Remove redunant comparison
4974 * elf32-arm.h (arm_elf_find_function): Likewise.
4976 2004-10-07 Jeff Baker <jbaker@qnx.com>
4978 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4979 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4982 2004-10-04 Roland McGrath <roland@redhat.com>
4984 * hash.c (bfd_hash_set_default_size): Use const for table.
4985 Use size_t instead of int for variable compared to sizeof results.
4987 2004-10-05 Alan Modra <amodra@bigpond.net.au>
4990 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4992 2004-10-01 Paul Brook <paul@codesourcery.com>
4994 * elf32-arm.h (elf32_arm_fake_sections,
4995 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4997 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4999 2004-10-01 Alan Modra <amodra@bigpond.net.au>
5001 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5003 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5004 need_relative or need_lsda_relative if we are processing an
5005 offset for a reloc on a FDE initial loc or LSDA field
5007 (_bfd_elf_write_section_eh_frame): Test need_relative and
5008 need_lsda_relative in place of corresponding make_* field
5009 when deciding to use pc-relative encodings.
5011 2004-09-30 Paul Brook <paul@codesourcery.com>
5013 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5014 target2 relocation type.
5016 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5019 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5021 2004-09-30 Paul Brook <paul@codesourcery.com>
5023 * reloc.c: Add BFD_RELOC_ARM_SMI.
5024 * bfd-in2.h: Regenerate.
5027 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5029 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5030 vma and output offset to address.
5031 * simple.c (simple_save_output_info): Only set output section
5032 and offset for debug sections, or those not already set up by
5034 (bfd_simple_get_relocated_section_contents): Update comment.
5036 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5038 * elf.c (IS_LOADED): Delete.
5039 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5040 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5043 2004-09-23 Alan Modra <amodra@bigpond.net.au>
5046 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5047 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5048 redundant assignment of EM_SPARC.
5050 2004-09-22 Brian Ford <ford@vss.fsi.com>
5052 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5053 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5055 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5057 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5059 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5060 (elf_backend_modify_segment_map): Don't define.
5062 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5064 * elf.c (IS_LOADED): Define.
5065 (assign_file_positions_for_segments): Don't round up file offset of
5066 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5067 Delete code handling link script adjustment of lma. Do the adjust
5068 in later code handling similar ajustments. Remove dead code error
5069 check. Warn if section lma would require a negative offset
5070 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5071 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5072 update voff in section loop. Change voff in segment loop to be an
5073 adjustment on top of "off". Set sec->filepos and update "off" later.
5074 Test for loadable sections consistently using IS_LOADED. Similarly,
5075 test for alloc-only sections other than .tbss consistently.
5076 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5077 Tidy PT_NOTE handling. Use %B and %A in error messages.
5078 (assign_file_positions_except_relocs): Use %B in error message.
5080 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5082 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5083 (CONFIG_STATUS_DEPENDENCIES): New.
5084 (Makefile): Removed.
5085 (config.status): Likewise.
5086 * Makefile.in: Regenerated.
5088 2004-09-17 Paul Brook <paul@codesourcery.com>
5090 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5091 (bfd_elf32_arm_process_before_allocation): Update prototype.
5092 * bfd-in2.h: Regenerate.
5093 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5094 (elf32_arm_link_hash_table_create): Set it.
5095 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5096 (bfd_elf32_arm_set_target_relocs): New function.
5097 (arm_real_reloc_type): New function.
5098 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5099 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5100 (elf32_arm_gc_sweep_hook): Ditto.
5101 (elf32_arm_check_relocs): Ditto.
5102 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5103 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5105 (elf32_arm_got_prel): New variable.
5106 (elf32_arm_howto_from_type): New function.
5107 (elf32_arm_info_to_howto): Use it.
5108 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5109 BFD_RELOC_ARM_TARGET2.
5110 * libbfd.h: Regenerate.
5111 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5113 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5115 * ecoff.c: Update u.undef.next refs.
5116 * elf64-ppc.c: Likewise.
5117 * elflink.c: Likewise.
5118 * linker.c: Likewise.
5119 * xcofflink.c: Likewise.
5121 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5122 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5123 fields to indirect struct.
5124 * elf-m10300.c: Update u.weakdef refs.
5125 * elf32-arm.h: Likewise.
5126 * elf32-cris.c: Likewise.
5127 * elf32-frv.c: Likewise.
5128 * elf32-hppa.c: Likewise.
5129 * elf32-i370.c: Likewise.
5130 * elf32-i386.c: Likewise.
5131 * elf32-m32r.c: Likewise.
5132 * elf32-m68k.c: Likewise.
5133 * elf32-ppc.c: Likewise.
5134 * elf32-s390.c: Likewise.
5135 * elf32-sh.c: Likewise.
5136 * elf32-sparc.c: Likewise.
5137 * elf32-vax.c: Likewise.
5138 * elf32-xtensa.c: Likewise.
5139 * elf64-alpha.c: Likewise.
5140 * elf64-hppa.c: Likewise.
5141 * elf64-ppc.c: Likewise.
5142 * elf64-s390.c: Likewise.
5143 * elf64-sh64.c: Likewise.
5144 * elf64-sparc.c: Likewise.
5145 * elf64-x86-64.c: Likewise.
5146 * elfxx-ia64.c: Likewise.
5147 * elfxx-mips.c: Likewise.
5148 * elflink.c: Likewise. Also u.elf_hash_value.
5149 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5151 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5152 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5153 (bfd_elf_gc_record_vtentry): Likewise.
5154 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5156 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5158 * Makefile.am: Run "make dep-am".
5159 * Makefile.in: Regenerate.
5160 * bfd-in2.h: Regenerate.
5161 * po/SRC-POTFILES.in: Regenerate.
5162 * po/bfd.pot: Regenerate.
5164 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5166 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5167 with bitfields. Make "type" and "other" bitfields too.
5168 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5169 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5170 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5171 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5172 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5173 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5174 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5175 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5176 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5177 * elf-m10300.c: Likewise.
5179 * elf32-arm.h: Likewise.
5180 * elf32-cris.c: Likewise.
5181 * elf32-frv.c: Likewise.
5182 * elf32-hppa.c: Likewise.
5183 * elf32-i370.c: Likewise.
5184 * elf32-i386.c: Likewise.
5185 * elf32-m32r.c: Likewise.
5186 * elf32-m68k.c: Likewise.
5187 * elf32-ppc.c: Likewise.
5188 * elf32-s390.c: Likewise.
5189 * elf32-sh-symbian.c: Likewise.
5190 * elf32-sh.c: Likewise.
5191 * elf32-sh64.c: Likewise.
5192 * elf32-sparc.c: Likewise.
5193 * elf32-vax.c: Likewise.
5194 * elf32-xtensa.c: Likewise.
5195 * elf64-alpha.c: Likewise.
5196 * elf64-hppa.c: Likewise.
5197 * elf64-ppc.c: Likewise.
5198 * elf64-s390.c: Likewise.
5199 * elf64-sh64.c: Likewise.
5200 * elf64-sparc.c: Likewise.
5201 * elf64-x86-64.c: Likewise.
5202 * elflink.c: Likewise.
5203 * elfxx-ia64.c: Likewise.
5204 * elfxx-mips.c: Likewise.
5205 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5206 * configure: Regenerate.
5207 * aclocal.m4: Regenerate.
5209 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5211 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5212 around uses of R_ARM_TARGET1.
5213 (elf32_arm_check_relocs): Likewise.
5215 2004-09-13 Paul Brook <paul@codesourcery.com>
5217 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5219 * bfd-in2.h: Regenerate.
5220 * libbfd.h: Regenerate.
5221 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5222 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5223 (bfd_elf32_arm_process_before_allocation): Ditto.
5224 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5225 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5226 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5229 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5231 * hpux-core.c (thread_section_p): New function.
5232 (hpux_core_core_file_p): Fix computation of offset in call
5233 to bfd_seek. Create a ".reg" section from an arbitrary
5234 ".reg/<id>" section if none was created after having read
5237 2004-09-11 Andreas Schwab <schwab@suse.de>
5239 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5240 * aclocal.m4: Rebuild.
5241 * configure: Rebuild.
5243 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5245 * section.c (bfd_sections_find_if): Fix parameter name in
5246 comment to match code.
5248 2004-09-10 Alan Modra <amodra@bigpond.net.au>
5250 * elf.c (assign_file_positions_except_relocs): Assign relocs
5251 stored in a bfd section.
5253 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
5255 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5256 h->gotplt_refcount to 0, not -1.
5258 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
5260 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5261 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5263 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5264 handle symbol visibility here.
5266 2004-09-07 Alan Modra <amodra@bigpond.net.au>
5268 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5269 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5271 (ppc_stub_name): Remove trailing "+0" on stub name.
5272 (create_linkage_sections): Create relocations for
5273 branch lookup table when --emit-relocs as well as when --shared.
5274 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5275 relbrlt test. For --emit-stub-syms, always output a sym even when
5276 one already exists on a plt call stub. Put stub type in the stub
5278 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5280 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5281 reloc_count in stub sections. Adjust relbrlt test.
5282 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5283 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5284 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5285 for relocs against discarded symbols. Fix comments.
5287 2004-09-06 Mark Mitchell <mark@codesourcery.com>
5289 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5290 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5292 (map_sections_to_segments): ... here. Use it. Assign a file
5293 position to the .dynamic section if it is not loadable, but part
5294 of the PT_DYNAMIC segment.
5295 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5296 offsets, not VMAs, for the BPABI. Do not fill in the header in
5297 the .got.plt section for the BPABI.
5298 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5300 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5302 2004-09-06 Nick Clifton <nickc@redhat.com>
5304 * elflink.c (elf_link_add_object_symbols): Set the error code to
5305 bfd_error_wrong_format when the input format does not match the
5308 2004-09-06 Alan Modra <amodra@bigpond.net.au>
5310 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5311 (ppc64_elf_check_directives): ..here.
5312 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5313 before accessing ppc64_elf_tdata.
5314 (ppc64_elf_finish_dynamic_sections): And here too.
5316 2004-09-04 Alan Modra <amodra@bigpond.net.au>
5318 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5320 2004-09-03 Mark Mitchell <mark@codesourcery.com>
5322 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5323 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5324 (bfd_elf32_littlearm_symbian_vec): Likewise.
5325 * configure: Regenerated.
5326 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5327 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5328 (PLT_ENTRY_SIZE): Likewise.
5329 (bfd_vma_elf32_arm_symbian_plt_entry): New
5331 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5333 (create_got_section): Don't create sections when generating BPABI
5335 (elf32_arm_create_dynamic_sections): Tidy.
5336 (elf32_arm_link_hash_table_create): Set plt_header_size,
5337 plt_entry_size, and symbian_p.
5338 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5339 generating BPABI objects.
5340 (allocate_dynrelocs): Use htab->plt_header_size, not
5341 PLT_HEADER_SIZE. Do not add to .got.plt when
5342 generating BPABI objects.
5343 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5344 * elfarm-nabi.c: Add SymbianOS target vectors.
5345 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5346 (_bfd_elf_link_create_dynamic_sections): Likewise.
5347 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5348 (elfNN_bed): Use it.
5349 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5350 (bfd_elf32_littlearm_symbian_vec): Likewise.
5351 (_bfd_target_vector): Add them.
5353 2004-09-03 Nick Clifton <nickc@redhat.com>
5356 * coffcode.h (handle_COMDAT): Replace abort with an warning
5357 message and allow the scan to continue.
5359 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5361 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5362 in when reading relocs, not our sorted syms. Remove unnecessary
5365 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5367 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5369 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5371 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5372 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5373 replace uses of *_alias with *_noncanonical.
5374 * aclocal.m4: Rebuild with aclocal 1.4p6.
5375 * Makefile.in: Rebuild with automake 1.4p6.
5376 * doc/Makefile.in: Rebuild with automake 1.4p6.
5377 * configure.in: Autoupdate with autoupdate 2.59.
5378 * config.in: Regenerate with autoheader 2.59.
5379 * configure: Regnerate with autoconf 2.59.
5381 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5383 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5384 symbol pointer arrays before modifying.
5386 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5388 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5389 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5390 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5391 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5392 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5393 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5394 Use both symbol tables on non-relocatable objects. Use a common
5395 error exit. Fix "mid" warning.
5396 * libbfd.h: Regenerate.
5397 * bfd-in2.h: Regenerate.
5399 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5401 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5403 (struct sfpr_def_parms): Save some space.
5404 (sfpr_define): Here too.
5406 * elf64-ppc.c (compare_symbols): Put section syms first.
5407 (sym_exists_at): New function.
5408 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5409 points only for relocatable files. Use .opd section contents
5410 otherwise. Generally clean up the code.
5412 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5414 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5415 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5416 (struct sfpr_def_parms): New.
5417 (sfpr_define): New function.
5418 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5419 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5420 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5421 (savefpr1_tail, restfpr1_tail): New functions.
5422 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5423 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5424 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5425 code. Define all ABI mandated _save and _rest functions.
5427 2004-08-26 Paul Brook <paul@codesourcery.com>
5429 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5431 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5433 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5436 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5438 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5439 that pcrel correction is applied for R_386_PC32.
5441 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5443 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5444 for R_386_32 and R_386_PC32 relocs against symbols defined in
5447 2004-08-25 Dmitry Diky <diwil@spec.ru>
5449 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5450 Add new relocations.
5451 * bfd-in2.h: Regenerate.
5452 * libbfd.h: Regenerate.
5453 * elf32-msp430.c: Clean-up code.
5454 (elf_msp430_howto_table): Add new relocation entries.
5455 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5456 (msp430_elf_relax_section): New function.
5457 (msp430_elf_relax_delete_bytes): New function.
5458 (msp430_elf_symbol_address_p): New function.
5460 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5462 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5463 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5465 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5467 * elflink.c (_bfd_elf_section_already_linked): Handle
5468 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5470 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5472 * config.bfd (arm*-*-symbianelf*): New target.
5473 (arm*-*-eabi*): Likewise.
5475 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5477 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5478 "struct ppc_link_hash_entry *".
5479 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5480 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5482 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5484 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5485 entries (where fd_aux overlaps next entry's fd_func).
5486 Add non_overlapping argument, use it.
5487 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5488 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5489 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5490 as indexes into opd_sym_map/opd_adjust array.
5491 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5493 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5495 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5496 if we can look up their function descriptor in a regular file.
5498 2004-08-18 Nick Clifton <nickc@redhat.com>
5501 * cofflink.c (coff_link_add_symbols): Check that the comdat
5502 pointer in the coff_section_data structure has been initialised
5505 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5508 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5509 changing bfd_link_hash_undefined to bfd_link_hash_new.
5511 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5513 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5515 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5516 (synthetic_opd, synthetic_relocatable): New variables.
5517 (compare_symbols, compare_relocs): New helper routines.
5518 (ppc64_elf_get_synthetic_symtab): New function.
5519 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5521 * bfd-in2.h: Regenerated.
5522 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5523 to relsyms. Return 0 if abfd is relocatable.
5525 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5527 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5529 2004-08-17 Nick Clifton <nickc@redhat.com>
5531 * (is_arm_mapping_symbol_name): New function - return true
5532 when a symbol name matches the requirements for an ARM mapping
5534 (arm_elf_find_function): New function based on
5535 elf_find_function in elf.c but skipping ARM mapping symbols
5536 and including thumb function symbols.
5537 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5538 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5540 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5542 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5543 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5544 (ppc64_elf_brtaken_reloc): Here too.
5546 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5548 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5550 (ppc64_elf_check_directives): Check that we have the right hash
5551 table before proceeding.
5553 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5555 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5556 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5557 the sections that will be discarded.
5559 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5561 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5563 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5565 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5566 free space available.
5568 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5570 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5571 occurrences with bfd_byte * thoughout file.
5573 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5574 (xcoff_write_armap_big): Likewise.
5575 (xcoff_write_archive_contents_old): Likewise.
5576 (xcoff_write_archive_contents_big): Likewise.
5578 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5580 2004-08-13 Nick Clifton <nickc@redhat.com>
5582 * elf32-arm.h: Convert to ISO C90.
5584 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5587 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5590 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5592 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5593 (bfd_archive_filename, bfd_get_section_ident): Delete.
5594 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5595 bfd_archive_filename.
5596 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5597 to warn about symbols in discarded sections. Use _bfd_error_handler.
5598 * aout-adobe.c (aout_adobe_callback): See below.
5599 * aout-cris.c (swap_ext_reloc_in): ..
5600 * coff-arm.c (find_thumb_glue, find_arm_glue,
5601 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5602 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5603 coff_arm_copy_private_bfd_data): ..
5604 * coff-i860.c (i860_reloc_processing): ..
5605 * coff-mcore.c (mcore_coff_unsupported_reloc,
5606 coff_mcore_relocate_section): ..
5607 * coff-ppc.c (coff_ppc_relocate_section): ..
5608 * coff-rs6000.c (xcoff_create_csect_from_smclas
5609 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5610 sh_swap_insns, sh_relocate_section): ..
5611 * coff-tic54x.c (tic54x_reloc_processing): ..
5612 * coff-tic80.c (coff_tic80_relocate_section): ..
5613 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5614 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5615 coff_slurp_symbol_table, coff_classify_symbol,
5616 coff_slurp_reloc_table): ..
5617 * coffgen.c (_bfd_coff_read_string_table): ..
5618 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5619 _bfd_coff_generic_relocate_section): ..
5620 * cpu-arm.c (bfd_arm_merge_machines): ..
5621 * cpu-sh.c (sh_merge_bfd_arch): ..
5622 * elf-hppa.h (elf_hppa_relocate_section): ..
5623 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5624 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5625 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5626 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5627 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5628 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5629 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5630 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5631 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5632 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5633 cris_elf_merge_private_bfd_data
5634 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5635 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5636 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5637 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5638 elf32_hppa_relocate_section): ..
5639 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5640 i370_elf_check_relocs, i370_elf_relocate_section): ..
5641 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5642 elf_i386_relocate_section): ..
5643 * elf32-m32r.c (m32r_elf_relocate_section,
5644 m32r_elf_merge_private_bfd_data): ..
5645 * elf32-m68hc1x.c (m68hc12_add_stub,
5646 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5647 * elf32-m68k.c (elf_m68k_relocate_section): ..
5648 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5649 mcore_elf_relocate_section): ..
5650 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5651 ppc_elf_check_relocs, ppc_elf_relocate_section,
5652 ppc_elf_begin_write_processing): ..
5653 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5654 elf_s390_relocate_section): ..
5655 * elf32-sh-symbian.c (sh_symbian_import_as,
5656 sh_symbian_process_embedded_commands,
5657 sh_symbian_relocate_section): ..
5658 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5659 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5660 sh_elf_merge_private_data): ..
5661 * elf32-sparc.c (elf32_sparc_check_relocs,
5662 elf32_sparc_relocate_section,
5663 elf32_sparc_merge_private_bfd_data): ..
5664 * elf32-v850.c (v850_elf_check_relocs,
5665 v850_elf_merge_private_bfd_data): ..
5666 * elf32-xtensa.c (elf_xtensa_check_relocs,
5667 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5668 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5669 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5670 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5671 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5672 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5673 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5674 ppc64_elf_relocate_section): ..
5675 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5676 elf_s390_relocate_section): ..
5677 * elf64-sh64.c (sh_elf64_relocate_section): ..
5678 * elf64-sparc.c (sparc64_elf_check_relocs,
5679 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5680 sparc64_elf_merge_private_bfd_data): ..
5681 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5682 elf64_x86_64_relocate_section): ..
5683 * elflink.c (_bfd_elf_add_default_symbol,
5684 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5685 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5686 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5687 elf_get_linked_section_vma, elf_fixup_link_order,
5688 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5689 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5690 * elfxx-ia64.c (elfNN_ia64_relax_section,
5691 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5692 * elfxx-mips.c (mips_elf_perform_relocation,
5693 _bfd_mips_elf_check_relocs,
5694 _bfd_mips_elf_merge_private_bfd_data): ..
5695 * ieee.c (ieee_slurp_external_symbols): ..
5696 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5697 * libbfd.c (_bfd_generic_verify_endian_match): ..
5698 * linker.c (_bfd_generic_link_add_one_symbol,
5699 _bfd_generic_section_already_linked): ..
5700 * pdp11.c (translate_to_native_sym_flags): ..
5701 * pe-mips.c (coff_pe_mips_relocate_section): ..
5702 * peicode.h (pe_ILF_build_a_bfd): ..
5703 * srec.c (srec_bad_byte): ..
5704 * stabs.c (_bfd_link_section_stabs): ..
5705 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5706 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5707 with corresponding %B and %A in _bfd_error_handler format string.
5708 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5709 calls to use %A and %B. Fix "against symbol .. from section" and
5710 similar error messages. Combine multiple _bfd_error_handler calls
5711 where they were separated due to bfd_archive_filename deficiencies.
5712 * bfd-in2.h: Regenerate.
5714 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5716 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5719 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5721 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5722 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5723 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5725 (link_hash_newfunc): Init was_undefined.
5726 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5727 Use undefweak instead.
5728 (ppc64_elf_check_directives): Fix undefs chain.
5729 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5731 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5732 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5733 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5735 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5737 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5738 error, test input_section flags rather than sec.
5740 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5742 * elf-bfd.h (struct elf_backend_data): Add
5743 elf_backend_archive_symbol_lookup.
5744 (_bfd_elf_archive_symbol_lookup): Declare.
5745 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5746 (elf_link_add_archive_symbols): ..extracted from here. Call the
5748 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5749 (elfNN_bed): Init new field.
5750 * elf64-ppc.c (elf_backend_check_directives): Define.
5751 (elf_backend_archive_symbol_lookup): Define.
5752 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5753 a ppc_link_hash_entry pointer.
5755 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5756 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5757 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5758 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5759 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5760 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5761 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5764 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5766 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5767 (ppc64_elf_add_symbol_hook): Test for NULL section.
5768 (get_sym_h): Formatting.
5769 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5772 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5773 long branch stubs with code handling plt and r2off branch stubs.
5775 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5777 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5778 * elflink.c (elf_link_input_bfd): Formatting.
5779 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5781 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5782 (link_hash_newfunc): Don't set it.
5783 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5784 (ppc64_elf_mark_entry_syms): Delete.
5785 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5786 sections. Use get_opd_info.
5787 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5789 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5791 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5793 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5794 (func_desc_adjust): Don't set have_undefweak.
5795 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5796 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5798 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5799 "struct ppc_link_hash_entry *". Adjust all references.
5800 (ppc64_elf_hide_symbol): Correct a comment.
5802 * elf64-ppc.c (get_opd_info): New function.
5803 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5804 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5805 before calling get_fdh. Test fdh rather than h before dereferencing
5806 fdh. Mark removed symbols in opd_adjust.
5807 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5808 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5810 (ppc64_elf_output_symbol_hook): Likewise.
5812 2004-08-06 Paul Brook <paul@codesourcery.com>
5814 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5815 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5816 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5817 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5818 and BFD_RELOC_ARM_SBREL32.
5819 * bfd-in2.h, bbfd.h: Regenerate.
5821 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5823 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5824 the dynamic link symbol actually in use.
5826 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5828 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5830 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5831 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5833 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5834 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5836 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5837 Nick Clifton <nickc@redhat.com>
5840 * bfd.c (_bfd_default_error_handler): Make it global.
5842 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5844 * elf.c (assign_section_numbers): Cope gracefully with sections
5845 which have SHF_LINK_ORDER set but no sh_link set up.
5846 * elflink.c (elf_get_linked_section_vma): Likewise.
5848 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5851 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5852 Set it to _bfd_default_error_handler.
5853 (elfNN_bed): Add elf_backend_link_order_error_handler.
5855 * libbfd-in.h (_bfd_default_error_handler): New.
5857 * libbfd.h: Regenerated.
5859 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5861 * archures.c (bfd_mach_sparc_64bit_p): Define.
5862 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5863 * bfd-in2.h: Rebuilt.
5865 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5867 Introduce SH2a support.
5868 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5869 * archures.c (bfd_mach_sh2a_nofpu): New.
5870 * bfd-in2.h: Rebuilt.
5871 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5872 (arch_info_struct): Add sh2a_nofpu.
5873 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5874 2003-12-29 DJ Delorie <dj@redhat.com>
5875 * reloc.c: Add relocs for sh2a.
5876 * bfd-in2.h: Regenerate.
5877 * libbfd.hh: Regenerate.
5878 2003-12-01 Michael Snyder <msnyder@redhat.com>
5879 * archures.c (bfd_mach_sh2a): New.
5880 * bfd-in2.h: Rebuilt.
5881 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5883 (arch_info_struct): Add sh2a.
5884 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5886 2004-07-28 Nick Clifton <nickc@redhat.com>
5887 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5890 * som.c (setup_sections): Improve estimation of space sizes in
5891 relocatable objects.
5893 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5894 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5895 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5897 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5898 * configure: Regenerate.
5899 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5900 case that accepts OSABI=NetBSD and OSABI=SysV.
5901 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5902 the base of .got or .data (if .got does not exist).
5903 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5905 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5906 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5907 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5908 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5910 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5913 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5914 (elf_sec_group): Defined.
5915 (bfd_elf_match_symbols_in_sections): New prototype.
5916 (_bfd_elf_setup_group_pointers): Likewise.
5918 * elf.c (bfd_elf_discard_group): Abort.
5919 (bfd_elf_set_group_contents): Also include relocation sections.
5920 Remove zero-fill for ld -r.
5921 (_bfd_elf_setup_group_pointers): New function.
5922 (elf_sort_elf_symbol): Likewise.
5923 (elf_sym_name_compare): Likewise.
5924 (bfd_elf_match_symbols_in_sections): Likewise.
5926 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5928 * elflink.c (match_group_member): New.
5929 (elf_link_input_bfd): Check group member for discarded section.
5930 (try_match_symbols_in_sections): New function.
5931 (already_linked): Likewise.
5932 (_bfd_elf_section_already_linked): Support mixing comdat group
5933 and linkonce section.
5935 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5936 * linker.c (bfd_section_already_linked_table_traverse): New.
5938 * libbfd.h: Regenerated.
5940 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5942 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5943 BFD_RELOC_CRX_SWITCH32.
5944 * bfd-in2.h: Regenerate.
5945 * libbfd.h: Regenerate.
5946 * elf32-crx.c: Support relocation/relaxation of
5947 BFD_RELOC_CRX_SWITCH* types.
5949 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5951 * elf64-ppc.c: Correct "Linker stubs" comment.
5953 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5955 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5957 (elf_linked_to_section): New.
5959 * elf.c (assign_section_numbers): Set up sh_link for
5962 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5963 to sh_link for SHT_IA_64_UNWIND sections.
5965 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5967 * elflink.c (elf_fixup_link_order): Add _() to error message.
5969 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5971 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5974 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5976 * aout-adobe.c (aout_32_section_already_linked): Defined.
5977 * aout-target.h (MY_section_already_linked): Likewise.
5978 * aout-tic30.c (MY_section_already_linked): Likewise.
5979 * binary.c (binary_section_already_linked): Likewise.
5980 * bout.c (b_out_section_already_linked): Likewise.
5981 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5982 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5983 * coffcode.h (coff_section_already_linked): Likewise.
5984 * i386msdos.c (msdos_section_already_linked): Likewise.
5985 * i386os9k.c (os9k_section_already_linked): Likewise.
5986 * ieee.c (ieee_section_already_linked): Likewise.
5987 * ihex.c (ihex_section_already_linked): Likewise.
5988 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5989 * mmo.c (mmo_section_already_linked): Likewise.
5990 * nlm-target.h (nlm_section_already_linked): Likewise.
5991 * oasys.c (oasys_section_already_linked): Likewise.
5992 * pef.c (bfd_pef_section_already_linked): Likewise.
5993 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5994 * som.c (som_bfd_discard_group): Likewise.
5995 * srec.c (srec_section_already_linked): Likewise.
5996 * tekhex.c (tekhex_section_already_linked): Likewise.
5997 * versados.c (versados_section_already_linked): Likewise.
5998 * vms.c (vms_section_already_linked): Likewise.
5999 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6000 * xsym.c (bfd_sym_section_already_linked): Likewise.
6002 * bfd-in.h (bfd_section_already_linked_table_init): New.
6003 (bfd_section_already_linked_table_free): Likewise.
6005 * coff-rs6000.c (rs6000coff_vec): Add
6006 _bfd_generic_section_already_linked.
6007 (pmac_xcoff_vec): Likewise.
6008 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6009 (aix5coff64_vec): Likewise.
6011 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6012 * elflink.c (_bfd_elf_section_already_linked): New function.
6014 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6016 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6017 (_bfd_generic_section_already_linked): New.
6018 (bfd_section_already_linked_hash_entry): Likewise.
6019 (bfd_section_already_linked): Likewise.
6020 (bfd_section_already_linked_table_lookup): Likewise.
6021 (bfd_section_already_linked_table_insert): Likewise.
6023 * linker.c (bfd_section_already_linked): New.
6024 (_bfd_section_already_linked_table): Likewise.
6025 (bfd_section_already_linked_table_lookup): Likewise.
6026 (bfd_section_already_linked_table_insert): Likewise.
6027 (already_linked_newfunc): Likewise.
6028 (bfd_section_already_linked_table_init): Likewise.
6029 (bfd_section_already_linked_table_free): Likewise.
6030 (_bfd_generic_section_already_linked): Likewise.
6032 * section.c (bfd_section): Remove comdat.
6033 (bfd_comdat_info): Moved to ...
6034 * bfd-in.h (coff_comdat_info): Here.
6035 (bfd_coff_get_comdat_section): New.
6036 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6037 * libcoff-in.h (coff_section_tdata): Add comdat.
6038 * coffcode.h (handle_COMDAT): Updated.
6039 * cofflink.c (coff_link_add_symbols): Likewise.
6040 * ecoff.c (bfd_debug_section): Likewise.
6042 * targets.c (bfd_target): Add _section_already_linked.
6043 (BFD_JUMP_TABLE_LINK): Updated.
6045 * bfd-in2.h: Regenerated.
6046 * libbfd.h: Likewise.
6047 * libcoff.h: Likewise.
6049 2003-07-21 Paul Brook <paul@codesourcery.com>
6051 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6052 elf_fixup_link_order): New functions.
6053 (bfd_elf_final_link): Call elf_fixup_link_order.
6055 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
6057 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6058 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6060 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6061 _bfd_elf_symbol_refs_local_p.
6062 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6065 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6067 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6069 (bfd_elf_get_dyn_lib_class): New prototype.
6070 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6072 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6073 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6074 entry is needed. Issue an error if a DT_NEEDED entry is needed
6075 for a file marked DYN_NO_NEEDED.
6076 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6079 * bfd-in2.h: Regenerated.
6081 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6083 * elflink.c (elf_section_complain_discarded): Don't complain in
6086 2004-07-10 James E Wilson <wilson@specifixinc.com>
6088 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6089 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6090 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6091 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6093 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6094 bfd_put_64 to bfd_putl64.
6095 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6097 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6100 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6101 .init/.fini sections when trying to relax it.
6103 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6105 * elf.c (assign_file_positions_for_segments): Make sure the
6106 .dynamic section is the first section in the PT_DYNAMIC segment.
6108 2004-07-09 Nick Clifton <nickc@redhat.com>
6110 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6111 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6112 sh_elf_get_flags_from_mach functions so that they do not conflict
6113 when this target is built with other sh-elf targets.
6114 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6115 suppression of this function.
6116 (sh_elf_find_flags): Likewise.
6118 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6120 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6121 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6122 (BFD32_BACKENDS): Add elf32-crx.lo.
6123 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6124 (cpu-crx.lo): New target.
6125 (elf32-crx.lo): New target.
6126 * Makefile.in: Regenerate.
6127 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6128 (bfd_archures_list): Add bfd_crx_arch.
6129 * bfd-in2.h: Regenerate.
6130 * config.bfd: Handle crx-*-elf*, crx*.
6131 * configure.in: Handle bfd_elf32_crx_vec.
6132 * configure: Regenerate.
6133 * cpu-crx.c: New file.
6134 * elf32-crx.c: Likewise.
6135 * libbfd.h: Regenerate.
6136 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6137 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6138 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6139 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6140 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6141 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6142 * targets.c (bfd_elf32_crx_vec): Declare.
6143 (bfd_target_vector): Add bfd_elf32_crx_vec.
6145 2004-07-06 Nick Clifton <nickc@redhat.com>
6147 * config.bfd: Add sh-symbian-elf target.
6148 * configure.in: Add bfd_elf32_shl_symbian_vec.
6149 * configure: Regenerate.
6150 * elf-bfd.h (struct elf_backend_data): Add new field
6152 * elflink.c (elf_link_add_object_symbols): Invoke the
6153 check_directives function, if defined.
6154 * elfxx-target.h: Provide a default, NULL definition for
6156 * targets.c: Add bfd_elf32_shl_symbian_vec.
6157 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6159 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6160 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6161 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6162 not already been defined.
6163 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6164 * sh-symbian.c: New file. Provide functions to support the
6165 * sh-symbian-elf target.
6166 * Makefile.am: Add elf32-sh-symbian.c
6167 * Makefile.in: Regenerate.
6169 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6171 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6172 * Makefile.am: Ran make dep-am.
6173 * Makefile.in: Ran make dep-in.
6175 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6177 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6180 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6182 * config.bfd: Add want64 to configuration target s390-*-linux*.
6184 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6186 * bfd.c (bfd_get_section_ident): New.
6188 * elflink.c (elf_link_read_relocs_from_section): Call
6189 bfd_get_section_ident to identify the section when reporting
6191 (_bfd_elf_link_output_relocs): Likewise.
6192 (elf_link_output_extsym): Likewise.
6193 (elf_link_input_bfd): Likewise.
6194 (bfd_elf_gc_record_vtinherit): Likewise.
6196 * bfd-in2.h: Regenerated.
6198 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6199 Nick Clifton <nickc@redhat.com>
6202 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6203 of section symbols to mips_elf_sort_hash_table ().
6205 2004-07-01 Alan Modra <amodra@bigpond.net.au>
6207 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6209 (elf_section_complain_discarded): New function. Handle
6210 .gcc_except_table too.
6211 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6212 in discarded sections.
6213 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6215 2004-06-30 James E Wilson <wilson@specifixinc.com>
6217 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6218 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6220 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6223 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6224 local references to discarded sections and report their
6227 2004-06-30 Alan Modra <amodra@bigpond.net.au>
6229 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6230 sec_info_type, test section name instead.
6232 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6235 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6236 in .init/.fini sections.
6238 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6240 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6241 bfd_get_section_limit.
6243 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6245 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6246 output section size.
6248 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6250 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6252 (mmix_elf_perform_relocation): Adjust for above change.
6253 (mmix_elf_relocate_section): Likewise.
6254 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6255 (mmix_elf_get_section_contents): Delete.
6256 (bfd_elf64_get_section_contents): Delete.
6257 (mmix_elf_relocate_section): Zero stub area.
6258 * linker.c (default_indirect_link_order): Alloc max of section size
6260 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6261 * section.c (bfd_malloc_and_get_section): Likewise.
6262 (struct bfd_section): Update rawsize comment.
6263 * bfd-in2.h: Regenerate.
6265 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6267 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6269 * bfd-in.h (bfd_get_section_limit): Define.
6270 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6271 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6272 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6273 * coff-arm.c (coff_arm_relocate_section): Likewise.
6274 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6275 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6276 (bfd_ns32k_final_link_relocate): Likewise.
6277 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6278 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6279 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6280 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6281 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6282 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6283 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6284 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6285 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6286 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6287 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6288 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6289 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6290 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6291 * elf32-v850.c (v850_elf_reloc): Likewise.
6292 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6293 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6294 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6295 * elf64-mips.c (mips_elf64_gprel32_reloc)
6296 (mips16_gprel_reloc): Likewise.
6297 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6298 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6299 * elf64-sparc.c (init_insn_reloc): Likewise.
6300 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6301 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6302 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6303 (_bfd_mips_elf_generic_reloc): Likewise.
6304 * bfd-in2.h: Regenerate.
6306 2004-06-28 Alan Modra <amodra@bigpond.net.au>
6308 * bfd-in.h (struct stab_info): Move from stabs.c.
6309 * stabs.c (struct stab_link_includes_table): Delete.
6310 (stab_link_includes_lookup): Delete.
6311 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6312 level of indirection from sinfo parm.
6313 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6314 stabstr section. Adjust hash table accesses.
6315 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6316 alloc. Adjust stab_info test.
6317 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6318 (_bfd_coff_final_link): Adjust stab_info test.
6319 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6320 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6322 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6323 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6324 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6325 stabstr section. Adjust stab_info test.
6326 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6327 (_bfd_write_stab_strings): Adjust prototypes.
6328 * libbfd.h: Regenerate.
6329 * libcoff.h: Regenerate.
6330 * bfd-in2.h: Regenerate.
6332 2004-06-27 Mark Kettenis <kettenis@gnu.org>
6334 From Miod Vallat <miod@online.fr>:
6335 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6337 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
6339 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6340 (struct elf32_mn10300_link_hash_entry): Remove
6341 pcrel_relocs_copied.
6342 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6343 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6344 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6345 and gotoff relocations if the symbol doesn't bind locally. Use
6346 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6347 relocation for PCREL32.
6348 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6349 to test whether a symbol binds locally.
6350 (elf32_mn10300_link_hash_newfunc): Don't initialize
6351 pcrel_relocs_copied.
6352 (_bfd_mn10300_elf_discard_copies): Delete.
6353 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6355 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6357 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6359 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6361 * som.c (som_set_reloc_info): Correct small typo.
6363 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6365 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6366 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6367 (m32r_elf_gcsweep_hook): Likewise.
6368 (m32r_elf_check_relocs): Likewise.
6369 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6370 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6371 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6372 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6373 * bfd-in2.h: Regenerated.
6374 * libbfd.h: Regenerated.
6376 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6378 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6380 (elf64_x86_64_relocate_section): Issue an error for
6381 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6382 against global symbols when building shared library.
6384 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6386 * section.c (struct sec): Rename "_cooked_size" to "size".
6387 Rename "_raw_size" to "rawsize".
6388 (STD_SECTION): Adjust comments.
6389 (bfd_set_section_size, bfd_get_section_contents): Use size.
6390 (bfd_malloc_and_get_section): New function.
6391 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6392 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6393 Correctly free reloc and contents memory.
6394 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6395 and fake CIE now that we can shink section size to zero.
6396 (_bfd_elf_write_section_eh_frame): Likewise..
6397 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6398 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6399 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6400 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6401 unneeded indirection.
6402 * elf.c (_bfd_elf_section_offset): .. and update call.
6403 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6404 * libbfd.h: Regenerate.
6405 * bfd-in2.h: Regenerate.
6407 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6408 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6409 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6410 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6411 Similarly use "rawsize", if non-zero, in reloc functions to validate
6412 reloc addresses. Use new bfd_malloc_and_get_section in most places
6413 where bfd_get_section_contents was called. Expand all occurrences of
6414 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6415 grok_prstatus and similar functions to "size".
6416 * aix386-core.c (aix386_core_file_p): ..
6417 * aix5ppc-core.c (xcoff64_core_p): ..
6418 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6419 aout_adobe_set_section_contents): ..
6420 * aout-target.h (callback): ..
6421 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6422 MY_bfd_final_link): ..
6423 * aoutf1.h (sunos4_core_file_p): ..
6424 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6425 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6426 final_link, aout_link_input_section): ..
6427 * binary.c (binary_object_p, binary_canonicalize_symtab,
6428 binary_set_section_contents): ..
6429 * bout.c (b_out_callback, b_out_write_object_contents,
6430 b_out_set_section_contents, b_out_bfd_relax_section,
6431 b_out_bfd_get_relocated_section_contents): ..
6432 * cisco-core.c (cisco_core_file_validate): ..
6433 * coff-alpha.c (alpha_ecoff_object_p,
6434 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6435 * coff-arm.c (coff_arm_relocate_section,
6436 bfd_arm_allocate_interworking_sections): ..
6437 * coff-h8300.c (h8300_reloc16_extra_cases,
6438 h8300_bfd_link_add_symbols): ..
6439 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6440 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6441 ppc_bfd_coff_final_link): ..
6442 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6443 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6444 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6445 * coff64-rs6000.c (xcoff64_write_object_contents,
6446 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6447 * coffcode.h (coff_compute_section_file_positions,
6448 coff_write_object_contents): ..
6449 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6450 coff_section_symbol, build_debug_section): ..
6451 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6452 process_embedded_commands, _bfd_coff_link_input_bfd,
6453 _bfd_coff_write_global_sym): ..
6454 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6455 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6456 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6457 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6458 _bfd_dwarf2_find_nearest_line): ..
6459 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6460 ecoff_compute_section_file_positions,
6461 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6462 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6463 _bfd_elf_discard_section_eh_frame_hdr,
6464 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6465 _bfd_elf_write_section_eh_frame,
6466 _bfd_elf_write_section_eh_frame_hdr): ..
6467 * elf-hppa.h (elf_hppa_sort_unwind): ..
6468 * elf-m10200.c (mn10200_elf_relax_section,
6469 mn10200_elf_relax_delete_bytes,
6470 mn10200_elf_get_relocated_section_contents): ..
6471 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6472 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6473 mn10300_elf_relax_delete_bytes,
6474 mn10300_elf_get_relocated_section_contents,
6475 _bfd_mn10300_elf_adjust_dynamic_symbol,
6476 _bfd_mn10300_elf_discard_copies,
6477 _bfd_mn10300_elf_size_dynamic_sections,
6478 _bfd_mn10300_elf_finish_dynamic_sections): ..
6479 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6480 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6481 bfd_elf_set_group_contents, map_sections_to_segments,
6482 elf_sort_sections, assign_file_positions_for_segments,
6483 SECTION_SIZE, copy_private_bfd_data,
6484 _bfd_elf_get_dynamic_reloc_upper_bound,
6485 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6486 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6487 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6488 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6489 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6490 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6491 bfd_elf32_arm_process_before_allocation,
6492 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6493 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6494 elf32_arm_write_section): ..
6495 * elf32-cris.c (cris_elf_grok_prstatus,
6496 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6497 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6498 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6499 elf_cris_discard_excess_dso_dynamics,
6500 elf_cris_discard_excess_program_dynamics): ..
6501 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6502 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6503 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6504 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6505 elf32_frvfdpic_size_dynamic_sections,
6506 elf32_frvfdpic_modify_segment_map,
6507 elf32_frvfdpic_finish_dynamic_sections): ..
6508 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6509 elf32_h8_get_relocated_section_contents): ..
6510 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6511 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6512 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6513 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6514 elf32_hppa_finish_dynamic_sections): ..
6515 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6516 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6517 i370_elf_finish_dynamic_sections): ..
6518 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6519 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6520 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6521 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6522 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6523 * elf32-ip2k.c (ip2k_is_switch_table_128,
6524 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6525 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6526 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6527 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6528 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6529 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6530 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6531 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6532 m32r_elf_get_relocated_section_contents): ..
6533 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6534 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6535 m68hc11_elf_relax_delete_bytes): ..
6536 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6537 m68hc12_elf_size_one_stub): ..
6538 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6539 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6540 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6541 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6542 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6543 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6544 elf32_mips_grok_prstatus): ..
6545 * elf32-or32.c (or32_elf_consth_reloc): ..
6546 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6547 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6548 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6549 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6550 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6551 ppc_elf_final_write_processing): ..
6552 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6553 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6554 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6555 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6556 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6557 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6558 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6559 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6560 * elf32-sh64-com.c (sh64_address_in_cranges,
6561 sh64_get_contents_type): ..
6562 * elf32-sh64.c (sh64_find_section_for_address,
6563 sh64_elf_final_write_processing): ..
6564 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6565 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6566 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6567 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6568 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6569 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6570 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6571 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6572 elf_vax_finish_dynamic_sections): ..
6573 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6574 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6575 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6576 xstormy16_elf_finish_dynamic_sections): ..
6577 * elf32-xtensa.c (xtensa_read_table_entries,
6578 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6579 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6580 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6581 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6582 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6583 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6584 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6585 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6586 xtensa_callback_required_dependence): ..
6587 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6588 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6589 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6590 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6591 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6592 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6593 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6594 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6595 * elf64-hppa.c (allocate_dynrel_entries,
6596 elf64_hppa_size_dynamic_sections,
6597 elf64_hppa_finish_dynamic_sections): ..
6598 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6599 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6600 elf64_mips_grok_prstatus): ..
6601 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6602 mmix_elf_relocate_section, mmix_elf_final_link,
6603 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6604 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6605 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6606 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6607 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6608 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6609 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6610 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6611 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6612 ppc64_elf_finish_dynamic_sections): ..
6613 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6614 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6615 elf_s390_finish_dynamic_sections): ..
6616 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6617 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6618 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6619 sh64_elf64_finish_dynamic_sections): ..
6620 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6621 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6622 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6623 sparc64_elf_finish_dynamic_symbol,
6624 sparc64_elf_finish_dynamic_sections): ..
6625 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6626 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6627 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6628 elf64_x86_64_finish_dynamic_sections): ..
6629 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6630 * elfcode.h (elf_slurp_reloc_table): ..
6631 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6632 elf_finalize_dynstr, elf_link_add_object_symbols,
6633 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6634 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6635 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6636 elf32_mips_grok_prstatus): ..
6637 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6638 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6639 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6640 elfNN_ia64_finish_dynamic_sections): ..
6641 * elfxx-mips.c (mips_elf_create_procedure_table,
6642 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6643 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6644 mips_elf_global_got_index, mips_elf_multi_got,
6645 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6646 mips_elf_allocate_dynamic_relocations,
6647 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6648 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6649 _bfd_mips_elf_always_size_sections,
6650 _bfd_mips_elf_size_dynamic_sections,
6651 _bfd_mips_elf_finish_dynamic_symbol,
6652 _bfd_mips_elf_finish_dynamic_sections,
6653 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6654 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6655 _bfd_elf_mips_get_relocated_section_contents,
6656 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6657 * hp300hpux.c (callback): ..
6658 * hppabsd-core.c (make_bfd_asection): ..
6659 * hpux-core.c (make_bfd_asection): ..
6660 * i386linux.c (linux_link_create_dynamic_sections,
6661 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6662 * i386msdos.c (msdos_write_object_contents): ..
6663 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6664 os9k_set_section_contents): ..
6665 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6666 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6667 ieee_write_section_part, do_with_relocs, do_as_repeat,
6668 do_without_relocs, ieee_write_debug_part, init_for_output,
6669 ieee_set_section_contents): ..
6670 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6671 * irix-core.c (do_sections, make_bfd_asection): ..
6672 * libaout.h (aout_section_merge_with_text_p): ..
6673 * libbfd.c (_bfd_generic_get_section_contents,
6674 _bfd_generic_get_section_contents_in_window): ..
6675 * linker.c (default_indirect_link_order): ..
6676 * lynx-core.c (make_bfd_asection): ..
6677 * m68klinux.c (linux_link_create_dynamic_sections,
6678 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6679 * mach-o.c (bfd_mach_o_make_bfd_section,
6680 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6681 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6682 bfd_mach_o_scan_read_segment): ..
6683 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6684 _bfd_merge_sections): ..
6685 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6686 mmo_map_set_sizes, mmo_canonicalize_symtab,
6687 mmo_internal_write_section, mmo_write_object_contents): ..
6688 * netbsd-core.c (netbsd_core_file_p): ..
6689 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6690 nlm_alpha_set_public_section): ..
6691 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6692 * nlm32-sparc.c (nlm_sparc_write_import): ..
6693 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6694 nlm_compute_section_file_positions): ..
6695 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6696 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6697 * opncls.c (get_debug_link_info): ..
6698 * osf-core.c (make_bfd_asection): ..
6699 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6700 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6701 final_link, aout_link_input_section): ..
6702 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6703 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6704 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6705 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6706 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6707 * ptrace-core.c (ptrace_unix_core_file_p): ..
6708 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6709 _bfd_final_link_relocate, bfd_generic_relax_section,
6710 bfd_generic_get_relocated_section_contents): ..
6711 * reloc16.c (bfd_coff_reloc16_relax_section,
6712 bfd_coff_reloc16_get_relocated_section_c): ..
6713 * riscix.c (riscix_some_aout_object_p): ..
6714 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6715 * sco5-core.c (make_bfd_asection): ..
6716 * simple.c (bfd_simple_get_relocated_section_contents): ..
6717 * som.c (som_object_setup, setup_sections, som_prep_headers,
6718 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6719 som_set_reloc_info, som_get_section_contents,
6720 som_bfd_link_split_section): ..
6721 * sparclinux.c (linux_link_create_dynamic_sections,
6722 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6723 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6724 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6725 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6726 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6727 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6728 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6729 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6730 sunos_finish_dynamic_link): ..
6731 * syms.c (_bfd_stab_section_find_nearest_line): ..
6732 * tekhex.c (first_phase, tekhex_set_section_contents,
6733 tekhex_write_object_contents): ..
6734 * trad-core.c (trad_unix_core_file_p): ..
6735 * versados.c (process_esd, process_otr, process_otr): ..
6736 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6737 * vms-misc.c (add_new_contents): ..
6738 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6739 * vms.c (vms_set_section_contents): ..
6740 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6741 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6742 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6743 * xsym.c (bfd_sym_scan): .. See above.
6745 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6747 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6748 calling _bfd_merged_section_offset only for section symbols.
6750 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6752 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6753 for handling SEC_MERGE symbols in relax_section.
6755 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6757 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6758 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6759 linked together. Mark the result as h8300sx code.
6761 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6763 * elf-bfd.h (struct elf_backend_data): Added
6764 elf_backend_omit_section_dynsym.
6765 (_bfd_elf_link_omit_section_dynsym): Declare.
6766 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6767 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6768 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6769 (_bfd_elf_link_renumber_dynsyms): ... this function.
6770 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6771 _bfd_elf_link_omit_section_dynsym).
6772 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6774 2004-06-21 Nick Clifton <nickc@redhat.com>
6776 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6779 2004-06-17 Jerome Guitton <guitton@gnat.com>
6781 * bfd-in.h (bfd_cache_close_all): New function declaration.
6782 * bfd-in2.h: Regenerate.
6783 * cache.c (bfd_cache_close_all): New function definition.
6785 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6787 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6789 * configure: Regenerate.
6791 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6793 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6794 the pre-existing section.
6796 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6798 * section.c (struct sec): Remove usused flags. Reorganize a little.
6799 (bfd_get_section_size_before_reloc): Delete.
6800 (bfd_get_section_size_after_reloc): Delete.
6801 (STD_SECTION): Update.
6802 (bfd_get_section_size_now): Delete.
6803 (bfd_set_section_contents): Don't referece reloc_done.
6804 (bfd_get_section_contents): Remove reloc_done comment.
6805 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6807 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6808 * ecoff.c (bfd_debug_section): Update initializer.
6809 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6810 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6811 * bfd-in.h (bfd_section_size): Expand.
6812 (bfd_get_section_size): New macro.
6813 * bfd-in2.h: Regenerate.
6814 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6815 bfd_get_section_size_before_reloc with bfd_get_section_size.
6816 * coffcode.h (coff_write_object_contents): Likewise.
6817 * coffgen.c (build_debug_section): Likewise.
6818 * dwarf1.c (parse_line_table): Likewise.
6819 (_bfd_dwarf1_find_nearest_line): Likewise.
6820 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6821 * i386msdos.c (msdos_write_object_contents): Likewise.
6822 * pdp11.c (squirt_out_relocs): Likewise.
6823 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6824 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6826 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6828 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6829 removal) with updated comment.
6830 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6832 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6833 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6835 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6837 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6838 overflow on branches to undefweaks.
6840 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6842 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6843 as ecoff_section_data() does not return a valid lvalue.
6845 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6847 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6848 (elf_link_add_object_symbols): Likewise.
6850 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6851 (elf_backend_reloc_type_class): New.
6853 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6855 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6857 * configure: Regenerate.
6859 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6861 From: Albert Chin-A-Young <china@thewrittenword.com>
6862 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6865 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6867 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6870 2004-05-28 DJ Delorie <dj@redhat.com>
6872 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6873 for linking, but otherwise adjust reloc for merged sections.
6875 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6877 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6878 _bfd_merged_section_offset for local symbols.
6880 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6882 * Makefile.am: Regenerate dependencies.
6883 * Makefile.in: Regenerate.
6884 * archures.c: Add bfd_mach_sh3_nommu .
6885 * bfd-in2.h: Regenerate.
6886 * cpu-sh.c: Add sh3-nommu architecture.
6887 (bfd_to_arch_table): Create new table.
6888 (sh_get_arch_from_bfd_mach): Create new function.
6889 (sh_get_arch_up_from_bfd_mach): Create new function.
6890 (sh_merge_bfd_arch): Create new function.
6891 * elf32-sh.c (sh_ef_bfd_table): Add table.
6892 (sh_elf_check_relocs): Replace switch statement with
6893 use of sh_ef_bfd_table .
6894 (sh_elf_get_flags_from_mach): Add new function.
6895 (sh_find_elf_flags): Likewise.
6896 (sh_elf_copy_private_data): Replace most of non-elf contents
6897 with a call to sh_merge_bfd_arch() .
6899 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6901 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6902 * Makefile.in: Regenerate.
6904 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6906 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6907 custom calling conventions for dynamic symbols.
6908 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6909 symbol if it's an alias to a global one.
6911 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6913 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6916 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6918 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6921 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6923 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6924 for SHT_GROUP sections.
6926 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6928 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6930 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6931 * merge.c: Formatting. Remove unnecessary casts. Expand
6932 bfd_get_section_alignment macro.
6933 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6934 use throughout file.
6935 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6936 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6937 section name to determine sinfo group, instead test output section
6939 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6940 _bfd_strip_section_from_output rather than just twiddling flags.
6941 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6942 (_bfd_merge_sections): Update prototype.
6943 * libbfd.h: Regenerate.
6945 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6947 * netbsd-core.c: Correctly indent section that sets architecture
6950 From Miod Vallat <miod@online.fr>:
6951 * m88kopenbsd.c: New file.
6952 * targets.c (m88k_openbsd_vec): New.
6953 * config.bfd: Add m88k-*-openbsd*.
6954 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6955 (m88kopenbsd_vec): New.
6956 * configure: Regenerate.
6957 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6958 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6960 * Makefile.in: Regenerate.
6961 * po/SRC-POTFILES.in: Regenerate.
6963 2004-05-24 Nick Clifton <nickc@redhat.com>
6965 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6966 introduced by hash table size patch.
6968 2004-05-22 Ben Elliston <bje@au.ibm.com>
6970 * configure.in (is_release): Remove.
6971 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6972 (AC_OUTPUT): Don't output bfdver.h from version.h.
6973 * configure: Regenerate.
6974 * Makefile.am (RELEASE): New variable.
6975 (bfdver.h): New target.
6976 * Makefile.in: Regenerate.
6977 * doc/Makefile.in: Likewise.
6979 2004-05-22 Ben Elliston <bje@au.ibm.com>
6981 * Makefile.am (config.status): Don't depend on version.h.
6982 * Makefile.in: Regenerate.
6984 2004-05-22 Alan Modra <amodra@bigpond.net.au>
6986 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6987 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6988 * libbfd.h: Regenerate.
6989 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6990 (_bfd_elf_rel_local_sym): Likewise.
6991 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6992 (elf_link_input_bfd): Likewise.
6993 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6994 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6995 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6996 (elfNN_ia64_relocate_section): Likewise.
6998 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
7000 * hash.c (bfd_default_hash_table_size): New variable.
7001 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7002 (bfd_hash_set_default_size): New function. Set the default size
7003 to a selected prime number close to the argument. Document new
7005 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7006 * bfd-in2.h: Regenerate.
7007 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7008 * Makefile.in: Regenerate.
7010 2004-05-21 Mark Kettenis <kettenis@gnu.org>
7012 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7013 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7014 arm, m68k, m88k and hppa core files.
7016 2004-05-21 Nick Clifton <nickc@redhat.com>
7018 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7019 (bfd_bwrite): Likewise.
7020 (bfd_tell): Likewise.
7021 (bfd_flush): Likewise.
7022 (bfd_stat): Likewise.
7023 (bfd_seek): Likewise.
7024 (bfd_get_mtime): Likewise.
7025 (bfd_get_size): Likewise.
7027 2004-05-19 Ben Elliston <bje@au.ibm.com>
7029 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7031 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7033 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7034 (bfd_generic_openr_next_archived_file): Likewise.
7036 2004-05-17 Bob Wilson <bob.wilson@acm.org>
7038 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7039 section names by inserting a new substring after .gnu.linkonce, except
7040 for .gnu.linkonce.t.* where the "t." is replaced.
7042 2004-05-17 Adam Nemet <anemet@lnxw.com>
7044 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7045 (m68-*-lynxos* case): Likewise.
7046 (powerpc-*-lyxnos* case): New case.
7047 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7049 2004-05-17 David Heine <dlheine@tensilica.com>
7051 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7052 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7053 * bfd.c (bfd_copy_private_header_data): Define.
7054 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7056 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7057 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7058 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7059 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7060 segments by calling copy_private_bfd_data.
7061 (_bfd_elf_copy_private_header_data): Define.
7062 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7063 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7064 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7065 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7066 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7067 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7068 * som.c (som_bfd_copy_private_header_data): Define.
7069 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7070 * vms.c (vms_bfd_copy_private_header_data): Define.
7071 * bfd-in2.h: Regenerate.
7072 * libbfd.h: Regenerate.
7074 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7076 * elfxx-mips.c (MINUS_TWO): Define.
7077 (mips_elf_higher, mips_elf_highest,
7078 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7079 some bfd_vma values.
7080 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7082 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7084 * som.c (log2): Rename to exact_log2. Adjust all callers.
7086 2004-05-13 Paul Brook <paul@codesourcery.com>
7088 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7089 dwarf3 format CIE entries. Remove comment about the size of the
7090 ra_column field. It is now correctly deduced.
7092 2004-05-13 Joel Sherrill <joel@oarcorp.com>
7094 * config.bfd (or32-*-rtems*): Switch to elf.
7096 2004-05-13 Nick Clifton <nickc@redhat.com>
7098 * po/fr.po: Updated French translation.
7100 2004-05-11 Jakub Jelinek <jakub@redhat.com>
7102 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7103 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7104 Adjust counting of last_local.
7105 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7106 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7107 created by the linker nor !SHF_ALLOC.
7109 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7110 DT_PLTGOT to the start of the .got.plt section instead of the
7111 .got output section. Set sh_entsize for .got section in addition
7113 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7114 is at sgot->output_section->vma.
7115 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7116 DT_PLTGOT to the start of the .got.plt section instead of the
7117 .got output section.
7118 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7119 is at sgot->output_section->vma. Set sh_entsize for .got section
7120 in addition to .got.plt.
7121 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7122 (bfd_section_from_phdr): Likewise.
7123 (map_sections_to_segments): Likewise.
7124 (assign_file_positions_for_segments): Likewise.
7125 (get_program_header_size): Likewise.
7126 * elflink.c (bfd_elf_size_dynamic_sections): Set
7127 elf_tdata (output_bfd)->relro from info->relro.
7128 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7130 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
7132 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7133 a zero symndx for which we hadn't accounted a dynamic relocation.
7134 (_frvfdpic_add_rofixup): Likewise.
7136 2004-05-07 Brian Ford <ford@vss.fsi.com>
7137 DJ Delorie <dj@redhat.com>
7139 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7140 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7141 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7142 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7144 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
7146 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7147 immediately if there's no link info.
7148 (elf32_frvfdpic_copy_private_bfd_data): New.
7149 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7151 2004-05-06 Zack Weinberg <zack@codesourcery.com>
7153 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7154 filename argument is null; do not call strlen on a null pointer.
7156 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
7158 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7161 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
7163 * configure.in (bfd_elf32_frvfdpic_vec): New.
7164 * configure: Rebuilt.
7165 * targets.c (bfd_elf32_frvfdpic_vec): New.
7166 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7168 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7169 frvfdpic instead of frv. Rearrange elf-target macros such that
7170 the FDPIC-specific ones are only defined for this new target
7172 (bfd_elf32_frvfdpic_vec): Declare.
7174 (elf32_frv_relocate_section): Use it to enable segment checking
7175 and to control rofixup emission. Add output section vma to
7176 applied relocation in non-LOAD non-ALLOC sections. Use
7177 _bfd_error_handler for errors.
7178 (_frv_create_got_section): Create .rel.got and .rofixup only in
7179 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7181 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7182 (elf32_frvfdpic_modify_segment_map): Likewise.
7183 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7184 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7185 error message if we miscompute the rofixup size.
7186 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7187 (frvfdpic_elf_encode_eh_address): Likewise.
7188 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7189 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7190 relocs. Reject unknown relocation types.
7191 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7192 (frv_elf_merge_private_bfd_data): Likewise.
7193 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7194 0x4000 for newly-added elf32-frvfdpic.
7196 2004-05-05 Nick Clifton <nickc@redhat.com>
7199 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7200 returning NULL as most users of this function do not check its
7202 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7203 of bfd_cache_lookup().
7204 * sco5-core.c (sco5_core_file_p): Likewise.
7205 * trad-core.c (trad_unix_core_file_p): Likewise.
7207 2004-05-05 Nick Clifton <nickc@redhat.com>
7209 * cache.c (bfd_cache_lookup): Improve formatting.
7210 * archive.c: Fix formatting.
7212 2004-05-05 Peter Barada <peter@the-baradas.com>
7214 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7215 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7216 * bfd-in2.h(bfd_architecture): Regenerate.
7218 2004-05-03 Alan Modra <amodra@bigpond.net.au>
7220 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7222 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7223 those against discarded link-once and SEC_MERGE section symbols.
7225 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7227 * section.c (bfd_get_section_by_name_if): New.
7228 * bfd-in2.h: Regenerated.
7230 2004-05-02 Alan Modra <amodra@bigpond.net.au>
7232 * som.c (som_bfd_is_group_section): Define.
7234 2004-05-01 Alan Modra <amodra@bigpond.net.au>
7236 * section.c (bfd_make_section_anyway): Copy the whole
7237 bfd_hash_entry, not just "next" from existing entry.
7239 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7241 * elf.c (bfd_section_from_shdr): Maintain the section order in
7243 (special_sections): Add ".note.GNU-stack".
7244 (elf_fake_sections): Handle section group for relocatable
7247 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7249 * section.c (bfd_sections_find_if): New.
7250 * bfd-in2.h: Regenerated.
7252 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7254 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7256 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7257 * elf.c (bfd_elf_is_group_section): New function.
7258 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7259 * section.c (bfd_generic_is_group_section): New function.
7260 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7261 (BFD_JUMP_TABLE_LINK): Adjust.
7262 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7263 * aout-target.h (MY_bfd_is_group_section): Define.
7264 * aout-tic30.c (MY_bfd_is_group_section): Define.
7265 * bfd.c (bfd_is_group_section): Define.
7266 * binary.c (binary_bfd_is_group_section): Define.
7267 * bout.c (b_out_bfd_is_group_section): Define.
7268 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7269 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7270 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7271 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7272 * coffcode.h (coff_bfd_is_group_section): Define.
7273 * i386msdos.c (msdos_bfd_is_group_section): Define.
7274 * i386os9k.c (os9k_bfd_is_group_section): Define.
7275 * ieee.c (ieee_bfd_is_group_section): Define.
7276 * ihex.c (ihex_bfd_is_group_section): Define.
7277 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7278 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7279 * mmo.c (mmo_bfd_is_group_section): Define.
7280 * nlm-target.h (nlm_bfd_is_group_section): Define.
7281 * oasys.c (oasys_bfd_is_group_section): Define.
7282 * pef.c (bfd_pef_bfd_is_group_section): Define.
7283 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7284 * srec.c (srec_bfd_is_group_section): Define.
7285 * tekhex.c (tekhex_bfd_is_group_section): Define.
7286 * versados.c (versados_bfd_is_group_section): Define.
7287 * vms.c (vms_bfd_is_group_section): Define.
7288 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7289 * bfd-in2.h: Regenerate.
7290 * libbfd.h: Regenerate.
7292 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7294 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7296 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
7298 * configure.in: Update version to 2.15.91.
7299 * configure: Regenerate.
7301 2004-04-29 Brian Ford <ford@vss.fsi.com>
7303 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7304 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7305 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7306 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7307 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7308 .gnu.linkonce.wi. sections.
7309 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7310 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7312 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7313 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7315 2004-04-28 Chris Demetriou <cgd@broadcom.com>
7317 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7318 * bfd-in2.h: Regenerate.
7319 * libbfd.h: Likewise.
7321 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7323 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7325 (setup_sections): Use som_subspace_dictionary_record struct instead
7326 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7327 is_comdat, is_common or dup_common.
7328 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7329 is_comdat, is_common and dup_common in section subspace_dict from
7331 (som_begin_writing): Use som_subspace_dictionary_record struct.
7332 (som_finish_writing): Likewise.
7333 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7334 is_common and dup_common flags in info for symbol. Add comment
7335 regarding linker support for these fields. Slightly reorganize
7337 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7338 dup_common fields in symbol table from symbol info.
7339 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7340 arguments. Set corresponding fields in copy_data. Change all callers.
7341 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7343 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7344 * som.h (som_subspace_dictionary_record): Define.
7345 (som_copyable_section_data_struct): Add is_comdat, is_common and
7347 (som_section_data_struct): Use som_subspace_dictionary_record struct
7348 instead of subspace_dictionary_record.
7349 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7351 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7353 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7354 if set. Check reloc_done flag before applying relocations. Use
7355 output addresses, both when applying relocations and when comparing
7356 against the specified section.
7357 (elf_xtensa_relocate_section): Use output address to check if dynamic
7358 reloc is in a literal pool. Set section's reloc_done flag.
7360 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7362 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7363 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7365 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7368 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7370 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7371 structure field removed in 2004-04-24 patch.
7372 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7374 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7376 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7377 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7378 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7379 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7380 field before calling elf_backend_section_flags.
7382 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7384 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7385 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7386 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7387 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7388 and BFD_RELOC_32_PCREL.
7389 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7390 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7391 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7392 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7393 (mips_elf_next_relocation): Move comment about matching HI/LO
7395 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7396 R_MIPS_GNU_REL_HI16.
7398 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7400 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7401 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7402 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7403 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7404 and update comments to reflect current usage.
7405 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7406 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7408 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7409 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7410 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7411 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7412 type number to be MIPS_R_PCREL16.
7413 (mips_relocate_section): Remove support for link-time relaxation
7414 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7415 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7416 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7417 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7418 relaxation of branches used by embedded-PIC.
7419 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7420 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7421 related members, update comment.
7422 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7423 code related to embedded-PIC.
7424 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7425 initialization of now-removed 'adjust' member of
7426 'struct ecoff_debug_info'.
7428 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7430 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7432 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7434 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7435 relocs for locally defined symbols during -shared final link.
7436 (elf32_arm_final_link_relocate): Likewise.
7438 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7440 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7441 ELF_LINK_POINTER_EQUALITY_NEEDED.
7442 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7443 if r_type is not R_X86_64_PC32.
7444 (elf64_x86_64_finish_dynamic_symbol): If
7445 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7448 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7450 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7451 (elf_backend_plt_sym_val): Define.
7453 2004-04-22 Andrew Cagney <cagney@redhat.com>
7455 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7457 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7459 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7461 * som.c (som_set_section_contents): Constantify second argument.
7462 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7463 (som_object_setup): Rework to avoid warning.
7464 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7467 2004-04-22 Andrew Cagney <cagney@redhat.com>
7469 * cache.c (bfd_cache_close): Check for a previously closed file.
7471 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7473 * bfd.c (bfd_get_synthetic_symtab): Define.
7474 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7475 NAME##_get_synthetic_symtab.
7476 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7477 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7478 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7480 (_bfd_elf_get_synthetic_symtab): New prototype.
7481 * elfcode.h (elf_get_synthetic_symtab): Define.
7482 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7483 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7484 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7485 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7486 * bfd-in2.h: Rebuilt.
7487 * libbfd.h: Rebuilt.
7488 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7489 (elf_backend_plt_sym_val): Define.
7490 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7491 (elf_backend_plt_sym_val): Define.
7492 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7493 (elf_backend_plt_sym_val): Define.
7494 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7495 (elf_backend_plt_sym_val): Define.
7496 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7497 (elf_backend_plt_sym_val): Define.
7498 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7499 (elf_backend_plt_sym_val): Define.
7500 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7501 (elf_backend_plt_sym_val): Define.
7502 * aout-target.h (MY_get_synthetic_symtab): Define.
7503 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7504 * coff-rs6000.c (rs6000coff_vec): Add
7505 _bfd_nodynamic_get_synthetic_symtab.
7506 (pmac_xcoff_vec): Likewise.
7507 * coff64-rs6000.c (rs6000coff64_vec): Add
7508 _bfd_nodynamic_get_synthetic_symtab.
7509 (aix5coff64_vec): Likewise.
7510 * sunos.c (MY_get_synthetic_symtab): Define.
7511 * vms.c (vms_get_synthetic_symtab): Define.
7513 2004-04-22 Nick Clifton <nickc@redhat.com>
7515 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7517 2004-04-22 Peter Barada <peter@the-baradas.com>
7519 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7520 * bfd2-in.h: Regenerate.
7521 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7523 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7525 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7526 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7527 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7528 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7529 * bfd-in2.h: Regenerate.
7531 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7533 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7534 require relocations against a weak symbol to reference the same
7535 symbol hash entry if not a final, static link.
7536 (get_cached_value, add_value_map): Add final_static_link argument.
7537 (remove_literals): Pass final_static_link argument as needed.
7539 2004-04-21 Andrew Cagney <cagney@redhat.com>
7541 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7542 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7543 (opncls_bwrite, opncls_bclose, opncls_bflush)
7544 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7545 bfd iovec that uses function callbacks.
7546 (bfd_close): Use the iovec's bclose.
7547 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7548 (cache_bclose, cache_bflush, cache_bstat)
7549 (cache_iovec): New functions and global variable, implement a
7550 cache "iovec", where applicable set bfd_error.
7551 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7552 * bfdio.c (struct bfd_iovec): Define.
7553 (real_read): Delete function.
7554 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7555 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7556 assume that bread and bwrite set bfd_error.
7557 * bfd.c (struct bfd): Add "iovec", update comments.
7558 * bfd-in2.h, libbfd.h: Re-generate.
7560 2004-04-21 Andrew Cagney <cagney@redhat.com>
7562 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7564 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7566 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7567 (bfd_elf_gc_sections): Fail if a shared object is being created.
7568 Do not fail if dynamic sections have been created. Instead call
7569 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7570 dynamically referenced symbols. Do not mark the whole graph
7571 rooted at .eh_frame, only the section proper.
7573 2004-04-20 DJ Delorie <dj@redhat.com>
7575 * reloc.c: Add BFD_RELOC_32_SECREL.
7576 * bfd-in2.h: Regenerate.
7577 * libbfd.h: Likewise.
7578 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7579 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7580 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7582 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7584 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7585 relocs against hidden/protected undefweak symbols properly.
7586 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7588 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7590 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7591 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7594 2004-04-17 Brian Ford <ford@vss.fsi.com>
7596 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7597 filepos for the SizeOfHeaders field.
7598 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7600 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7602 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7604 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7605 change reloc_done. Set and restore _cooked_size.
7608 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7610 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7613 2004-04-15 Nick Clifton <nickc@redhat.com>
7615 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7617 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7619 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7621 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7623 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7624 when it is a definition.
7626 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7628 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7629 when statically linking PIC code.
7630 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7632 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7634 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7635 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7636 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7637 * configure: Regenerate.
7639 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7641 * elflink.c: Include libiberty.h.
7642 * Makefile.am (elflink.lo): Depend on libiberty.h.
7643 * Makefile.in: Regenerate.
7645 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7647 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7650 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7652 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7653 reserve the memory for dynamic linker
7655 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7657 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7658 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7660 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7662 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7663 RELOC_FOR_GLOBAL_SYMBOL.
7664 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7666 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7668 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7669 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7671 2004-04-01 Paul Brook <paul@codesourcery.com>
7673 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7674 * elf32-arm.h (struct elf32_elf_section_map): New.
7675 (struct _arm_elf_section_data): New.
7676 (elf32_arm_section_data): Define.
7677 (struct elf32_arm_link_hash_table): Add byteswap_code.
7678 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7679 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7680 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7681 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7682 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7683 (bfd_elf32_new_section_hook, elf_backend_write_section,
7684 elf_backend_link_output_symbol_hook): Define.
7686 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7688 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7689 that keeps the characters in a B_INCL..B_EINCL range.
7690 (_bfd_link_section_stabs): When computing the sum of the
7691 characters in a B_INCL..B_EINCL range also keep a copy of those
7692 characters. Use this information to distinguish between
7693 include sections that have the same sum and the same length
7694 but which are nevertheless unique.
7696 2004-03-31 Paul Brook <paul@codesourcery.com>
7698 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7699 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7701 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7703 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7704 to 'sum_chars' and add field 'num_chars'.
7705 (_bfd_link_section_stabs): When computing the sum of the
7706 characters in a B_INCL..B_EINCL range also keep a count of the
7707 number of characters. Use this information to help distinguish
7708 between include sections when have the same sum but which
7709 nevertheless are still unique.
7711 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7713 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7715 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7716 Tomer Levi <Tomer.Levi@nsc.com>
7718 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7719 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7720 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7721 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7722 (cpu-cr16c.lo): New target.
7723 (elf32-cr16c.lo): Likewise.
7724 * Makefile.in: Regenerate.
7725 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7726 (bfd_archures_list): Add bfd_cr16c_arch.
7727 * config.bfd: Handle cr16c-*-elf*.
7728 * configure.in: Handle bfd_elf32_cr16c_vec.
7729 * configure: Regenerate.
7730 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7731 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7732 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7733 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7734 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7735 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7736 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7737 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7738 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7739 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7740 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7741 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7742 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7743 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7744 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7745 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7746 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7747 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7748 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7749 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7750 * targets.c (bfd_elf32_cr16c_vec): Declare.
7751 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7752 * cpu-cr16c.c: New file.
7753 * elf32-cr16c.c: Likewise.
7754 * libbfd.h: Regenerate.
7755 * bfd-in2.h: Likewise.
7757 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7759 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7761 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7763 * Makefile.am: Remove all mention of elflink.h.
7764 * Makefile.in: Regenerate.
7765 * bfd-in.h (bfd_elf_discard_info): Declare.
7766 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7767 * bfd-in2.h: Regenerate.
7768 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7769 bfd_elf32_link_record_dynamic_symbol,
7770 bfd_elf64_link_record_dynamic_symbol,
7771 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7772 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7773 _bfd_elf32_link_record_local_dynamic_symbol,
7774 _bfd_elf64_link_record_local_dynamic_symbol,
7775 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7776 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7777 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7778 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7779 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7780 _bfd_elf32_reloc_symbol_deleted_p,
7781 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7782 (bfd_elf_link_record_dynamic_symbol,
7783 bfd_elf_link_record_local_dynamic_symbol,
7784 bfd_elf_final_link, bfd_elf_gc_sections,
7785 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7786 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7787 bfd_elf_reloc_symbol_deleted_p): Declare.
7788 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7789 * elf32-arm.h: Update for changed function names. Remove local
7790 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7791 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7792 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7793 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7794 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7795 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7796 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7797 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7798 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7799 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7800 (bfd_elfNN_print_symbol): Define.
7801 * elfcode.h: Don't include elflink.h.
7802 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7803 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7804 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7805 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7806 elf_link_record_local_dynamic_symbol): Don't define.
7807 * elflink.c: Update for changed function names. Move elflink.h
7809 * elflink.h: Delete file.
7810 * po/SRC-POTFILES.in: Regenerate.
7811 * po/bfd.pot: Regenerate.
7813 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7815 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7816 "name" for global syms accidentally removed in 2004-03-20 change.
7818 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7820 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7821 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7822 where Elf_External_* is different for 64 and 32 bit, with
7823 corresponding elf_size_info field.
7824 (struct elf_final_link_info): Use "bfd_byte *" instead
7825 of "Elf_External_Sym *" for external_syms and symbuf.
7826 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7827 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7828 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7829 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7830 (elf_link_sort_cmp2): Adjust.
7831 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7832 using ELF_R_SYM macro. Set u.sym_mask.
7833 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7834 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7835 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7836 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7837 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7838 swap_syn_out functions. Rearrange dyn swap in/out switch.
7839 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7840 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7841 (elf_link_flush_output_syms): Add elf_backend_data arg.
7842 (elf_link_check_versioned_symbol): Likewise.
7843 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7844 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7845 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7846 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7847 ELF_R_TYPE and ELF_R_INFO macros.
7848 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7849 based on size rather than using ELF_R_INFO.
7850 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7852 (struct alloc_got_off_arg): New.
7853 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7854 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7855 (elf_gc_allocate_got_offsets): Adjust.
7856 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7857 ELF_R_SYM. Use bfd_section_from_elf_index.
7858 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7859 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7860 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7862 2004-03-26 Stan Shebs <shebs@apple.com>
7864 Remove MPW support, no longer used.
7865 * config.bfd (powerpc-*-mpw*): Remove configuration.
7866 * mpw-config.in, mpw-make.sed: Remove files.
7867 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7869 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7871 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7872 (ppc64_elf_add_symbol_hook): New function.
7873 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7874 const from Elf_Internal_Sym param.
7875 * elflink.c (elf_link_add_object_symbols): Adjust.
7876 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7877 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7878 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7879 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7880 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7881 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7882 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7883 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7884 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7885 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7886 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7887 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7888 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7889 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7890 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7891 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7893 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7895 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7896 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7897 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7898 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7899 (bfd_elf64_bfd_link_add_symbols): Delete.
7900 (bfd_elf_link_add_symbols): Declare.
7901 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7902 * elflink.c: Include safe-ctype.h.
7903 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7905 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7906 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7908 (elf_link_add_archive_symbols): Rename from
7909 _bfd_elf_link_add_archive_symbols, make static.
7910 (elf_link_add_object_symbols): New function. Corresponding
7911 elflink.h function converted to use elf_size_info.
7912 (bfd_elf_link_add_symbols): Likewise.
7913 (bfd_elf_size_dynamic_sections): Adjust.
7914 * elflink.h (elf_bfd_link_add_symbols): Delete.
7915 (elf_link_add_object_symbols): Delete.
7916 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7917 bfd_elf_link_add_symbols.
7918 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7920 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7922 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7923 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7925 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7926 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7927 (_bfd_elf_add_dt_needed_tag): Declare.
7928 (_bfd_elf_sort_symbol): Declare.
7929 (_bfd_elf_finalize_dynstr): Declare.
7930 (RELOC_FOR_GLOBAL_SYM): Formatting.
7931 * elfcode.h (elf_add_dynamic_entry): Delete.
7932 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7933 elflink.h function converted to use elf_size_info.
7934 (_bfd_elf_add_dt_needed_tag): Likewise.
7935 (_bfd_elf_sort_symbol): Likewise.
7936 (_bfd_elf_finalize_dynstr): Likewise.
7937 (compute_bucket_count): Likewise.
7938 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7939 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7940 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7941 * elflink.h: ..here.
7942 (sort_symbol, add_dt_needed_tag): Delete.
7943 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7944 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7946 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7947 * elf32-cris.c (add_dynamic_entry): Likewise.
7948 * elf32-hppa.c (add_dynamic_entry): Likewise.
7949 * elf32-i370.c (add_dynamic_entry): Likewise.
7950 * elf32-i386.c (add_dynamic_entry): Likewise.
7951 * elf32-m32r.c (add_dynamic_entry): Likewise.
7952 * elf32-m68k.c (add_dynamic_entry): Likewise.
7953 * elf32-ppc.c (add_dynamic_entry): Likewise.
7954 * elf32-s390.c (add_dynamic_entry): Likewise.
7955 * elf32-sh.c (add_dynamic_entry): Likewise.
7956 * elf32-sparc.c (add_dynamic_entry): Likewise.
7957 * elf32-vax.c (add_dynamic_entry): Likewise.
7958 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7959 * elf64-alpha.c (add_dynamic_entry): Likewise.
7960 * elf64-hppa.c (add_dynamic_entry): Likewise.
7961 * elf64-ppc.c (add_dynamic_entry): Likewise.
7962 * elf64-s390.c (add_dynamic_entry): Likewise.
7963 * elf64-sparc.c (add_dynamic_entry): Likewise.
7964 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7965 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7966 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7967 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7968 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7969 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7971 2004-03-23 Paul Brook <paul@codesourcery.com>
7973 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7975 2004-03-22 Bob Wilson <bob.wilson@acm.org>
7977 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7978 literal tables and check for relocs outside of literal pools.
7979 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7980 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7982 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7983 (elf_xtensa_relocate_section): Read literal tables and check for
7984 dynamic relocations in read-only sections and not in literal pools.
7986 2004-03-23 Alan Modra <amodra@bigpond.net.au>
7989 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7991 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
7993 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7994 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7995 not defined by the executable, or defined in a DSO.
7996 <eliding run-time relocation of .got>: Initialize GOT entry for a
7997 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7999 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8000 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8001 a PLT reloc to GOT for an executable.
8002 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8003 .got for a DSO and explain why.
8004 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8005 and unreferenced symbols for which a PLT is defined. Adjust
8006 dynamic-symbol pruning correspondingly, to make sure we don't lose
8007 a dynamic symbol also defined by a DSO.
8009 2004-03-22 Alan Modra <amodra@bigpond.net.au>
8011 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8012 and rel args. Group input and output args. Wrap to 80 columns.
8013 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8014 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8015 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8016 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8017 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8018 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8019 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8020 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8021 RELOC_FOR_GLOBAL_SYMBOL invocation.
8023 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8025 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8026 unresolved symbols in objects aren't allowed.
8028 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8030 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8031 (elf_hppa_unmark_useless_dynamic_symbols):
8032 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8033 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8034 (elf32_hppa_relocate_section): Likewise.
8035 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8036 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8037 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8038 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8039 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8041 * elf-m10200.c (mn10200_elf_relocate_section): Use
8042 RELOC_FOR_GLOBAL_SYMBOL.
8043 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8044 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8045 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8046 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8047 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8048 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8049 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8050 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8051 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8052 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8053 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8054 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8056 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8058 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8059 (final_link_relocate): Likewise.
8060 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8061 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8063 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8065 * Makefile.am: Run "make dep-am".
8066 * Makefile.in: Regenerate.
8067 * aclocal.m4: Regenerate.
8068 * config.in: Regenerate.
8069 * po/bfd.pot: Regenerate.
8071 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8072 H.J. Lu <hongjiu.lu@intel.com>
8074 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8075 type and size change code to where it was previously. Remove
8076 dt_needed param. Treat old weak syms as strong if new sym is
8077 from a shared lib, even when old sym is from another shared
8078 lib. Remove unnecessary tests of oldweak and newweak. Correct
8080 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8081 _bfd_elf_merge_symbol calls.
8082 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8083 dt_needed local var. Update comments.
8084 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8085 (_bfd_elf_add_default_symbol): Likewise.
8087 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8088 strong syms in one shared object overriding weak syms in another.
8090 2004-03-18 Alan Modra <amodra@bigpond.net.au>
8092 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8093 dyn_lib_class field. Rearrange for better packing.
8094 (elf_dt_soname): Delete.
8095 (elf_dyn_lib_class): Define.
8096 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8097 (bfd_elf_set_dt_needed_soname): Delete.
8098 (bfd_elf_set_dyn_lib_class): New function.
8099 * elflink.h (add_dt_needed_tag): New function. Split out from..
8100 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8101 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8102 initialization of soname.
8103 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8105 * bfd-in.h (enum dynamic_lib_link_class): New.
8106 (bfd_elf_set_dt_needed_soname): Delete.
8107 (bfd_elf_set_dyn_lib_class): Declare.
8108 * bfd-in2.h: Regenerate.
8110 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8111 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8112 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8113 symbol loop. Instead use add_needed to flag tag as written.
8115 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8117 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8118 logic for null_input_bfd detection.
8120 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8122 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8124 2004-03-16 Mark Kettenis <kettenis@gnu.org>
8126 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8129 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8131 * elflink.c (elf_link_read_relocs_from_section): Don't use
8132 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8133 (_bfd_elf_link_read_relocs): ..to here.
8134 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8136 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8138 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8139 values selected in configure.host. Require both to be defined
8140 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8141 corresponding BFD_HOST vars with quotes.
8142 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8143 Always require BFD_HOST_64_BIT_DEFINED.
8144 <file_ptr type>: Find off_t size before emitting message. Combine
8145 off_t and ftello64 conditional.
8146 * configure: Regenerate.
8148 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8150 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8151 aliasing warning. Remove trailing whitespace throughout file.
8153 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8155 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8156 input_section in calls to get_dyn_name.
8157 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
8159 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8161 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8163 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8164 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8165 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8166 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8167 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8168 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8169 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8171 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8172 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8173 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8174 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8175 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8176 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8177 (read_8_bytes, read_indirect_string, read_address): Likewise.
8178 (read_abbrevs, parse_comp_unit): Likewise.
8179 * targets.c (struct bfd_target): Likewise.
8180 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8181 * hppabsd-core.c: Likewise. Formatting.
8182 * hpux-core.c: Likewise.
8183 * irix-core.c: Likewise.
8184 * netbsd-core.c: Likewise.
8185 * osf-core.c: Likewise.
8186 * ptrace-core.c: Likewise.
8187 * sco5-core.c: Likewise.
8188 * trad-core.c: Likewise.
8189 * configure: Regenerate.
8190 * bfd-in2.h: Regenerate.
8192 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8194 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8195 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8196 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8197 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8198 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8199 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8200 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8201 * libbfd.c: Likewise in function definitions.
8202 (bfd_put_8): Mask with 0xff rather than casting to char.
8203 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8204 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8205 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8206 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8207 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8208 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8209 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8210 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8211 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8212 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8213 * archive.c (do_slurp_coff_armap): Update swap prototype.
8214 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8215 (tic54x_getl_signed_32): Likewise.
8216 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8217 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8218 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8219 (bfd_getp_signed_32, bfd_putp32): Likewise.
8220 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8221 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8222 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8223 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8224 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8225 bfd_h_getx_signed_16, bfd_h_putx16.
8226 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8227 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8228 * hpux-core.c: Likewise.
8229 * irix-core.c: Likewise.
8230 * netbsd-core.c: Likewise.
8231 * osf-core.c: Likewise.
8232 * ptrace-core.c: Likewise.
8233 * sco5-core.c: Likewise.
8234 * trad-core.c: Likewise.
8235 * bfd-in2.h: Regenerate.
8237 2004-03-15 Matt Thomas <matt@3am-software.com>
8239 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8242 2004-03-13 Mark Kettenis <kettenis@gnu.org>
8244 * config.bfd: Add x86_64-*-openbsd*.
8245 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8247 * configure: Regenerate.
8249 2004-03-12 Nick Clifton <nickc@redhat.com>
8250 Dave Murphy <wintermute2k4@ntlworld.com>
8252 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8253 if the input bfd does not contain any code.
8255 2004-03-09 Steve Ellcey <sje@cup.hp.com>
8257 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8259 2004-03-05 Fred Fish <fnf@redhat.com>
8261 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8262 mips16 symbols to be even rather than testing first for even/odd.
8263 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8265 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8267 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8270 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
8272 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8273 undefined symbols as hash_new.
8275 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8277 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8279 * elf32-sh.c: Ditto.
8280 * bfd-in2.h: Regenerate.
8282 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
8284 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8286 (_frv_count_got_plt_entries): Initialize them.
8287 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8289 (frv_pic_relocs_info_for_global): Likewise.
8290 (frv_pic_relocs_info_for_local): Likewise.
8291 (frv_pic_merge_early_relocs_info): New.
8292 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8294 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8295 Check that we don't exceed the allocated count for entry.
8296 (_frv_add_rofixup): Likewise.
8297 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8298 (elf32_frv_finish_dynamic_sections): Improve error message in case
8299 we emit too few rofixup entries.
8301 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
8303 * archures.c (bfd_mach_fr450): New.
8304 * bfd-in2.h: Regenerate.
8305 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8306 (arch_info_500): Link to it.
8307 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8308 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8309 (frv_elf_arch_extension_p): New function.
8310 (frv_elf_merge_private_bfd_data): Use it.
8312 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8314 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8316 * elflink.h (is_global_data_symbol_definition): Moved to
8318 (elf_link_is_defined_archive_symbol): Likewise.
8319 (elf_link_add_archive_symbols): Likewise. Renamed to
8320 _bfd_elf_link_add_archive_symbols.
8322 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8323 of ELF symbol table entry from backend.
8324 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8325 instead of elf_link_add_object_symbols.
8327 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8329 * elf-bfd.h (struct elf_backend_data): Added
8330 elf_backend_can_make_relative_eh_frame,
8331 elf_backend_can_make_lsda_relative_eh_frame and
8332 elf_backend_encode_eh_address.
8333 (_bfd_elf_encode_eh_address): Declare.
8334 (_bfd_elf_can_make_relative): Declare.
8335 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8336 hooks to decide whether to attempt to make_relative and
8338 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8339 (_bfd_elf_can_make_relative): New.
8340 (_bfd_elf_encode_eh_address): New.
8341 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8342 (frv_elf_encode_eh_address): New.
8343 (elf_backend_can_make_relative_eh_frame): Define.
8344 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8345 (elf_backend_encode_eh_address): Define.
8347 (elf_backend_can_make_relative_eh_frame): Define.
8348 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8349 (elf_backend_encode_eh_address): Define.
8350 (elfNN_bed): Add them.
8352 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8354 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8355 complain_on_overflow to signed.
8357 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8359 * elflink.h (sort_symbol): New.
8360 (elf_link_add_object_symbols): Use a sorted symbol array for
8363 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8365 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8366 for pc relative relocs.
8367 (elf_s390_relocate_section): Likewise.
8368 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8369 for pc relative relocs.
8370 (elf_s390_relocate_section): Likewise.
8372 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8374 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8377 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8379 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8380 field to track if a relocation is against readonly section.
8381 (count_dyn_reloc): Take a new argument for rent->reltext.
8382 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8383 (get_reloc_section): Don't set ia64_info->reltext here.
8384 (allocate_dynrel_entries): Set ia64_info->reltext here.
8386 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8388 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8389 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8390 function's descriptor to symbol+offset, and map local undefweak
8391 symbol to NULL function descriptor.
8392 (elf32_frv_relocate_section): Likewise.
8394 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8396 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8398 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8399 (netbsd_core_file_p): Set architecture from machine ID for
8402 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8404 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8405 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8407 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8409 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8410 symbols with non-default visibility.
8412 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8414 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8415 IMAGE_SCN_MEM_WRITE on known sections only.
8417 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8419 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8420 symbols used in PIE relocs.
8422 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8424 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8427 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8429 * configure.in: Update version to 2.15.90.
8430 * configure: Regenerate.
8432 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8433 Richard Sandiford <rsandifo@redhat.com>
8435 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8436 _bfd_elf_symbol_refs_local_p to decide whether to decay
8437 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8438 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8439 relocs if the symbol wasn't defined by a regular object file.
8440 Don't check the symbol's dynindx.
8442 2004-02-16 Andrew Cagney <cagney@redhat.com>
8444 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8446 * bfd-in2.h: Re-generate.
8448 2004-02-14 Andrew Cagney <cagney@redhat.com>
8450 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8451 _LARGEFILE64_SOURCE.
8453 2004-02-13 Andrew Cagney <cagney@redhat.com>
8455 * elf.c (vma_page_aligned_bias): New function.
8456 (assign_file_positions_except_relocs)
8457 (assign_file_positions_for_segments): Replace broken modulo
8458 arithmetic with call to vma_page_aligned_bias.
8460 2004-02-11 Andrew Cagney <cagney@redhat.com>
8462 * bfd-in.h: Update copyright.
8463 (bfd_tell): Change return type to file_ptr.
8464 * bfd-in2.h: Re-generate.
8465 * cache.c: Update copyright.
8466 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8468 (close_one): Use real_ftell.
8469 * bfdio.c: Update copyright.
8470 (real_ftell, real_fseek): New functions.
8471 (bfd_tell): Use real_fseek and real_ftell, change return type to
8473 (bfd_seek): Use real_ftell and real_fseek, change type of
8474 file_position to a file_ptr.
8475 * libbfd-in.h: Update copyright.
8476 (real_ftell, real_fseek): Declare.
8477 * libbfd.h: Re-generate.
8479 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8480 fseeko and fseeko64. Determine bfd_file_ptr.
8481 * configure: Re-generate.
8482 * config.in: Re-generate.
8484 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8486 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8487 * elf32-h8300.c: Likewise.
8489 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8490 Nick Clifton <nickc@redhat.com>
8492 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8493 GOT entries with no associated GOT subsection.
8495 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8497 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8498 * elf.c (swap_out_syms): Use it to decide whether local section
8499 symbols should be named.
8500 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8501 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8502 (elf_backend_name_local_section_symbols): Define.
8503 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8505 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8507 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8508 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8511 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8513 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8514 to bfd_link_hash_entry passed by reference to
8515 _bfd_generic_link_add_one_symbol.
8517 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8519 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8520 relocations against dynamic symbols.
8522 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8524 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8527 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8529 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8530 * bfd-in2.h, libbfd.h: Rebuilt.
8532 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8534 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8535 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8536 flag has been cleared.
8538 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8540 * coff-h8300.c: Add and adjust comments about relaxation.
8541 * elf32-h8300.c: Likewise.
8543 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8545 * coff-h8300.c: Fix comment typos.
8546 * elf32-h8300.c: Likewise.
8548 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8550 * coff-h8300.c: Add comments about relaxation.
8551 * elf32-h8300.c: Likewise.
8553 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8555 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8557 * aclocal.m4: Regenerate.
8558 * configure: Regenerate.
8560 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8562 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8563 mips_elf64_rtype_to_howto instead of using howto_table.
8565 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8567 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8569 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8570 relocs which would not use the PLT.
8572 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8574 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8575 (ppc64_elf_gc_sweep_hook): Likewise.
8576 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8578 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8580 Adds linker relaxation support for bit manipulation insns like
8581 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8583 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8584 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8585 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8586 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8588 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8590 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8592 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8594 * elf32-h8300.c: Fix formatting.
8596 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8598 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8599 dynamic object is present. Declare r_symndx and h in an inner
8601 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8603 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8605 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8606 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8607 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8608 identically. Do not emit PC24 relocations for shared libraries.
8609 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8610 identically. Don't adjust pc_count.
8611 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8612 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8613 adjust count for branch relocations.
8614 (allocate_dynrelocs): Correct typo in call to
8615 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8616 PC24 or PLT32 relocs when linking.
8618 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8620 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8621 relocation howto with ARM_26 one for consistency.
8622 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8623 that will be converted to ARM_26D ones, since we always want 'done'
8624 relocations to be reflected in section's data.
8625 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8627 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8630 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8632 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8633 are not partial_inplace during a relocatable link.
8635 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8637 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8638 if no dynamic object is present. Declare r_symndx and h in an
8641 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8643 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8644 trampoline if it is known out of range.
8646 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8648 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8649 * elf32-frv.c (_frv_osec_readonly_p): New.
8650 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8652 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8653 (elf32_frv_relocate_section): Likewise. Error out if attempting
8654 to emit rofixups or dynamic relocs in read-only segments. Use
8655 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8656 dynamic relocations.
8657 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8658 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8659 relocations or fixups involving merged sections correctly. Avoid
8660 crash when undefined symbol is referenced by R_FRV_32 or
8661 R_FRV_FUNCDESC_VALUE.
8662 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8663 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8664 input section holding local symbol to addend of R_FRV_32 or
8665 R_FRV_FUNCDESC_VALUE dynamic relocation.
8666 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8667 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8668 (elf32_frv_always_size_sections): Don't store pointer to
8669 __stacksize symbol in sec_info.
8670 (elf32_frv_modify_segment_map): Look it up here.
8671 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8672 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8673 of the lazy PLT entry, not only its offset, as the low word of a
8674 function descriptor.
8675 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8676 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8677 if a hash table entry already exists but is not a definition.
8678 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8679 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8680 (_frv_add_rofixup): Don't inline.
8681 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8682 for undefweak symbols.
8683 (elf32_frv_relocate_section): Avoid crash while computing
8684 relocation when linking with shared library. Only emit rofixups
8685 and dynamic relocations for alloc&load sections. Mark binaries
8686 with inter-segment relocations for relocation as a unit.
8687 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8688 (DEFAULT_STACK_SIZE): New.
8689 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8690 emit rofixups or dynamic relocs when linking dynamic non-PIE
8692 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8693 shared libs too. Reserve the last entry for the GOT pointer.
8694 (elf32_frv_finish_dynamic_sections): Emit it.
8695 (elf32_frv_always_size_sections): New.
8696 (elf32_frv_modify_segment_map): New.
8697 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8699 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8700 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8701 (elf_backend_always_size_sections): New.
8702 (elf_backend_modify_segment_map): New.
8703 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8704 * config.bfd: Added frv-*-*linux*.
8705 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8706 ABS section, instead of crashing.
8707 (elf32_frv_relocate_section): Don't crash before warning about
8708 different segments in non-PIC relocation.
8709 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8710 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8711 relocs to undefweak symbols.
8712 (elf32_frv_relocate_section): Ditto for undefined symbols.
8713 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8714 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8715 gotfixup section was created.
8716 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8717 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8718 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8719 complain_overflow_signed.
8720 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8721 have not been allocated.
8722 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8723 privfd only if dynamic sections were created.
8724 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8725 for GPREL relocs. When linking relocatable FDPIC executables,
8726 emit warnings for relocations that would be illegal on PIE or
8727 shared libraries. Emit rofixup for R_FRV_32 only if input object
8729 (_frv_create_got_section): Define _gp symbol in the rofixup
8731 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8732 dynamic sections missing, error out requesting -melf32frvfd.
8733 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8734 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8735 computation of addends from section and global or local symbol
8736 value. Change return type to bfd_boolean, and return a failure if
8737 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8738 nonzero addend is required.
8739 (elf32_frv_relocate_section): Likewise. Print error for
8740 unsupported nonzero addends.
8741 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8742 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8743 force everything local.
8744 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8745 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8746 (frv_gotfixup_section): New.
8747 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8748 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8750 (_frv_add_rofixup): New.
8751 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8752 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8753 improve some ugly conditions.
8754 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8755 relocations in fdpic.
8756 (_frv_create_got_section): Create .rofixup.got section.
8757 (struct _frv_dynamic_got_info): Added fixups.
8758 (_frv_count_got_plt_entries): Account in-GOT relocations into
8759 relocs32, relocsfd and relocsfdv. Account them into relocs or
8760 fixups, as appropriate.
8761 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8763 (elf32_frv_finish_dynamic_sections): Verify that the right number
8764 of relocations and fixups was generated.
8765 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8767 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8768 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8769 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8770 descriptor of a (formerly-)global symbol is local.
8771 (struct frv_pic_relocs_info): Adjust comments.
8772 (_frv_emit_got_relocs_plt_entries): Adjust.
8773 (elf32_frv_relocate_section): Likewise.
8774 (_frv_count_got_plt_entries): Likewise.
8775 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8776 symbol's value to addend in the common preamble. Decay dynamic
8777 symbols to section+offset if they bind or call locally, for GOT
8778 and FUNCDESC_VALUE, respectively.
8779 (elf32_frv_relocate_section): Likewise.
8780 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8781 internal or hidden visibility.
8782 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8783 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8784 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8785 (elf32_frv_relocate_section): Pass relocation addend in. Use
8786 original relocation addend to look up the got relocs/plt entries
8787 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8788 processing relocations that reference .scommon symbols.
8789 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8790 Introduce support for dynamic linking.
8791 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8792 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8793 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8794 (frv_reloc_type_lookup): Return REL howtos for executables and
8796 (frv_info_to_howto_rel): New.
8797 (struct frv_elf_link_hash_table): New.
8798 (frv_hash_table, frv_got_section, frv_gotrel_section,
8799 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8800 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8801 (frv_elf_link_hash_table_create): New.
8802 (struct frv_pic_relocs_info): New.
8803 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8804 (frv_pic_relocs_info_find): New.
8805 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8807 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8808 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8809 (_frv_emit_got_relocs_plt_entries): New.
8810 (elf32_frv_relocate_section): Add support for dynamic linking.
8811 Handle new relocations.
8812 (_frv_create_got_section): New.
8813 (elf32_frv_create_dynamic_sections): New.
8814 (ELF_DYNAMIC_INTERPRETER): New.
8815 (struct _frv_dynamic_got_info): New.
8816 (_frv_count_got_plt_entries): New.
8817 (struct _frv_dynamic_got_plt_info): New.
8818 (_frv_compute_got_alloc_data): New.
8819 (_frv_get_got_entry, _frv_get_fd_entry): New.
8820 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8821 (_frv_resolve_final_relocs_info): New.
8822 (elf32_frv_size_dynamic_sections): New.
8823 (elf32_frv_finish_dynamic_sections): New.
8824 (elf32_frv_adjust_dynamic_symbol): New.
8825 (elf32_frv_finish_dynamic_symbol): New.
8826 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8828 (elf_info_to_howto_rel): Define.
8829 (bfd_elf32_bfd_link_hash_table_create): Define.
8830 (elf_backend_create_dynamic_sections): Define.
8831 (elf_backend_adjust_dynamic_symbol): Define.
8832 (elf_backend_size_dynamic_sections): Define.
8833 (elf_backend_finish_dynamic_symbol): Define.
8834 (elf_backend_finish_dynamic_sections): Define.
8835 (elf_backend_want_got_sym): Define.
8836 (elf_backend_got_header_size): Define.
8837 (elf_backend_want_got_plt): Define.
8838 (elf_backend_plt_readonly): Define.
8839 (elf_backend_want_plt_sym): Define.
8840 (elf_backend_plt_header_size): Define.
8841 (elf_backend_may_use_rel_p): Define.
8842 (elf_backend_may_use_rela_p): Define.
8843 (elf_backend_default_use_rela_p): Define.
8844 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8845 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8846 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8847 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8848 (frv_reloc_map): Map the corresponding BFD relocs to them.
8849 (frv_reloc_type_lookup): ... and back to BFD relocs.
8850 * reloc.c: New relocs.
8851 * bfd-in2.h, libbfd.h: Rebuilt.
8852 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8853 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8854 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8855 R_FRV_FUNCDESC_GOTLO): New.
8856 (frv_reloc_map): Map the corresponding BFD relocs to them.
8857 (frv_reloc_type_lookup): ... and back to BFD relocs.
8858 * reloc.c: New relocs.
8859 * bfd-in2.h, libbfd.h: Rebuilt.
8861 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8863 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8864 targets to support pages of up to 64kB.
8865 (elf32_bed): Redefine to get a separate backend data structure for
8866 traditional targets.
8867 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8868 targets to support pages of up to 64kB.
8869 (elf64_bed): Redefine to get a separate backend data structure for
8870 traditional targets.
8871 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8872 targets to support pages of up to 64kB.
8873 (elf32_bed): Redefine to get a separate backend data structure for
8874 traditional targets.
8876 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8878 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8880 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8882 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8883 (elf_i386_grok_psinfo): Likewise.
8885 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8887 * config.bfd: Add m68k-uClinux target.
8889 2004-01-01 Grant Edwards <grante@visi.com>
8891 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8892 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8893 (elf32_h8_gc_sweep_hook): New function.
8894 (elf_backend_gc_mark_hook): Define.
8895 (elf_backend_gc_sweep_hook): Define.
8896 (elf_backend_can_gc_sections): Define.
8898 For older changes see ChangeLog-0203
8904 version-control: never