1 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
5 * elflink.c (elf_link_add_object_symbols): Also append the version
6 name to non-hidden absolute symbols that are functions.
8 2005-07-16 Alan Modra <amodra@bigpond.net.au>
10 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
11 for zero size sections. Don't set .sbss syms here.
12 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
14 2005-07-16 Alan Modra <amodra@bigpond.net.au>
16 * Makefile.am: Run "make dep-am".
17 * Makefile.in: Regenerate.
19 2005-07-15 Bob Wilson <bob.wilson@acm.org>
21 * elf32-xtensa.c (vsprint_msg): Add prototype.
22 (build_encoding_error_message): Delete. Code moved into....
23 (elf_xtensa_do_reloc): ....here, and changed to give better
24 error messages for out of range literals.
26 2005-07-15 Alan Modra <amodra@bigpond.net.au>
28 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
29 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
30 defined in output sections. Call bfd_elf_record_link_assignment.
31 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
32 * bfd-in2.h: Regenerate.
34 2005-07-14 Jim Blandy <jimb@redhat.com>
36 Add support for m32c-*-elf (Renesas m32c and m16c).
37 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
38 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
39 (BFD32_BACKENDS): Add elf32-m32c.lo.
40 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
41 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
42 * Makefile.in: Regenerated.
43 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
45 (bfd_m32c_arch): New arch info object.
46 (bfd_archures_list): List bfd_m32c_arch.
47 * bfd-in2.h: Regenerated.
48 * config.bfd: Add case for the m32c.
49 * configure.in: Add case for the m32c.
50 * configure: Regenerated.
51 * cpu-m32c.c, elf32-m32c.c: New files.
52 * libbfd.h: Regenerated.
53 * targets.c (bfd_elf32_m32c_vec): Declare.
54 (_bfd_target_vector): List bfd_elf32_m32c_vec.
56 2005-07-14 Alan Modra <amodra@bigpond.net.au>
58 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
59 (_bfd_elf_provide_section_bound_symbols): Remove param name.
61 * bfd-in2.h: Regenerate.
62 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
63 (_bfd_elf_provide_symbol): Formatting.
64 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
65 create section relative syms.
66 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
67 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
68 _bfd_elf_provide_section_bound_symbols.
69 * reloc.c (bfd_mark_used_section): Delete.
70 (bfd_generic_gc_sections): Don't call the above.
72 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
75 * cache.c (bfd_last_cache): Initialise to NULL.
77 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
78 Nick Clifton <nickc@redhat.com>
80 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
81 Alpha binaries and issue a helpful error message.
82 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
83 symbol index to 15 to allow for binaries produced by DEC
86 2005-07-13 Steve Ellcey <sje@cup.hp.com>
88 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
90 2005-07-12 Alan Modra <amodra@bigpond.net.au>
92 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
95 2005-07-12 Alan Modra <amodra@bigpond.net.au>
97 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
99 2005-07-12 Alan Modra <amodra@bigpond.net.au>
101 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
103 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
105 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
108 2005-07-08 Paul Koning <pkoning@equallogic.com>
110 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
111 where addresses are sign extended.
113 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
115 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
116 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
117 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
118 sparc*-*-rtemsaout* as removed
120 2005-07-08 Alan Modra <amodra@bigpond.net.au>
122 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
123 of the usual sections are found.
124 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
125 Strip .dynbss if it is zero size.
126 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
127 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
128 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
129 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
131 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
132 when it is zero size.
133 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
134 of .dynbss and zero size sections.
135 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
137 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
138 .dynbss if zero size.
139 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
141 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
142 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
143 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
144 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
145 .plt.* and .got.plt.* if zero size.
146 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
147 .got* and .dynbss if zero size.
148 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
149 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
150 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
152 (create_got_section): Always create new .got and .rela.got sections.
153 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
154 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
155 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
156 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
157 dynamic bss sections correctly.
158 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
159 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
160 .dynbss if zero size.
162 2005-07-08 Ben Elliston <bje@au.ibm.com>
164 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
165 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
167 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
169 * elf-bfd.h (elf_backend_data): Add special_sections.
171 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
174 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
175 (elf_backend_special_sections): New. Defined.
176 * elf32-m32r.c: Likewise.
177 * elf32-m68hc11.c: Likewise.
178 * elf32-m68hc12.c: Likewise.
179 * elf32-mcore.c: Likewise.
180 * elf32-sh64.c: Likewise.
181 * elf32-v850.c: Likewise.
182 * elf32-xtensa.c: Likewise.
183 * elf64-alpha.c: Likewise.
184 * elf64-hppa.c: Likewise.
185 * elf64-ppc.c: Likewise.
186 * elf64-sh64.c: Likewise.
187 * elfxx-ia64.c: Likewise.
188 * elfxx-mips.c: Likewise.
189 * elfxx-mips.h: Likewise.
191 * elfxx-target.h (elf_backend_special_sections): New.
192 (elfNN_bed): Initialize special_sections.
194 2005-07-07 Bob Wilson <bob.wilson@acm.org>
196 * xtensa-modules.c: Update tables with Xtensa MMU features.
198 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
200 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
202 * vms.h (_bfd_vms_debug): Add format attribute.
203 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
205 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
208 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
209 symbol with default visibility is local.
211 2005-07-07 Ben Elliston <bje@gnu.org>
213 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
215 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
217 * dwarf2.c (varinfo): Add addr.
218 (lookup_symbol_in_variable_table): Also check addr.
219 (scan_unit_for_symbols): Set addr for variable.
220 (comp_unit_find_line): Updated.
222 2005-07-06 Nick Clifton <nickc@redhat.com>
224 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
225 message if an unknown reloc is encountered.
226 (alpha_relocate_section): Likewise.
228 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
229 with a missing howto field.
231 2005-07-06 Alan Modra <amodra@bigpond.net.au>
233 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
236 2005-07-05 Paul Brook <paul@codesourcery.com>
238 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
239 (ppc_elf_vxworks_get_sec_type_attr): New function.
240 (elf_backend_special_sections): Remove vxwords definition.
241 (elf_backend_get_sec_type_attr): Define for vxworks.
243 2005-07-05 Nick Clifton <nickc@redhat.com>
245 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
247 2005-07-05 Paul Brook <paul@codesourcery.com>
249 * config.bfd: Add separate case for ppc-vxworks.
250 * configure: Regenerate.
251 * configure.in: Include elf-vxworks.lo on ppc targets.
252 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
254 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
255 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
256 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
257 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
258 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
259 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
260 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
261 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
262 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
263 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
264 (ppc_elf_create_got): Create .got.plt for VxWorks.
265 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
267 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
268 (allocate_got): VxWorks does not need a got header.
269 (allocate_dynrelocs): Handle VxWorks plt format.
270 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
271 VxWorks. Handle VxWorks plt/got.
272 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
273 (ppc_elf_vxworks_special_sections): New.
274 (ppc_elf_vxworks_link_hash_table_create,
275 ppc_elf_vxworks_add_symbol_hook,
276 elf_i386_vxworks_link_output_symbol_hook,
277 ppc_elf_vxworks_final_write_processing): New functions.
278 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
279 (_bfd_target_vector): Use it.
281 2005-07-05 Jakub Jelinek <jakub@redhat.com>
283 * libbfd-in.h (struct artdata): Add extended_names_size field.
285 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
286 allocated object by bfd_zalloc.
287 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
288 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
289 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
290 (get_extended_arelt_filename): Fail if index is bigger or equal to
292 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
293 get_extended_arelt_filename already did that.
294 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
295 Allocate one extra byte and clear it, in case extended names table
298 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
299 bfd_zalloc2): New prototypes.
300 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
301 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
302 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
303 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
304 elf_map_symbols, map_sections_to_segments,
305 assign_file_positions_for_segments, copy_private_bfd_data,
306 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
308 * bfd-in2.h: Rebuilt.
311 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
312 verdef or verneed section.
313 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
314 verneed sections gracefully.
315 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
316 bogus relocation values.
317 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
318 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
319 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
320 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
321 * elfxx-ia64.c (lookup_howto): Likewise.
323 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
324 the end of strtab and clear it.
327 2005-07-05 Nick Clifton <nickc@redhat.com>
329 * po/vi.po: New Vietnamese translation.
330 * configure.in (ALL_LINGUAS): Add vi.
331 * configure: Regenerate.
333 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
335 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
336 touchup logic like i386/ppc.
338 2005-07-05 Alan Modra <amodra@bigpond.net.au>
340 * elf.c (special_sections): Move const qualifier.
341 (special_sections_b..special_sections_t): Likewise.
342 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
344 (elf32_arm_symbian_special_sections): Move const qualifier.
345 * elf32-m32r.c: Similarly.
346 * elf32-m68hc11.c: Similarly.
347 * elf32-m68hc12.c: Similarly.
348 * elf32-mcore.c: Similarly.
349 * elf32-ppc.c: Similarly.
350 * elf32-sh64.c: Similarly.
351 * elf32-v850.c: Similarly.
352 * elf32-xtensa.c: Similarly.
353 * elf64-alpha.c: Similarly.
354 * elf64-hppa.c: Similarly.
355 * elf64-ppc.c: Similarly.
356 * elf64-sh64.c: Similarly.
357 * elfxx-ia64.c: Similarly.
358 * elfxx-mips.c: Similarly.
360 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
362 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
363 info->executable instead of !info->shared where appropriate.
365 2005-07-04 Alan Modra <amodra@bigpond.net.au>
368 * elf.c (assign_file_positions_for_segments): Remove excluded
369 sections from the segment map.
371 2005-07-04 Alan Modra <amodra@bigpond.net.au>
374 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
376 (_bfd_elf_get_special_section): Declare.
377 (bfd_elf_special_section): Update prototype.
378 * elf.c (special_sections): Remove unused outer entries.
379 (get_special_section): Delete.
380 (_bfd_elf_get_special_section): New function.
381 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
382 special_sections indexing.
383 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
384 * elf32-arm.c (symbian_special_sections_d): Delete.
385 (symbian_special_sections_g, symbian_special_sections_h): Delete.
386 (symbian_special_sections_i, symbian_special_sections_f): Delete.
387 (symbian_special_sections_p): Delete.
388 (elf32_arm_symbian_special_sections): Merge above to here.
389 (elf32_arm_symbian_get_sec_type_attr): New function.
390 (elf_backend_special_sections): Don't define.
391 (elf_backend_get_sec_type_attr): Define.
392 * elf32-m32r.c: Similarly to elf32-arm.c.
393 * elf32-m68hc11.c: Likewise.
394 * elf32-m68hc12.c: Likewise.
395 * elf32-mcore.c: Likewise.
396 * elf32-sh64.c: Likewise.
397 * elf32-v850.c: Likewise.
398 * elf32-xtensa.c: Likewise.
399 * elf64-alpha.c: Likewise.
400 * elf64-hppa.c: Likewise.
401 * elf64-ppc.c: Likewise.
402 * elf64-sh64.c: Likewise.
403 * elfxx-ia64.c: Likewise.
404 * elfxx-mips.c: Likewise.
405 * elf32-ppc.c: Likewise.
406 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
407 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
408 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
409 (elf_backend_get_sec_type_attr): Define.
410 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
411 (elf_backend_special_sections): Don't define.
414 2005-07-01 Nick Clifton <nickc@redhat.com>
416 * cpu-d10v.c: Update to ISO C90 style function declarations and
418 * cpu-d30v.c: Likewsie.
419 * cpu-i370.c: Likewsie.
420 * cpu-xstormy16.c: Likewsie.
421 * elf32-arc.c: Likewsie.
422 * elf32-d10v.c: Likewsie.
423 * elf32-d30v.c: Likewsie.
424 * elf32-dlx.c: Likewsie.
425 * elf32-i370.c: Likewsie.
426 * elf32-i960.c: Likewsie.
427 * elf32-ip2k.c: Likewsie.
428 * elf32-m32r.c: Likewsie.
429 * elf32-mcore.c: Likewsie.
430 * elf32-openrisc.c: Likewsie.
431 * elf32-or32.c: Likewsie.
432 * elf32-pj.c: Likewsie.
433 * elf32-v850.c: Likewsie.
434 * elf32-xstormy16.c: Likewsie.
436 2005-07-01 Alan Modra <amodra@bigpond.net.au>
438 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
440 (elf64_alpha_create_dynamic_sections): Always make new sections
441 by using bfd_make_section_anyway_with_flags. Check that .got not
443 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
446 2005-06-30 Alan Modra <amodra@bigpond.net.au>
448 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
449 _SDA_BASE_ and _SDA2_BASE_ symbols.
450 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
451 sym if not def_regular.
452 (_bfd_elf_provide_section_bound_symbols): Similarly.
454 2005-06-30 Ben Elliston <bje@gnu.org>
456 * config.bfd: Mark as obsolete:
461 2005-06-29 Alan Modra <amodra@bigpond.net.au>
463 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
464 .eh_frame specially..
465 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
466 Don't recheck sections we have already marked.
467 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
468 * section.c (struct bfd_section): Add gc_mark_from_eh.
469 (STD_SECTION): Adjust.
470 * ecoff.c (bfd_debug_section): Adjust.
471 * bfd-in2.h: Regenerate.
473 2005-06-29 Alan Modra <amodra@bigpond.net.au>
475 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
476 not been processed by check_relocs.
478 2005-06-29 Paul Brook <paul@codesourcery.com>
480 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
481 * bfd-in2.h: Regenerate.
482 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
484 * elflink.c (bfd_elf_set_symbol): Add section argument.
485 (_bfd_elf_provide_symbol): Ditto.
486 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
488 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
490 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
492 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
493 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
494 (struct elf32_hppa_link_hash_table): Use etab and bstab.
495 (stub_hash_newfunc): Use hh.
496 (hppa_link_hash_newfunc): Use hsh_cache.
497 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
498 (elf32_hppa_link_hash_table_free): Use bstab.
499 (hppa_stub_name): Use eh.
500 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
501 (hppa_add_stub): Use bstab.
502 (hppa_type_of_stub): Use eh.
503 (hppa_build_one_stub): Use hh and bh_root.
504 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
505 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
506 (elf32_hppa_gc_sweep_hook): Use hdh_next.
507 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
508 (allocate_plt_static): Use etab.
509 (allocate_dynrelocs): Use etab, and hdh_next.
510 (readonly_dynrelocs): Use hdh_next.
511 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
512 (get_local_syms): Use eh, bstab, and hh.
513 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
514 (elf32_hppa_set_gp): Use etab.
515 (elf32_hppa_build_stubs): Use bstab.
516 (final_link_relocate): Use eh, bh_root.
517 (elf32_hppa_relocate_section): Use elf, etab.
518 (elf32_hppa_finish_dynamic_sections): Use etab.
520 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
522 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
525 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
527 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
528 (hppa_stub_hash_entry): Define.
529 (stub_hash_newfunc): Rename variables.
530 (hppa_link_hash_newfunc): Likewise.
531 (elf32_hppa_link_hash_table_free): Likewise.
532 (hppa_stub_name): Likewise.
533 (hppa_get_stub_entry): Likewise.
534 (hppa_add_stub): Likewise.
535 (hppa_type_of_stub): Likewise.
536 (hppa_build_one_stub): Likewise.
537 (hppa_size_one_stub): Likewise.
538 (elf32_hppa_create_dynamic_sections): Likewise.
539 (elf32_hppa_copy_indirect_symbol): Likewise.
540 (elf32_hppa_check_relocs): Likewise.
541 (elf32_hppa_gc_mark_hook): Likewise.
542 (elf32_hppa_gc_sweep_hook): Likewise.
543 (elf32_hppa_grok_psinfo): Likewise.
544 (elf32_hppa_hide_symbol): Likewise.
545 (elf32_hppa_adjust_dynamic_symbol): Likewise.
546 (allocate_dynrelocs): Likewise.
547 (clobber_millicode_symbols): Likewise.
548 (readonly_dynrelocs): Likewise.
549 (elf32_hppa_size_dynamic_sections): Likewise.
550 (get_local_syms): Likewise.
551 (elf32_hppa_size_stubs): Likewise.
552 (hppa_record_segment_addr): Likewise.
553 (final_link_relocate): Likewise.
554 (elf32_hppa_relocate_section): Likewise.
555 (elf32_hppa_finish_dynamic_symbol): Likewise.
557 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
560 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
562 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
563 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
564 * elf32-cris.c (cris_elf_check_relocs): Likewise.
565 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
566 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
567 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
568 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
569 * elf32-i370.c (i370_elf_check_relocs): Likewise.
570 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
571 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
572 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
573 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
574 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
575 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
576 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
577 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
578 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
579 * elf32-s390.c (elf_s390_check_relocs): Likewise.
580 * elf32-sh.c (sh_elf_check_relocs): Likewise.
581 * elf32-v850.c (v850_elf_check_relocs): Likewise.
582 * elf32-vax.c (elf_vax_check_relocs): Likewise.
583 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
584 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
585 * elf64-s390.c (elf_s390_check_relocs): Likewise.
586 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
587 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
588 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
590 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
593 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
596 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
599 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
600 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
602 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
604 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
605 BFD_RELOC_X86_64_GOTPC32.
606 * bfd-in2.h: Regenerated.
608 2005-06-17 Jakub Jelinek <jakub@redhat.com>
610 * elf.c (bfd_section_from_shdr): Kill bogus warning.
612 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
613 symbol, relocation, group or versym sections.
615 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
617 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
618 doesn't point into the section.
620 2005-06-17 Jan Beulich <jbeulich@novell.com>
622 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
623 and BFD_RELOC_X86_64_GOTPC32.
624 * libbfd.h (bfd_reloc_code_real_names): Likewise.
625 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
626 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
627 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
628 and R_X86_64_GOTPC32.
629 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
630 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
631 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
632 (elf64_x86_64_relocate_section): Likewise.
633 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
635 2005-06-15 Mark Kettenis <kettenis@gnu.org>
637 * archive.c: Include "libiberty.h".
639 2005-06-15 Nick Clifton <nickc@redhat.com>
641 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
642 produced by the GreenHills toolchain can be assimilated.
644 2005-06-14 Steve Ellcey <sje@cup.hp.com>
646 * som.c (som_find_inliner_info): New.
648 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
650 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
652 2005-06-14 Jakub Jelinek <jakub@redhat.com>
654 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
655 Prevent endless recursion on broken objects.
657 * archive.c (do_slurp_coff_armap): Check for overflows.
659 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
661 * elfcode.h (elf_write_relocs): Do nothing if there are no
664 2005-06-10 Alan Modra <amodra@bigpond.net.au>
666 * dwarf2.c (decode_line_info): Revert last change. Instead set
667 initial low_pc to -1 to avoid need to test whether loc_pc has
670 2005-06-09 Christopher Faylor <cgf@timesys.com>
672 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
673 either SEC_ALLOC OR SEC_LOAD.
675 2005-06-09 Christopher Faylor <cgf@timesys.com>
677 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
678 section header. Do not add STYP_NOLOAD since it does not appear to be
681 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
684 * dwarf2.c (lookup_address_in_line_info_table): Restore code
685 handling NULL function info, removed with 2005-04-03 change.
687 2005-06-08 Mark Mitchell <mark@codesourcery.com>
689 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
691 2005-06-09 Alan Modra <amodra@bigpond.net.au>
693 * elflink.c (elf_mark_used_section): Delete.
694 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
695 * reloc.c (bfd_mark_used_section): New function.
696 (bfd_generic_gc_sections): Call bfd_mark_used_section.
698 2005-06-08 Alan Modra <amodra@bigpond.net.au>
700 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
703 2005-06-07 Mark Mitchell <mark@codesourcery.com>
705 * opncls.c (bfd_fdopenr): Add missing break statements.
707 2005-06-07 Mark Mitchell <mark@codesourcery.com>
709 * opncls.c (bfd_fopen): New API.
711 (bfd_fdopenr): Likewise.
712 * bfd-in2.h: Regenerated.
714 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
715 Michael Snyder <msnyder@redhat.com>
716 Stan Cox <scox@redhat.com>
718 * Makefile.am (ALL_MACHINES): Add ms1 support.
719 (ALL_MACHINES_CFILES): Same.
720 (BFD32_BACKENDS): Same.
721 (BFD32_BACKENDS_CFILES): Same.
723 * Makefile.in: Regenerate.
725 * archures.c (bfd_architecture): Add ms1 entries.
726 Externalize bfd_ms1_arch.
727 (bfd_archures_list): Add bfd_ms1_arch.
729 * bfd-in2.h: Regenerate.
731 * cpu-ms1.c: New file.
733 * elf32-ms1.c: New file.
735 * targets.c: Define extern of bfd_elf32_ms1_vec.
736 Add bfd_elf32_ms1_vec to _bfd_target_vector.
738 * configure.in: Add bfd_elf32_ms1_vec case.
740 * configure: Regenerate.
742 * config.bfd: Add ms1-*-elf to table.
744 2005-06-07 Zack Weinberg <zack@codesourcery.com>
746 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
748 2005-06-07 Alan Modra <amodra@bigpond.net.au>
750 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
751 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
753 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
756 * bfd.c (bfd_find_line): New.
758 * dwarf2.c (comp_unit): Add variable_table.
759 (funcinfo): Add file, line, and sec.
761 (lookup_symbol_in_function_table): New.
762 (lookup_symbol_in_variable_table): New.
763 (scan_unit_for_functions): Renamed to ...
764 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
766 (comp_unit_find_nearest_line): Updated.
767 (comp_unit_find_line): New.
768 (_bfd_dwarf2_find_line): New.
770 * elf-bfd.h (_bfd_elf_find_line): New.
771 (_bfd_generic_find_line): New. Defined.
773 * elf.c (_bfd_elf_find_line): New.
775 * libbfd-in.h (_bfd_dwarf2_find_line): New.
776 (_bfd_generic_find_line): New.
778 * bfd-in2.h: Regenerated.
779 * libbfd.h: Likewise.
781 * libbfd.c (_bfd_generic_find_line): New.
783 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
784 with _bfd_generic_find_line.
785 (bfd_target): Add _bfd_find_line.
787 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
789 * dwarf2.c (decode_line_info): Properly set low_pc.
791 2005-06-06 Alan Modra <amodra@bigpond.net.au>
793 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
794 case, include addend when indexing .opd section map.
795 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
796 clear opd_adjust array if no_opd_opt set. Tidy code.
797 Ignore zero size .opd. Check bfd_alloc return value.
798 (ppc_stub_name): Return immediately on bfd_malloc fail.
799 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
801 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
803 * dwarf2.c (comp_unit): Fix a typo in comment.
805 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
807 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
808 (reloc_type_lookup): Dito.
809 (elf_vax_discard_copies): Dito.
810 (elf_vax_instantiate_got_entries): Dito.
811 (elf_vax_link_hash_traverse): Dito.
812 (elf_vax_link_hash_newfunc): Dito.
813 (elf_vax_link_hash_table_create): Dito.
814 (elf32_vax_set_private_flags): Dito.
815 (elf32_vax_merge_private_bfd_data): Dito.
816 (elf32_vax_print_private_bfd_data): Dito.
817 (elf_vax_check_relocs): Dito.
818 (elf_vax_gc_mark_hook): Dito.
819 (elf_vax_gc_sweep_hook): Dito.
820 (elf_vax_size_dynamic_sections): Dito.
821 (elf_vax_discard_copies): Dito.
822 (elf_vax_instantiate_got_entries): Dito.
823 (elf_vax_relocate_section): Dito.
824 (elf_vax_finish_dynamic_symbol): Dito.
825 (elf_vax_finish_dynamic_sections): Dito.
826 (elf_vax_hash_table): Break-up of line isn't needed.
827 (elf_vax_check_relocs): Remove leading whitespace
828 (elf_vax_relocate_section): Remove redundant whitespace
829 (elf_vax_link_hash_newfunc): Don't cast NULL.
830 (elf_vax_link_hash_table_create): Dito.
831 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
833 2005-06-03 Alan Modra <amodra@bigpond.net.au>
836 * configure.in: Bump version
837 * configure: Regenerate.
838 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
839 discarded section sym refs and kill linker output.
840 * simple.c (simple_dummy_einfo): New function.
841 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
843 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
846 2005-06-02 Alan Modra <amodra@bigpond.net.au>
848 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
849 restrictive of func code and func descr for undefined syms as well
852 2005-05-31 Jim Blandy <jimb@redhat.com>
854 * Makefile.am: Regenerate dependencies with 'make dep-am'.
855 * Makefile.in: Regenerate.
857 2005-05-31 Richard Henderson <rth@redhat.com>
859 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
860 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
861 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
862 (elf64_alpha_want_plt): Update to match.
863 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
864 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
866 2005-05-31 Zack Weinberg <zack@codesourcery.com>
868 * elf32-arm.c (elf32_arm_reloc_type_lookup)
869 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
870 Use ISO C90 function declaration style.
872 2005-05-31 James E Wilson <wilson@specifixinc.com>
874 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
875 header PF_R flag on PT_LOAD segments.
877 2005-05-30 Richard Henderson <rth@redhat.com>
879 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
880 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
882 2005-05-29 Richard Henderson <rth@redhat.com>
884 * configure.in (--enable-secureplt): New.
885 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
886 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
887 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
888 (elf64_alpha_use_secureplt): New.
889 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
890 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
891 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
892 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
893 (struct alpha_elf_link_hash_entry): Add plt_offset.
894 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
895 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
896 (PLT_ENTRY_WORD3): Remove.
897 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
898 on .plt and create .got.plt.
899 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
900 (get_got_entry): Initialize plt_offset.
901 (elf64_alpha_want_plt): New.
902 (elf64_alpha_check_relocs): Use it.
903 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
905 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
907 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
909 (elf64_alpha_size_plt_section): Size .got.plt section.
910 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
912 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
913 Add PLTRO DYNAMIC entry.
914 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
915 (elf64_alpha_finish_dynamic_sections): Likewise.
917 2005-05-28 David Daney <ddaney@avtrex.com>
919 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
920 calculation of DT_RELSZ to occur after all dynamic relocations
923 2005-05-28 Eli Zaretskii <eliz@gnu.org>
925 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
926 * config.in, configure: Regenerate.
928 2005-05-26 Mark Kettenis <kettenis@gnu.org>
929 Maciej W. Rozycki <macro@linux-mips.org>
931 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
932 stop processing of options if one of invalid size is
934 (_bfd_mips_elf_section_from_shdr): Likewise.
935 (_bfd_mips_elf_fake_sections): Reset the type of empty special
938 2005-05-26 Richard Henderson <rth@redhat.com>
940 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
941 plt_old_section, plt_old_value.
942 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
943 (elf64_alpha_size_plt_section_1): Don't use it.
945 2005-05-26 Jakub Jelinek <jakub@redhat.com>
947 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
948 first shdr has sh_size == 0. Fail if e_shnum is large to cause
949 arithmetic overflow when allocating the i_shdr array.
950 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
952 2005-05-25 Richard Henderson <rth@redhat.com>
954 * elf64-alpha.c: Update all function definitions to ISO C. Remove
955 all function prototypes; rearrange functions into def-use order.
957 2005-05-25 Richard Henderson <rth@redhat.com>
959 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
960 in the presence of deleting elements.
961 (elf64_alpha_size_got_sections): Zero dead got section size.
963 2005-05-23 Fred Fish <fnf@specifixinc.com>
965 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
966 (struct funcinfo): Add caller_func, caller_file, caller_line.
967 tag, and nesting_level members.
968 (lookup_address_in_function_table): Change first passed parameter
969 from "struct funcinfo *" to "struct comp_unit *".
970 (lookup_address_in_function_table): Dereference unit to find function
972 (lookup_address_in_function_table): Traverse the function list to
973 create a chain of inlined functions back to the first non inlined
975 (scan_unit_for_functions): Remember tag and nesting level. Handle
976 DW_AT_call_file and DW_AT_call_line.
977 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
978 call to pass unit pointer instead of function table pointer. For
979 inlined functions, save pointer to the inliner chain.
980 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
981 (_bfd_dwarf2_find_inliner_info): New function that returns information
982 from the inliner chain after a call to bfd_find_nearest_line.
984 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
985 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
986 NAME##_find_inliner_info.
987 (bfd_target): Add _bfd_find_inliner_info.
988 * bfd-in2.h: Regenerate.
990 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
991 macro that always returns bfd_false.
992 (_bfd_dwarf2_find_inliner_info): Declare.
993 * libbfd.h: Regenerate.
995 * elf32-arm.c (elf32_arm_find_inliner_info): New function
996 that calls _bfd_dwarf2_find_inliner_info.
997 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
999 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1000 that calls _bfd_dwarf2_find_inliner_info.
1001 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1002 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1003 _bfd_mips_elf_find_inliner_info.
1004 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1005 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1007 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1008 _bfd_dwarf2_find_inliner_info.
1009 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1010 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1011 _bfd_elf_find_inliner_info.
1013 * coffgen.c (coff_find_inliner_info): New function that
1014 calls _bfd_dwarf2_find_inliner_info.
1015 * libcoff-in.h (coff_find_inliner_info): Declare.
1016 * libcoff.h: Regenerate.
1017 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1018 (pmac_xcoff_vec) Ditto.
1019 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1020 (aix5coff64_vec): Ditto.
1022 * aout-target.h (MY_find_inliner_info): Define as
1023 _bfd_nosymbols_find_inliner_info.
1024 * aout-tic30.c (MY_find_inliner_info): Ditto.
1025 * binary.c (binary_find_inliner_info): Ditto.
1026 * i386msdos.c (msdos_find_inliner_info): Ditto.
1027 * ihex.c (ihex_find_inliner_info): Ditto.
1028 * libaout.h (aout_32_find_inliner_info): Ditto.
1029 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1030 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1031 * mmo.c (mmo_find_inliner_info): Ditto.
1032 * nlm-target.h (nlm_find_inliner_info): Ditto.
1033 * pef.c (bfd_pef_find_inliner_info): Ditto.
1034 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1035 * srec.c (srec_find_inliner_info): Ditto.
1036 * tekhex.c (tekhex_find_inliner_info): Ditto.
1037 * versados.c (versados_find_inliner_info): Ditto.
1038 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1040 * ieee.c (ieee_find_inliner_info): New function that always
1042 * oasys.c (oasys_find_inliner_info): Ditto.
1043 * vms.c (vms_find_inliner_info): Ditto.
1045 2005-05-24 Alan Modra <amodra@bigpond.net.au>
1047 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1048 force old plt layout.
1050 2005-05-22 Richard Henderson <rth@redhat.com>
1052 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1054 (elf64_alpha_check_relocs): Likewise.
1055 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1056 non-allocated sections.
1058 2005-05-22 Richard Henderson <rth@redhat.com>
1060 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1061 undefweak to use zero register. Call elf64_alpha_relax_got_load
1062 if not all uses removed.
1063 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1064 (elf64_alpha_relax_section): Handle undefweak symbols.
1065 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1066 (elf64_alpha_size_rela_got_1): Likewise.
1067 (elf64_alpha_relocate_section): Likewise.
1069 2005-05-22 Richard Henderson <rth@redhat.com>
1071 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1072 on SEC_CODE sections.
1074 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1076 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1078 (som_write_space_strings): Change type of tmp_space and p to char *.
1079 (som_write_symbol_strings): Likewise. Also change type of comp to
1081 (som_begin_writing): Change type of strings_size to unsigned int.
1082 (som_finish_writing): Likewise.
1083 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1085 * som.h (struct som_section_data_struct): Change type of reloc_stream
1086 field to unsigned char *.
1088 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1090 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1091 copy relocations for VxWorks.
1093 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1095 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1097 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1098 (ppc_elf_check_relocs): Set has_sda_refs.
1099 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1100 copy relocations. Use has_sda_refs to place variables in .sbss.
1101 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1104 2005-05-20 Bob Wilson <bob.wilson@acm.org>
1106 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1107 xtensa_default_isa is initialized.
1109 2005-05-20 Alan Modra <amodra@bigpond.net.au>
1111 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1112 for second and subsequent list entries. Only allocate multiple
1113 glink stubs when shared or pie.
1114 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1115 glink stub is needed.
1117 2005-05-19 Zack Weinberg <zack@codesourcery.com>
1119 * Makefile.am: Have 'all' depend on 'info'.
1120 * Makefile.in: Regenerate.
1122 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1124 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1125 init_offset. Add init_got_refcount, init_plt_refcount,
1126 init_got_offset and init_plt_offset.
1127 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1128 (_bfd_elf_link_hash_hide_symbol): Likewise.
1129 (_bfd_elf_link_hash_table_init): Likewise.
1130 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1131 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1132 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1133 (bfd_elf_size_dynamic_sections): Likewise.
1134 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1135 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1136 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1137 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1138 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1139 (struct plt_entry): New.
1140 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1141 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1142 use _bfd_elf_link_hash_copy_indirect.
1143 (update_plt_info, find_plt_ent): New functions.
1144 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1145 and adjust for use of plt list rather than refcount.
1146 (ppc_elf_gc_sweep_hook): Likewise.
1147 (ppc_elf_tls_optimize): Likewise.
1148 (ppc_elf_adjust_dynamic_symbol): Likewise.
1149 (allocate_dynrelocs): Likewise.
1150 (ppc_elf_relax_section): Likewise.
1151 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1152 when performing a relocatable link.
1153 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1154 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1157 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1159 * elf.c (assign_file_positions_for_segments): Use maximum of
1160 maxpagesize and section alignment when adjusting initial
1161 segment offset and section offsets.
1163 2005-05-18 Zack Weinberg <zack@codesourcery.com>
1165 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1168 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1170 * elf.c (group_signature): Undo the last change. Check if the
1171 symbol table section is correct.
1173 2005-05-17 Zack Weinberg <zack@codesourcery.com>
1175 * elf32-arm.c: Wherever possible, use official reloc names
1177 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1178 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1179 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1180 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1181 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1182 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1183 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1184 Add many new relocations from AAELF.
1185 (elf32_arm_howto_from_type): Update to match.
1186 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1187 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1188 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1189 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1190 (elf32_arm_final_link_relocate): Add support for
1191 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1192 case entries redundant with default.
1194 * reloc.c: Reorganize ARM relocations. Add Thumb
1195 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1196 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1197 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1198 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1199 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1200 * bfd-in2.h, libbfd.h: Regenerate.
1202 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1204 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1206 * format.c (bfd_check_format_matches): Set output_has_begun
1208 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1209 special case for both_direction.
1211 2005-05-17 Nick Clifton <nickc@redhat.com>
1213 * elf.c (group_signature): Check for a group section which is
1214 actually a (corrupt) symbol table section in disguise and prevent
1215 an infinite loop from occurring.
1217 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1219 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1222 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1224 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1225 predicate on slot 0 only if slot 0 isn't br.
1227 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1230 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1231 empty sdynbss section.
1232 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1234 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
1236 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1239 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1241 * elf32-ppc.c (LIS_11. LIS_12): Define.
1242 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1243 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1244 for --data-plt when building non-pie executables.
1246 2005-05-17 Nick Clifton <nickc@redhat.com>
1248 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1249 the situation where a symbols's section is not known but a section
1250 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1253 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1254 the presence of a symbol table to just before the symbol table is
1257 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1260 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1261 (elfNN_ia64_relax_section): Use it.
1263 2005-05-14 Mark Kettenis <kettenis@gnu.org>
1265 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1268 2005-05-14 Alan Modra <amodra@bigpond.net.au>
1270 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1272 (ppc_elf_finish_dynamic_sections): Likewise.
1274 2005-05-13 Fred Fish <fnf@specifixinc.com>
1276 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1277 * libbfd.h: Rebuilt.
1279 2005-05-13 Bob Wilson <bob.wilson@acm.org>
1281 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1282 periods in linkonce_kind values.
1284 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1286 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1287 against protected function when building executable.
1289 2005-05-12 Alan Modra <amodra@bigpond.net.au>
1291 * elf32-ppc.c (LWZU_0_X_11): Delete.
1292 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1293 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1294 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1296 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1298 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1299 Generate .glink branch table and updated stubs.
1301 2005-05-11 Alan Modra <amodra@bigpond.net.au>
1303 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1304 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1305 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1306 (CROR_151515, CROR_313131): Delete.
1307 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1308 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1309 LWZU_0_X_11): Define.
1310 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1311 and R_PPC_REL16_HA entries.
1312 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1313 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1314 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1315 new_plt, and old_plt.
1316 (ppc_elf_create_dynamic_sections): Create .glink section.
1317 (ppc_elf_check_relocs): Set new_plt and old_plt.
1318 (ppc_elf_select_plt_layout): New function.
1319 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1320 (allocate_got): Handle differences between old and new got layout.
1321 (allocate_dynrelocs): Likewise for plt.
1322 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1323 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1324 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1325 destination of R_PPC_PLTREL24 relocs.
1326 (ppc_elf_relocate_section): Handle new relocs and changed destination
1328 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1329 differences in layout.
1330 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1331 put a blrl in new got. Write glink contents.
1332 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1333 * libbfd.h: Regenerate.
1334 * bfd-in2.h: Regenerate.
1336 2005-05-11 Andreas Schwab <schwab@suse.de>
1338 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1341 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1343 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1344 section if SEC_ALLOC isn't set.
1346 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1348 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1349 * acinclude.m4: Don't sinclude accross.m4.
1350 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1352 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1354 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1355 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1356 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1357 (func_desc_adjust): Hide fake function descriptors when function
1358 code entry is defined.
1359 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1361 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1363 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1365 2005-05-08 Dave Korn <dave.korn@artimi.com>
1367 * coff-tic80.c: Undefine _CONST after system headers to prevent
1368 clash with tic80-specific definition in include/coff/tic80.h
1370 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1373 * elflink.c (elf_link_output_extsym): Use output_bfd if
1374 h->root.u.def.section is bfd_abs_section_ptr when reporting
1377 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1379 * elf-bfd.h (elf_backend_data): Update special_sections to
1380 array of pointer to bfd_elf_special_section.
1381 * elf.c (special_sections): Likewise.
1382 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1383 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1384 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1385 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1386 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1387 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1388 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1389 * elf32-v850.c (v850_elf_special_sections): Likewise.
1390 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1391 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1392 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1393 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1394 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1395 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1396 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1397 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1399 * elf.c (get_special_section): Updated.
1401 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1403 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1404 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1405 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1407 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1408 * elf32-frv.c (_frv_create_got_section): Likewise.
1409 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1410 (elf_backend_got_symbol_offset): Don't define.
1411 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1412 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1414 (ppc_elf_create_got): Tidy.
1415 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1416 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1417 (ppc_elf_gc_sweep_hook): Likewise.
1418 (ppc_elf_relocate_section): Likewise.
1419 (ppc_elf_finish_dynamic_symbol): Likewise.
1420 (allocate_got): New function.
1421 (allocate_dynrelocs): Use allocate_got.
1422 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1423 so that local got can refcount it. Set got_header_size.
1424 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1426 (ppc_elf_finish_dynamic_sections): Likewise.
1427 (elf_backend_got_symbol_offset): Don't define.
1428 (elf_backend_got_header_size): Ditto.
1430 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1432 * configure.in (ACX_HEADER_STRING): New.
1433 * configure: Regenerate.
1434 * config.in: Regenerate.
1435 * sysdep.h (STRING_WITH_STRINGS): Use.
1437 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1439 * elf.c (_bfd_elf_close_and_cleanup): Only call
1440 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1442 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1444 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1445 "__bss_start" instead of "_edata" as fallback.
1447 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1449 * bfd-in2.h: Regenerated.
1451 2005-05-05 Paul Brook <paul@codesourcery.com>
1453 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1454 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1456 * configure: Regenerate.
1457 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1458 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1459 (elf32-i386.lo): Depend on elf-vxworks.h.
1460 (elf-vxworks.lo): New rule.
1461 * Makefile.in: Regenerate.
1462 * elf-bfd.h (elf_backend_data): Update type of
1463 elf_backend_emit_relocs.
1464 (_bfd_elf_link_output_relocs): Update prototype.
1465 * elflink.c (_bfd_elf_link_output_relocs): Always use
1466 bed->elf_backend_emit_relocs when outputting relocations.
1467 * elfxx-target.h (elf_backend_emit_relocs): Default to
1468 _bfd_elf_link_output_relocs.
1469 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1470 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1471 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1472 (elf_i386_plt0_entry): Remove padding.
1473 (elf_i386_pic_plt0_entry): Ditto.
1474 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1475 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1476 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1477 plt0_pad_byte fields.
1478 (elf_i386_link_hash_table_create): Zero them.
1479 (elf_i386_create_dynamic_sections): Create static relocation section.
1480 (allocate_dynrelocs): Allocate space for static PLT relocations.
1481 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1482 symbols. Give PLT symbols function type. Don't strip PLT sections
1483 if we have exported symbols from them.
1484 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1485 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1487 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1488 Add relocation for GOT location. Fill in PLT static relocations.
1489 (elf_i386_vxworks_link_hash_table_create): New function.
1490 (elf_i386_vxworks_link_output_symbol_hook): New function.
1491 * elf-vxworks.h: New file.
1493 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1495 * section.c (bfd_make_section_anyway_with_flags): New.
1496 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1497 (bfd_make_section_with_flags): New.
1498 (bfd_make_section): Call bfd_make_section_with_flags.
1500 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1501 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1502 instead of bfd_make_section/bfd_make_section and don't call
1503 bfd_set_section_flags.
1504 (mn10300_elf_check_relocs): Likewise.
1505 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1506 * elf32-arm.c (create_got_section): Likewise.
1507 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1508 (elf32_arm_check_relocs): Likewise.
1509 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1510 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1511 (_frv_create_got_section): Likewise.
1512 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1513 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1514 (elf32_hppa_check_relocs): Likewise.
1515 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1516 (i370_elf_check_relocs): Likewise.
1517 * elf32-i386.c (create_got_section): Likewise.
1518 (elf_i386_check_relocs): Likewise.
1519 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1520 (create_got_section): Likewise.
1521 (m32r_elf_create_dynamic_sections): Likewise.
1522 (m32r_elf_check_relocs): Likewise.
1523 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1524 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1525 (ppc_elf_create_dynamic_sections): Likewise.
1526 (ppc_elf_add_symbol_hook): Likewise.
1527 (ppc_elf_check_relocs): Likewise.
1528 * elf32-s390.c (create_got_section): Likewise.
1529 (elf_s390_check_relocs): Likewise.
1530 * elf32-sh.c (create_got_section): Likewise.
1531 (sh_elf_create_dynamic_sections): Likewise.
1532 (sh_elf_check_relocs): Likewise.
1533 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1534 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1535 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1536 (add_extra_plt_sections): Likewise.
1537 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1538 (elf64_alpha_create_got_section): Likewise.
1539 (elf64_alpha_create_dynamic_sections): Likewise.
1540 (elf64_alpha_check_relocs): Likewise.
1541 * elf64-hppa.c (get_reloc_section): Likewise.
1542 (get_opd): Likewise.
1543 (get_plt): Likewise.
1544 (get_dlt): Likewise.
1545 (get_stub): Likewise.
1546 (elf64_hppa_create_dynamic_sectionso): Likewise.
1547 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1548 * elf64-ppc.c (create_linkage_sections): Likewise.
1549 (ppc64_elf_check_relocs): Likewise.
1550 * elf64-s390.c (create_got_section): Likewise.
1551 (elf_s390_check_relocs): Likewise.
1552 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1553 (sh64_elf64_create_dynamic_sections): Likewise.
1554 * elf64-x86-64.c (create_got_section): Likewise.
1555 (elf64_x86_64_check_relocs): Likewise.
1556 * elflink.c (_bfd_elf_create_got_section): Likewise.
1557 (_bfd_elf_link_create_dynamic_sections): Likewise.
1558 (elf_link_add_object_symbols): Likewise.
1559 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1560 (elfNN_ia64_create_dynamic_sections): Likewise.
1561 (get_fptr): Likewise.
1562 (get_pltoff): Likewise.
1563 (get_reloc_section): Likewise.
1564 (elfNN_ia64_object_p): Likewise.
1565 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1566 (mips_elf_create_compact_rel_section): Likewise.
1567 (mips_elf_create_got_section): Likewise.
1568 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1569 * elfxx-sparc.c (create_got_section): Likewise.
1570 (_bfd_sparc_elf_check_relocs): Likewise.
1572 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1573 on linker created sections.
1575 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1578 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1579 script on executable.
1581 2005-05-05 John Levon <levon@movementarian.org>
1583 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1584 allocated memory before returning.
1585 (decode_line_info): Likewise.
1586 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1587 allocated by functions in this file.
1588 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1589 * elf.c (_bfd_elf_close_and_cleanup): Call
1590 _bfd_dwarf2_cleanup_debug_info.
1592 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1594 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1595 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1596 * configure, config.in, Makefile.in: Regenerate.
1597 * sysdep.h (stpcpy): Revert last change.
1599 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1601 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1603 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1605 * elfxx-ia64.c (ARCH_SIZE): New.
1606 (LOG_SECTION_ALIGN): Likewise.
1607 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1608 align relocation sections.
1609 (get_fptr): Likewise.
1610 (get_reloc_section): Likewise.
1611 (elfNN_ia64_tprel_base): Likewise.
1612 (elfNN_ia64_check_relocs): Support 32bit relocations.
1613 (allocate_global_fptr_got): Likewise.
1614 (allocate_dynrel_entries): Likewise.
1615 (set_got_entry): Likewise.
1616 (set_pltoff_entry): Likewise.
1617 (elfNN_ia64_relocate_section): Likewise.
1619 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1621 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1622 * configure: Regenerate.
1623 * config.in: Likewise.
1625 * sysdep.h (stpcpy): New.
1627 2005-05-04 Nick Clifton <nickc@redhat.com>
1629 * Update the address and phone number of the FSF organization in
1630 the GPL notices in the following files:
1631 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1632 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1633 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1634 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1635 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1636 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1637 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1638 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1639 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1640 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1641 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1642 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1643 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1644 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1645 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1646 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1647 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1648 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1649 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1650 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1651 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1652 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1653 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1654 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1655 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1656 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1657 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1658 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1659 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1660 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1661 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1662 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1663 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1664 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1665 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1666 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1667 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1668 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1669 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1670 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1671 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1672 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1673 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1674 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1675 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1676 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1677 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1678 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1679 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1680 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1681 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1682 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1683 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1684 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1685 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1686 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1687 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1688 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1689 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1690 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1691 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1692 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1693 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1694 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1695 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1696 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1697 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1698 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1699 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1700 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1703 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1705 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1706 * bfd-in2.h: Regenerated.
1708 * elflink.c (bfd_elf_set_symbol): New.
1709 (_bfd_elf_provide_symbol): Call it.
1710 (_bfd_elf_provide_section_bound_symbols): New.
1712 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1714 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1715 at the end, if a strong definition has already been seen.
1717 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1719 * section.c (struct bfd_section): Replace link_order_head and
1720 link_order_tail with map_head and map_tail union.
1721 (STD_SECTION): Update.
1722 (_bfd_strip_section_from_output): Delete.
1723 * aoutx.h: Update throughout for above changes.
1724 * coff-ppc.c: Likewise.
1725 * cofflink.c: Likewise.
1726 * ecoff.c: Likewise.
1727 * elf-eh-frame.c: Likewise.
1728 * elf-m10300.c: Likewise.
1730 * elf32-arm.c: Likewise.
1731 * elf32-cris.c: Likewise.
1732 * elf32-hppa.c: Likewise.
1733 * elf32-i386.c: Likewise.
1734 * elf32-m32r.c: Likewise.
1735 * elf32-m68hc1x.c: Likewise.
1736 * elf32-m68k.c: Likewise.
1737 * elf32-ppc.c: Likewise.
1738 * elf32-s390.c: Likewise.
1739 * elf32-sh.c: Likewise.
1740 * elf32-vax.c: Likewise.
1741 * elf32-xtensa.c: Likewise.
1742 * elf64-alpha.c: Likewise.
1743 * elf64-hppa.c: Likewise.
1744 * elf64-ppc.c: Likewise.
1745 * elf64-s390.c: Likewise.
1746 * elf64-sh64.c: Likewise.
1747 * elf64-x86-64.c: Likewise.
1748 * elflink.c: Likewise.
1749 * elfxx-ia64.c: Likewise.
1750 * elfxx-mips.c: Likewise.
1751 * elfxx-sparc.c: Likewise.
1752 * linker.c: Likewise.
1753 * merge.c: Likewise.
1754 * pdp11.c: Likewise.
1755 * xcofflink.c: Likewise.
1756 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1757 out from bfd_elf_size_dynamic_sections.
1758 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1759 * bfd-in2.h: Regenerate.
1761 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1763 * section.c (bfd_section_list_remove): Don't clear s->next.
1764 (bfd_section_list_append): Always init s->prev.
1765 (bfd_section_list_prepend): Define.
1766 (bfd_section_list_insert_after): Minor optimization.
1767 (bfd_section_removed_from_list): Rewrite.
1768 * elf.c (assign_section_numbers): Simplify list traversal now that
1769 bfd_section_list_remove doesn't destroy removed section next ptr.
1770 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1771 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1772 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1773 * bfd-in2.h: Regenerate.
1775 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1777 * bfd.c (bfd): Remove section_tail and add section_last.
1778 (bfd_preserve): Likewise.
1779 (bfd_preserve_save): Likewise.
1780 (bfd_preserve_restore): Likewise.
1781 * opncls.c (_bfd_new_bfd): Likewise.
1783 * coffcode.h (coff_compute_section_file_positions): Updated.
1784 (coff_compute_section_file_positions): Likewise.
1785 * elf.c (assign_section_numbers): Likewise.
1786 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1787 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1788 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1789 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1790 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1791 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1793 * ecoff.c (bfd_debug_section): Initialize prev.
1795 * section.c (bfd_section): Add prev.
1796 (bfd_section_list_remove): Updated.
1797 (bfd_section_list_append): New.
1798 (bfd_section_list_insert_after): New.
1799 (bfd_section_list_insert_before): New.
1800 (bfd_section_list_insert): Removed.
1801 (bfd_section_removed_from_list): Updated.
1802 (STD_SECTION): Initialize prev.
1803 (bfd_section_init): Updated.
1804 (bfd_section_list_clear): Updated.
1806 * bfd-in2.h: Regenerated.
1808 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1810 * elf.c (_bfd_elf_new_section_hook): Don't call
1811 _bfd_elf_get_sec_type_attr on sections from input files.
1813 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1815 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1816 hash table size 16699 instead of bfd_hash_table_init.
1818 2005-05-01 Paul Brook <paul@codesourcery.com>
1820 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1821 definition has already been seen.
1823 2005-05-01 Paul Brook <paul@codesourcery.com>
1825 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1826 R_ARM_PLT32 the same as R_ARM_PC24.
1827 (arm_add_to_rel): Ditto.
1829 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1831 * config.bfd: Add h8300*-*-rtemscoff.
1832 Switch h8300*-*-rtems* to elf.
1834 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1836 * aclocal.m4, Makefile.in: Regnerated.
1838 2005-04-28 Paul Brook <paul@codesourcery.com>
1840 Merge changes only applied to Makefile.in.
1841 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1842 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1843 (elfxx-sparc.lo): New rule.
1844 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1845 (elf64-sparc.lo): Likewise.
1847 2005-04-28 Julian Brown <julian@codesourcery.com>
1849 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1852 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1854 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1856 * elf.c (bfd_elf_sym_name): Updated.
1857 (group_signature): Likewise.
1858 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1859 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1860 (ppc64_elf_edit_toc): Likewise.
1861 (ppc64_elf_relocate_section): Likewise.
1862 * elfcode.h (elf_slurp_symbol_table): Likewise.
1863 * elflink.c (elf_link_input_bfd): Likewise.
1865 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1866 bfd_elf_sym_name to get local symbol name when reporting errors.
1868 2005-04-27 Nick Clifton <nickc@redhat.com>
1870 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1871 formatted input file results in a reloc which has no associated
1874 2005-04-26 Jerome Guitton <guitton@gnat.com>
1876 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1878 2005-04-25 David S. Miller <davem@davemloft.net>
1880 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1881 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1882 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1885 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1888 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1889 to discarded section an error.
1891 2005-04-21 Jerome Guitton <guitton@gnat.com>
1893 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1894 corresponding AC_CHECK_DECLS.
1895 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1897 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1898 * configure: Regenerate.
1901 2005-04-21 Andreas Schwab <schwab@suse.de>
1903 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1904 unsigned from type of dynamic_interpreter.
1905 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1908 * elf.c (assign_section_numbers): Fix comment.
1910 2005-04-21 Jerome Guitton <guitton@gnat.com>
1912 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1913 for struct som_exec_auxhdr fields.
1915 2005-04-21 Nick Clifton <nickc@redhat.com>
1917 * aout-adobe.c: Convert to ISO C and fix formatting.
1918 * aout-arm.c: Convert to ISO C and fix formatting.
1919 * aout-cris.c: Convert to ISO C and fix formatting.
1920 * aout-ns32k.c: Convert to ISO C and fix formatting.
1921 * aout-tic30.c: Convert to ISO C and fix formatting.
1922 * coffcode.h: Convert to ISO C and fix formatting.
1923 * coffswap.h: Convert to ISO C and fix formatting.
1924 * i386aout.c: Convert to ISO C and fix formatting.
1925 * libaout.h: Convert to ISO C and fix formatting.
1926 * libcoff-in.h: Convert to ISO C and fix formatting.
1927 * libcoff.h: Convert to ISO C and fix formatting.
1928 * libecoff.h: Convert to ISO C and fix formatting.
1929 * libnlm.h: Convert to ISO C and fix formatting.
1930 * libpei.h: Convert to ISO C and fix formatting.
1931 * libxcoff.h: Convert to ISO C and fix formatting.
1932 * nlm-target.h: Convert to ISO C and fix formatting.
1933 * nlm.c: Convert to ISO C and fix formatting.
1934 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1935 * nlm32-i386.c: Convert to ISO C and fix formatting.
1936 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1937 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1938 * nlmcode.h: Convert to ISO C and fix formatting.
1939 * nlmswap.h: Convert to ISO C and fix formatting.
1940 * pe-mips.c: Convert to ISO C and fix formatting.
1941 * peXXigen.c: Convert to ISO C and fix formatting.
1942 * peicode.h: Convert to ISO C and fix formatting.
1943 * vms-gsd.c: Convert to ISO C and fix formatting.
1944 * vms-hdr.c: Convert to ISO C and fix formatting.
1945 * vms-misc.c: Convert to ISO C and fix formatting.
1946 * vms-tir.c: Convert to ISO C and fix formatting.
1947 * vms.c: Convert to ISO C and fix formatting.
1948 * vms.h: Convert to ISO C and fix formatting.
1950 * coffgen.c (coff_print_symbol): Restore correct formatting of
1953 2005-04-20 David S. Miller <davem@davemloft.net>
1955 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1956 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1957 (allocate_dynrelocs): Likewise.
1959 2005-04-20 Jerome Guitton <guitton@gnat.com>
1961 * configure.in: Fix the check for basename declaration. Add check
1962 for declarations of ftello, ftello64, fseeko, fseeko64.
1963 * configure: Regenerate.
1965 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1967 2005-04-19 David S. Miller <davem@davemloft.net>
1969 * elfxx-sparc.c: New file.
1970 * elfxx-sparc.h: New file.
1971 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1972 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1973 (elfxx-sparc.lo): New rule.
1974 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1975 (elf64-sparc.lo): Likewise.
1976 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1977 (bfd_elf64_sparc_vec): Likewise.
1978 * configure: Regenerate.
1979 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1980 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1981 which is more consistent with elf32-sparc.c
1983 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1985 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1986 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1988 2005-04-19 Alan Modra <amodra@bigpond.net.au>
1990 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1991 dynamic relocs in non-SEC_ALLOC sections.
1992 (ppc_elf_gc_sweep_hook): Likewise.
1993 (ppc_elf_relax_section): Likewise.
1994 (ppc_elf_relocate_section): Likewise.
1996 2005-04-18 Nick Clifton <nickc@redhat.com>
1998 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1999 assigning a value to return_value.
2001 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2004 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2007 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2010 * elf.c (setup_group): Properly handle zero group count.
2012 2005-04-17 Mark Kettenis <kettenis@gnu.org>
2014 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2015 (som_is_subspace, compare_subspaces, som_compute_checksum)
2016 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2018 (hppa_som_reloc, compare_syms, compare_subspaces)
2019 (som_print_symbol, som_get_section_contents)
2020 (som_set_section_contents): Remove space after 'void *'.
2021 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2022 (som_bfd_merge_private_bfd_data)
2023 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2026 2004-04-15 Julian Brown <julian@codesourcery.com>
2028 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2029 * bfd-in2.h: Regenerate.
2030 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2031 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2032 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2033 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2034 relocations if requested to.
2035 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2036 use_blx rather than symbian_p.
2037 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2038 use_blx is in effect.
2039 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2042 2005-04-15 Nick Clifton <nickc@redhat.com>
2044 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2047 2005-04-15 Alan Modra <amodra@bigpond.net.au>
2050 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2051 used as a list pointer.
2053 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2055 * Makefile.am (NO_WERROR): Define.
2056 * warning.m4: New file
2057 * acinclude.m4: Include warning.m4.
2058 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2059 * Makefile.in: Regenerate.
2060 * configure: Regenerate.
2062 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2064 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2065 Write trailing padding.
2067 * merge.c (merge_strings): Round up section size for alignment.
2069 2005-04-14 David S. Miller <davem@davemloft.net>
2071 Add TLS support for 64-bit Sparc ELF.
2072 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2073 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2074 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2075 sparc64_elf_hash_entry, sparc64_elf_tdata,
2076 sparc64_elf_local_got_tls_type): New defines.
2077 (sparc64_elf_mkobject): New function.
2078 (sparc64_elf_link_hash_table): Add members for dynamic linker
2079 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2080 uion to track TLS GOT references. Add sym_sec to cache
2081 mappings from local sym to section.
2082 (link_hash_newfunc): New function.
2083 (sparc64_elf_bfd_link_hash_table_create): Rename to
2084 sparc64_elf_link_hash_table_create for consistency.
2085 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2086 (sparc64_elf_create_dynamic_sections): Initialize new section
2087 members of sparc64_elf_link_hash_table. Only init srelbss
2089 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2091 (SPARC_NOP): Define.
2092 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2093 sparc64_elf_plt_ptr_offset): Delete.
2094 (sparc64_plt_entry_build): New function to build PLT entries
2095 gradually instread of all at once at the end of linking.
2096 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2097 local vars. Get them from sparc64_elf_hash_table instead.
2098 Check early on if r_symndx is in bounds. Handle TLS transitions.
2099 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2100 For TLS relocs, record the tls_type in either
2101 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2102 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2103 to the __tls_get_addr symbol. For PLT relocs, track references
2104 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2105 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2106 symbol references, count the number of relocations needed for
2107 that symbol. For default switch case, don't error, this lets
2108 the TLS relocs not explicitly handled by this function get
2110 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2111 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2112 it from sparc64_elf_hash_table. Store the real PLT offset
2113 in h->plt.offset, and build PLT entries one at a time. Also
2114 get .dynbss section pointer from htab.
2115 (allocate_dynrelocs, readonly_dynrelocs,
2116 sparc64_omit_section_dynsym): New functions.
2117 (sparc64_elf_omit_section_dynsym): Use these new functions as
2119 (dtpoff_base, tpoff): New functions.
2120 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2121 locals, get them from sparc64_elf_hash_table. Handle TLS
2122 relocations and refcounting in main relocation loop.
2123 (sparc64_elf_finish_dynamic_symbol): Use
2124 sparc64_elf_link_hash_table. Build PLT entries as we see
2125 them. Handle TLS GOT relocations.
2126 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2127 from sparc64_elf_hash_table. Initialize only PLT header
2128 not all entries since we not build PLT entries one by one.
2129 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2130 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2131 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2133 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2135 * elflink.c (elf_link_input_bfd): Update check for removed
2138 2005-04-12 Alan Modra <amodra@bigpond.net.au>
2140 * Makefile.am: Run "make dep-am".
2141 * Makefile.in: Regenerate.
2142 * aclocal.m4: Regenerate.
2143 * libcoff.h: Regenerate.
2145 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2147 * linker.c (_bfd_generic_link_output_symbols): Also check if
2148 the output section of an input section has been removed from
2151 * section.c (bfd_section_list_remove): Clear the next field
2152 of the removed section.
2153 (bfd_section_removed_from_list): New.
2154 * bfd-in2.h: Regenerated.
2156 2005-04-11 David S. Miller <davem@davemloft.net>
2158 * elf32-sparc.c (elf32_sparc_relocate_section,
2159 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2160 R_SPARC_TLS_LE_{HIX22,LOX10}.
2161 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2162 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2163 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2164 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2166 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2168 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2170 2005-04-11 Nick Clifton <nickc@redhat.com>
2172 * aout-target.h: Convert to ISO C.
2173 * aoutf1.h: Convert to ISO C.
2174 * aoutx.h: Convert to ISO C.
2175 * bout.c: Convert to ISO C.
2176 * dwarf1.c: Convert to ISO C.
2177 * ecoffswap.h: Convert to ISO C.
2178 * freebsd.h: Convert to ISO C.
2179 * genlink.h: Convert to ISO C.
2180 * ieee.c: Convert to ISO C.
2181 * ihex.c: Convert to ISO C.
2182 * libcoff-in.h: Convert to ISO C.
2183 * mach-o.c: Convert to ISO C.
2184 * mach-o.h: Convert to ISO C.
2185 * netbsd.h: Convert to ISO C.
2186 * ns32k.h: Convert to ISO C.
2187 * ns32knetbsd.c: Convert to ISO C.
2188 * oasys.c: Convert to ISO C.
2189 * pdp11.c: Convert to ISO C.
2190 * pef-traceback.h: Convert to ISO C.
2191 * pef.c: Convert to ISO C.
2192 * pef.h: Convert to ISO C.
2193 * riscix.c: Convert to ISO C.
2194 * som.c: Convert to ISO C.
2195 * som.h: Convert to ISO C.
2196 * srec.c: Convert to ISO C.
2197 * stabs.c: Convert to ISO C.
2198 * sunos.c: Convert to ISO C.
2199 * tekhex.c: Convert to ISO C.
2200 * versados.c: Convert to ISO C.
2201 * version.h: Convert to ISO C.
2202 * xcoff-target.h: Convert to ISO C.
2203 * xcofflink.c: Convert to ISO C.
2204 * xsym.c: Convert to ISO C.
2205 * xsym.h: Convert to ISO C.
2207 2005-04-08 Paul Brook <paul@codesourcery.com>
2209 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2210 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2211 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2212 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2213 (elf32_arm_to_thumb_stub): Create PIC stubs.
2214 (record_arm_to_thumb_glue): Use different stub size for relocatable
2217 2005-04-05 Alan Modra <amodra@bigpond.net.au>
2219 * elf64-ppc.c (dec_dynrel_count): New function split out from
2220 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2221 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2222 (ppc64_elf_tls_optimize): Likewise.
2224 2005-04-05 Mark Kettenis <kettenis@gnu.org>
2226 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2227 CORE_WCOOKIE_OFFSET.
2228 (SPARC64_WCOOKIE_OFFSET): New.
2229 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2231 2005-04-05 Nick Clifton <nickc@redhat.com>
2233 * po/rw.po: New translation: Kinyarwanda
2234 * configure.in (ALL_LINGUAS): Add rw
2235 * configure: Regenerate.
2237 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
2239 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2240 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2241 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2243 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2244 to check for SHT_MIPS_OPTIONS sections.
2245 (_bfd_mips_elf_set_section_contents): Likewise.
2247 2005-04-04 Eric Christopher <echristo@redhat.com>
2249 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2250 Clean up gp handling code.
2252 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2254 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2256 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2257 sections for relocatable files only. Remove the linker created
2259 (_bfd_elf_compute_section_file_positions): Pass link_info to
2260 assign_section_numbers.
2262 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2263 (elf_backend_object_p): Defined.
2265 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2267 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2269 2005-04-03 Fred Fish <fnf@specifixinc.com>
2271 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2272 dwarf_ranges_size members.
2273 (struct comp_unit): Add base_address member.
2274 (struct funcinfo): Replace low/high members with an arange.
2275 (arange_add): Replace incoming "unit" parameter with "abfd" and
2276 "first_arange" pointers. Reorganize/rewrite function body.
2277 (decode_line_info): Change arange_add call to pass bfd and arange
2279 (lookup_address_in_line_info_table): Use arange list instead of
2280 individual low/high members. Walk function's arange list to find
2281 lowest PC in list, to test for overlapping functions.
2282 (read_debug_ranges): New function, reads the debug_ranges section.
2283 (lookup_address_in_function_table): Use arange list instead of
2284 individual low/high members. Rewrite to find smallest range that
2286 (read_rangelist): Read a given rangelist from debug_ranges.
2287 (scan_unit_for_functions): Use arange list instead of individual
2288 low/high members. Handle a DW_AT_ranges attribute.
2289 (parse_comp_unit): Use arange list instead of individual low/high
2290 members. Save comp unit base address. Handle a DW_AT_ranges
2293 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2295 * elf.c (assign_section_numbers): Really use the kept section.
2297 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2299 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2301 * elf.c (assign_section_numbers): When sh_link points to a
2302 discarded section, call _bfd_elf_check_kept_section to see if
2303 the kept section can be used. Otherwise reject sh_link
2304 pointing to discarded section.
2306 * elflink.c (_bfd_elf_check_kept_section): New.
2307 (elf_link_input_bfd): Use it.
2309 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2311 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2312 that we no longer need.
2314 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2316 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2318 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2320 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2322 * elf.c (assign_section_numbers): Fix a typo.
2324 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2326 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2328 (_bfd_elf_section_already_linked): Likewise.
2330 2005-03-31 Jerome Guitton <guitton@gnat.com>
2332 * config.in: Regenerate.
2334 2005-03-31 Jerome Guitton <guitton@gnat.com>
2336 * config.in (HAVE_DECL_BASENAME): New configure macro.
2337 * configure.in: Check for basename.
2338 * configure: Regenerate.
2340 2005-03-30 Julian Brown <julian@codesourcery.com>
2342 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2343 bfd_elf32_is_arm_mapping_symbol_name.
2344 * bfd-in2.h: Regenerate.
2345 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2346 bfd_elf32_is_arm_mapping_symbol_name.
2347 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2348 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2349 (arm_elf_find_function): Likewise.
2350 (elf32_arm_output_symbol_hook): Likewise.
2352 2005-03-30 Julian Brown <julian@codesourcery.com>
2354 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2355 * bfd-in2.h: Regenerate.
2356 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2357 bfd_elf32_is_arm_mapping_symbol_name.
2358 (elf32_arm_output_symbol_hook): Likewise.
2359 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2361 (is_arm_mapping_symbol_name): Function moved from here...
2362 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2365 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2367 * configure.in: Check for ffs decl and alphabetize.
2368 * config.in: Regenerate.
2369 * configure: Regenerate.
2370 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2372 2005-03-29 Fred Fish <fnf@specifixinc.com>
2374 * dwarf2.c (struct comp_unit): Fix typo.
2375 (scan_unit_for_functions): Remove unused local variable "name"
2376 and dead code that set it.
2378 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2379 Phil Blundell <philb@gnu.org>
2381 * bfd-in2.h, libbfd.h: Regenerated.
2382 * reloc.c: Add ARM TLS relocations.
2383 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2385 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2386 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2387 (elf32_arm_tls_ie32_howto): New.
2388 (elf32_arm_howto_from_type): Support TLS relocations.
2389 (elf32_arm_reloc_map): Likewise.
2390 (elf32_arm_reloc_type_lookup): Likewise.
2392 (struct elf32_arm_obj_tdata): New.
2393 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2394 (elf32_arm_mkobject): New function.
2395 (struct elf32_arm_relocs_copied): Add pc_count.
2396 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2397 (GOT_TLS_IE): Define.
2398 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2399 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2400 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2401 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2402 (dtpoff_base, tpoff): New functions.
2403 (elf32_arm_final_link_relocate): Handle TLS relocations.
2404 (IS_ARM_TLS_RELOC): Define.
2405 (elf32_arm_relocate_section): Warn about TLS mismatches.
2406 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2407 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2408 TLS relocations and pc_count.
2409 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2410 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2412 (elf32_arm_size_dynamic_sections): Handle TLS.
2413 (elf32_arm_finish_dynamic_symbol): Likewise.
2414 (bfd_elf32_mkobject): Define.
2416 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2418 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2419 relocation types. Don't count relocations which will use a PLT.
2421 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2423 * elf.c (elfcore_grok_nto_status): Print tid as long.
2424 (elfcore_grok_nto_regs): Likewise.
2426 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2428 * irix-core.c: Remove some unnecessary prototypes.
2430 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2432 * irix-core.c: Convert to ISO C.
2434 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2436 * irix-core.c (do_sections): Replace + by | in expression.
2437 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2438 to unused parameters to avoid a compiler warning.
2440 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2442 * netbsd-core.c: Convert to ISO C. Fix formatting.
2444 2005-03-24 Eric Christopher <echristo@redhat.com>
2446 * elfxx-mips.c: Revert previous patch.
2448 2005-03-24 Nick Clifton <nickc@redhat.com>
2450 * targets.c (_bfd_target_vector): Only include the
2451 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2452 all targets enabled.
2454 2005-03-24 James E Wilson <wilson@specifixinc.com>
2456 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2457 (BFD64_BACKENDS): Add elf32-ia64.lo.
2458 * Makefile.in: Regenerate.
2460 2005-03-23 Eric Christopher <echristo@redhat.com>
2462 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2463 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2464 after emitting relocation.
2465 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2466 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2469 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2470 Nick Clifton <nickc@redhat.com>
2472 * config.bfd: Accept any C library to accompany a GNU Linux
2473 implementation, not just the GNU C library.
2474 * configure.in: Likewise.
2475 * configure: Regenerate.
2477 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2479 * bfd-in.h (_bfd_elf_provide_symbol): New.
2480 * bfd-in2.h: Regenerated.
2482 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2483 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2486 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2489 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2491 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2493 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2495 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2496 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2497 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2498 (xtensa_opcode_decode): Rearrange code.
2500 2005-03-22 Nick Clifton <nickc@redhat.com>
2502 * binary.c: Convert to ISO C90 formatting.
2503 * coff-arm.c: Convert to ISO C90 formatting.
2504 * coffgen.c: Convert to ISO C90 formatting.
2505 * elf32-gen.c: Convert to ISO C90 formatting.
2506 * elf64-gen.c: Convert to ISO C90 formatting.
2507 * hash.c: Convert to ISO C90 formatting.
2508 * ieee.c: Convert to ISO C90 formatting.
2510 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2512 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2513 unresolved symbols in R_ARM_NONE relocations.
2515 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2517 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2518 UNRESOLVED_RELOC_P argument. Set it appropriately.
2519 (elf32_arm_relocate_section): Update call to
2520 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2521 unresolved_reloc instead.
2523 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2525 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2526 .gnu.warning.* sections.
2528 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2530 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2532 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2533 (elf_create_pointer_linker_section): Delete info parm. Don't make
2534 h dynamic. Don't set written_address_p.
2535 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2536 (bfd_put_ptr): Delete.
2537 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2538 Always write section contents. Assert global sym is def_regular.
2539 Use offset bottom bit as a written flag.
2540 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2543 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2545 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2546 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2549 2005-03-21 Nick Clifton <nickc@redhat.com>
2551 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2553 (t2a1_bx_pc_insn): Likewise.
2554 (t2a2_noop_insn): Likewise.
2555 (t2a3_b_insn): Likewise.
2556 (t2a1_push_insn): Likewise.
2557 (t2a2_ldr_insn): Likewise.
2558 (t2a3_mov_insn): Likewise.
2559 (t2a4_bx_insn): Likewise.
2560 (t2a5_pop_insn): Likewise.
2561 (t2a6_bx_insn): Likewise.
2562 (coff_arm_relocate_section): Only declare the high_address
2563 variable for non WINCE targets.
2565 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2567 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2568 SEC_LINKER_CREATED. Attach to dynobj.
2569 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2571 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2573 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2574 sym_offset. Add name, bss_name, sym_name, sym_val.
2575 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2576 Add sdata array of elf_linker_section_t.
2577 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2578 (enum elf_linker_section_enum): Delete.
2579 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2580 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2581 the special sections are needed. Adjust htab->sdata refs.
2582 Ensure dynobj is set in sreloc code.
2583 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2584 (ppc_elf_set_sdata_syms): New function.
2585 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2586 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2587 sym_val instead of sym_hash.
2588 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2590 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2592 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2593 (ppc_elf_merge_private_bfd_data): Likewise.
2595 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2597 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2598 (ppc_elf_create_linker_section): Don't create rel_section.
2599 (elf_create_pointer_linker_section): Don't size relocs.
2600 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2601 Don't generate relocs.
2602 (ppc_elf_relocate_section): Adjust calls to
2603 elf_finish_pointer_linker_section.
2605 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2607 * elf32-ppc.c (is_ppc_elf_target): New function.
2608 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2609 for bfd_target_elf_flavour. Do this test before endian check.
2610 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2611 (ppc_elf_size_dynamic_sections): Likewise.
2613 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2615 * elf-bfd.h (elf_backend_data): Add int to
2616 elf_backend_section_from_shdr.
2617 (bfd_elf_section_data): Update comment for this_idx.
2618 (_bfd_elf_make_section_from_shdr): Add int.
2619 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2621 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2622 and use it to set this_idx in bfd_elf_section_data.
2623 (bfd_section_from_shdr): Pass shindex to
2624 _bfd_elf_make_section_from_shdr.
2625 (_bfd_elf_section_from_bfd_section): Use this_idx in
2626 bfd_elf_section_data to find section index.
2628 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2629 index and pass it to _bfd_elf_make_section_from_shdr.
2630 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2631 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2632 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2633 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2634 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2635 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2636 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2637 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2638 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2640 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2641 Ross Ridge <rridge@csclub.uwaterloo.ca>
2643 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2644 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2647 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2649 * elflink.c (elf_mark_used_section): Remove check for special
2652 2005-03-18 Andreas Schwab <schwab@suse.de>
2654 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2655 from bfd_vma to ia64_insn, remove broken cast.
2657 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2659 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2660 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2661 elf_m68k_finish_dynamic_sections): Use it.
2663 2005-03-17 Paul Brook <paul@codesourcery.com>
2664 Dan Jacobowitz <dan@codesourcery.com>
2665 Mark Mitchell <mark@codesourcery.com>
2667 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2668 (elf32_arm_additional_program_headers): Likewise.
2669 (elf_backend_modify_segment_map): Define.
2670 (elf_backend_additional_program_headers): Likewise.
2671 (elf32_arm_symbian_modify_segment_map): Use
2672 elf32_arm_modify_segment_map.
2674 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2676 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2677 for special sections.
2679 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2681 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2682 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2683 section_sym_count param, and return number of section symbols.
2684 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2685 .dynsym contents. Don't bother calling swap_symbol_out on the
2686 first all-zero dynsym.
2687 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2688 special sections like bfd_abs_section.
2689 (bfd_elf_gc_sections): Spelling fix.
2691 2005-03-16 Fred Fish <fnf@specifixinc.com>
2694 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2695 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2697 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2699 * elflink.c (elf_mark_used_section): New.
2700 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2701 non-relocatable link if we don't do GC.
2703 2005-03-16 Nick Clifton <nickc@redhat.com>
2704 Ben Elliston <bje@au.ibm.com>
2706 * configure.in (werror): New switch: Add -Werror to the
2707 compiler command line. Enabled by default. Disable via
2709 * configure: Regenerate.
2711 2005-03-16 Nick Clifton <nickc@redhat.com>
2713 * ecoff.c: Convert to ISO C90 formatting.
2715 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2717 * elf32-ppc.c: Divide file into general and linker specific
2718 functions. Sort linker functions into roughly the order in which
2719 they are called by the ELF linker code.
2721 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2723 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2724 on section. Correct comment, and add FIXME.
2725 (ppc_elf_additional_program_headers): Don't bump header count for
2726 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2727 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2728 do allocate memory if they need it.
2730 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2732 * config.bfd (x86_64-elf): Add target.
2734 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2736 * po/es.po: Commit new Spanish translation.
2738 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2740 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2741 for global symbol when reporting overflow.
2743 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2745 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2746 * libbfd.h: Rebuilt.
2747 * archive.c (_bfd_ar_spacepad): New function.
2748 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2749 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2750 coff_write_armap): Use it.
2751 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2753 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2755 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2757 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2758 has_table to the start of the function.
2760 2005-03-10 Ben Elliston <bje@au.ibm.com>
2762 * archive.c: Include hashtab.h.
2763 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2764 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2765 (hash_file_ptr): New function.
2766 (eq_file_ptr): Likewise.
2767 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2768 * libbfd-in.h: Include hashtab.h.
2769 (struct artdata): Change `cache' member type to htab_t.
2770 * libbfd.h: Rebuild.
2772 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2774 * configure.in: Bump version to 2.16.90.
2775 * configure: Regenerated.
2777 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2779 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2780 close is a function like macro in system headers.
2782 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2785 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2786 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2788 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2790 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2792 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2794 * po/bfd.pot: Regenerate.
2796 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2798 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2800 (func_desc_adjust): Force dot-syms local in executables as well
2803 2005-03-04 David Daney <ddaney@avtrex.com>
2805 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2806 '__gnu_local_gp' symbol used by gas -mno-shared.
2808 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2810 * elf-bfd.h (elf_backend_data): Add "const char *" to
2811 elf_backend_section_from_phdr.
2813 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2814 elf_backend_section_from_phdr hook.
2816 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2817 Joseph Myers <joseph@codesourcery.com>
2819 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2820 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2822 (struct mips_elf_got_per_bfd_arg): Add global_count.
2823 (struct mips_elf_count_tls_arg): New.
2824 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2825 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2826 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2827 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2828 (TLS_RELOC_P): Define.
2829 (TP_OFFSET, DTP_OFFSET): Define.
2830 (dtprel_base, tprel_base): New functions.
2831 (mips_elf_link_hash_newfunc): Initialize tls_type.
2832 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2833 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2835 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2836 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2837 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2838 (mips_tls_got_index): New functions.
2839 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2840 arguments. Pass them to mips_elf_create_local_got_entry. Use
2842 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2844 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2845 mips_elf_create_local_got_entry.
2846 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2847 arguments. Handle TLS entries.
2848 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2849 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2851 (mips_elf_record_global_got_symbol): Likewise.
2852 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2854 (mips_elf_merge_gots): Handle TLS entries when merging.
2855 (mips_elf_initialize_tls_index): New function.
2856 (mips_elf_set_global_got_offset): Handle TLS entries.
2857 (mips_elf_adjust_gp): Handle TLS.
2858 (mips_elf_multi_got): Remove redundant call to
2859 mips_elf_resolve_final_got_entries. Initialize global_count.
2860 Correct a comment. Initialize new TLS members of mips_got_info.
2861 Assign TLS GOT indexes for new GOTs.
2862 (mips_elf_create_got_section): Initialize new TLS members of
2864 (mips_elf_calculate_relocation): Handle TLS relocs.
2865 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2867 (_bfd_mips_elf_always_size_sections): Handle TLS.
2868 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2869 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2871 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2872 (_bfd_mips_elf_hide_symbol): Handle TLS.
2873 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2874 (mips_reloc_map): Add TLS relocs.
2875 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2876 * elf64-mips.c (mips_elf64_howto_table_rel)
2877 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2878 * reloc.c: Define new MIPS TLS relocations.
2879 * libbfd.h, bfd-in2.h: Regenerated.
2881 2005-03-02 Jan Beulich <jbeulich@novell.com>
2883 * Makefile.am: Add dependency of cache.o on libiberty.h.
2884 * cache.c: Include libiberty.h.
2885 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2887 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2889 * elf.c (bfd_section_from_shdr <default case>): Call
2890 elf_backend_section_from_shdr hook unconditionally, and return
2892 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2893 * elfxx-target.h (elf_backend_section_from_shdr)
2894 (elf_backend_section_from_phdr): Default to
2895 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2898 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2900 * targets.h: Typo fix.
2901 * bfd-in2.h: Regenerate.
2903 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2904 structs to size on-disk structures.
2905 (b_out_set_section_contents): Size the external struct, not the
2906 internal one for on-disk size.
2907 (b_out_sizeof_headers): Likewise.
2909 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2911 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2912 entry points with the func descriptor as well as undefweak.
2914 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2916 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2917 present when IMPORT_NAME_UNDOECRATE is used.
2919 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2922 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2925 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2926 to _bfd_elf_merge_symbol.
2928 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2929 unsigned int to return the alignment of the old common symbol
2930 in the dynamic object.
2931 (_bfd_elf_add_default_symbol): Pass NULL to
2932 _bfd_elf_merge_symbol.
2933 (elf_link_add_object_symbols): Pass &old_alignment to
2934 _bfd_elf_merge_symbol. Get the alignment of the new common
2935 symbol in the dynamic object.
2937 2005-02-24 Ben Elliston <bje@au.ibm.com>
2939 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2940 * format.c (bfd_check_format_matches): Likewise.
2941 * archive.c (BFD_GNU960_ARMAG): Likewise.
2942 (bfd_generic_archive_p): Likewise.
2943 (_bfd_write_archive_contents): Likewise.
2945 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2947 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2948 * configure: Regenerate.
2950 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2952 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2953 COMDAT group sections to have default visibility.
2955 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2957 * coffcode.h (coff_print_aux): Warning fix.
2958 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2959 instead of section pointer to identify.
2960 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2961 the correct size buffer for local sym mangling too.
2962 (h8300_bfd_link_add_symbols): Likewise.
2963 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2965 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2966 * elf32-xtensa.c (literal_value_hash): Warning fix.
2967 * versados.c (process_otr): Warning fix.
2968 (versados_canonicalize_reloc): Likewise.
2969 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2970 * vms.c (fill_section_ptr): Warning fix.
2972 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2974 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2975 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2977 2005-02-23 Nick Clifton <nickc@redhat.com>
2979 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2980 the relvaddr field of the Elf32_crinfo structure.
2982 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2983 variables that are passed by reference to
2984 m68hc11_get_relocation_value in case that function does not
2987 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2988 return statements and replace with a single return at the end of
2989 the function. This helps pacify the flow analysis code in gcc 4.0.
2991 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2992 strtab to avoid compile time warning.
2994 2005-02-23 Ben Elliston <bje@au.ibm.com>
2996 * opncls.c (bfd_zalloc): Document this function.
2998 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3000 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3001 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3002 Replace SEC_SHARED with SEC_COFF_SHARED.
3003 (styp_to_sec_flags): Likewise.
3005 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3006 (TARGET_LITTLE_SYM): Likewise.
3008 * section.c (SEC_ARCH_BIT_0): Removed.
3009 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3010 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3011 (SEC_SHARED): Renamed to ...
3012 (SEC_COFF_SHARED): This.
3013 (SEC_BLOCK): Renamed to ...
3014 (SEC_TIC54X_BLOCK): This.
3015 (SEC_CLINK): Renamed to ...
3016 (SEC_TIC54X_CLINK): This.
3017 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3018 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3020 * bfd-in2.h: Regenerated.
3022 2005-02-21 Fred Fish <fnf@specifixinc.com>
3024 * dwarf2.c (find_abstract_instance_name): Call recursively
3025 to handle a DW_AT_specification.
3027 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3029 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3030 mips_elf_create_dynamic_relocation,
3031 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3032 Remove #if 0'd code.
3034 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3036 * Makefile.am: Run "make dep-am"
3037 * Makefile.in: Regenerate.
3039 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3041 * coffgen.c (bfd_coff_get_comdat_section): Check that
3042 coff_section_data isn't NULL.
3044 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3046 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3047 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3048 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3049 useless assignments.
3050 (xcoff_write_archive_contents_big): Likewise.
3051 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3052 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3053 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3054 * cofflink.c (process_embedded_commands): Warning fixes.
3055 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3057 * dwarf2.c: Warning fixes.
3058 * elf-bfd.h: Likewise.
3059 * elf-eh-frame.c: Likewise.
3060 * elf-strtab.c: Likewise.
3062 * elf32-m68k.c: Likewise.
3063 * elf32-ppc.c: Likewise.
3064 * elf32-sh-symbian.c: Likewise.
3065 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3066 * elf64-sh64.c: Likewise.
3067 * peicode.h: Likewise.
3068 * elf64-mmix.c: Warning fixes.
3069 * elfcode.h: Likewise.
3070 * elfxx-mips.c: Likewise.
3071 * libbfd-in.h: Likewise.
3072 * libbfd.c: Likewise.
3073 * mach-o.c: Likewise.
3074 * merge.c: Likewise.
3076 * opncls.c: Likewise.
3079 * vms-hdr.c: Likewise.
3080 * vms-tir.c: Likewise.
3081 * xtensa-isa.c: Likewise.
3082 * xtensa-modules.c: Likewise.
3084 (pstrcmp): Use correct choice of string lengths. Fix return value.
3085 (bfd_sym_module_name): Correct string length.
3086 * bfd-in2.h: Regenerate.
3087 * libbfd.h: Regenerate.
3089 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3091 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3092 uninitialized check_segment[1] in TLSMOFF case.
3093 Reported by Alan Modra.
3094 (elf32_frv_relocate_section): Improve errors and warnings.
3096 2005-02-17 Alan Modra <amodra@bigpond.net.au>
3098 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3100 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3102 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3103 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3104 * pef.c (bfd_pef_scan): Don't ignore return value of
3105 bfd_pef_scan_start_address.
3106 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3107 bfd_mach_o_scan_start_address.
3108 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3109 * elfxx-mips.c: Remove unnecessary prototypes.
3110 (sort_dynamic_relocs_64): Abort if not BFD64.
3112 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3114 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3115 Skip toc reloc adjust if reloc_count is zero.
3117 2005-02-15 Nigel Stephens <nigel@mips.com>
3118 Maciej W. Rozycki <macro@mips.com>
3120 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3121 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3122 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3123 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3124 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3126 (mips16_gprel_reloc): Remove bit shuffling; call
3127 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3128 and _bfd_mips16_elf_reloc_shuffle() instead.
3129 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3130 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3132 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3133 elf_mips16_howto_table_rel.
3134 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3135 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3136 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3137 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3138 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3140 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3141 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3142 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3144 (mips16_gprel_reloc): Remove bit shuffling; call
3145 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3146 and _bfd_mips16_elf_reloc_shuffle() instead.
3147 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3148 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3150 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3151 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3152 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3153 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3154 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3155 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3156 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3158 (mips16_gprel_reloc): Remove bit shuffling; call
3159 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3160 and _bfd_mips16_elf_reloc_shuffle() instead.
3161 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3162 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3164 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3165 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3166 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3167 handle bit shuffling for MIPS16 relocs.
3168 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3169 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3170 and _bfd_mips16_elf_reloc_shuffle().
3171 (_bfd_mips_elf_generic_reloc): Likewise.
3172 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3174 (mips_elf_obtain_contents): Remove bit shuffling.
3175 (mips_elf_perform_relocation): Likewise; call
3176 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3178 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3180 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3181 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3182 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3183 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3184 (BFD_RELOC_MIPS16_LO16): Likewise.
3185 * bfd-in2.h: Regenerate.
3186 * libbfd.h: Regenerate.
3188 2005-02-15 Jan Beulich <jbeulich@novell.com>
3190 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3191 R_IA64_DTPMOD64[LM]SB.
3193 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3195 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3196 backward branch in the same section.
3197 (elfNN_ia64_relocate_section): Inform users that the input
3198 section is too big to relax br instruction when overflow
3199 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3200 and R_IA64_PCREL21F.
3202 2005-02-14 Orjan Friberg <orjanf@axis.com>
3204 * elfcore.h (elf_core_file_p): Move the call to
3205 elf_backend_object_p to allow the correct machine to be set before
3206 processing the program headers.
3208 2005-02-14 Nick Clifton <nickc@redhat.com>
3211 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3212 aware flag from the input bfd to the output bfd.
3214 2005-02-11 Maciej W. Rozycki <macro@mips.com>
3216 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3217 R_MIPS_LITERAL relocations for external symbols.
3218 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3219 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3221 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3223 * bfd-in2.h: Rebuilt.
3225 2005-02-11 Paul Brook <paul@codesourcery.com>
3227 * elf-bfd.h (struct elf_link_hash_table): Add
3228 is_relocatable_executable.
3229 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3230 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3231 symbols in relocatable executables.
3232 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3233 relocatable executables.
3234 (_bfd_elf_link_renumber_dynsyms): Ditto.
3235 (bfd_elf_final_link): Ditto.
3236 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3237 relocations into relocatable executables.
3238 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3239 executables. Also copy absolute relocations.
3240 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3241 in relocatable executables.
3242 (allocate_dynrelocs): Copy relocations for relocatable executables.
3243 Output dynamic symbols for symbols defined in linker scripts.
3245 2005-02-11 Nick Clifton <nickc@redhat.com>
3247 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3248 to avoid a compile time warning.
3250 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3253 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3254 inclusion of coffcode.h so that it is actually picked up.
3256 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3257 case it is not used.
3259 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3260 structure and macro.
3262 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3265 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3266 to protect the declaration of this array.
3268 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3269 Avoid call to memcpy with a size of 0.
3271 2005-02-12 Alan Modra <amodra@bigpond.net.au>
3273 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3274 old-style branches to undefined dot-symbols which will be
3275 satisfied by a plt call.
3277 2005-02-11 Alan Modra <amodra@bigpond.net.au>
3279 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3280 (ppc64_elf_copy_indirect_symbol): ..here.
3281 (func_desc_adjust): Use move_plt_plist.
3283 2005-02-10 Paul Brook <paul@codesourcery.com>
3285 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3287 2005-02-10 Paul Brook <paul@codesourcery.com>
3289 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3291 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3292 (elf_link_renumber_local_hash_table_dynsyms): New function.
3293 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3295 2005-02-10 Jakub Jelinek <jakub@redhat.com>
3297 * bfd-in.h (BFD_LINKER_CREATED): Define.
3298 * bfd-in2.h: Rebuilt.
3299 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3300 BFD_LINKER_CREATED bfds when determining input bfds without
3301 .note.GNU-stack section.
3303 2005-02-10 Maciej W. Rozycki <macro@mips.com>
3305 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3306 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3307 relocations against external symbols unchanged.
3309 2005-02-08 Paul Brook <paul@codesourcery.com>
3311 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3314 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
3316 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3319 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3321 * elf64-mips.c: Fix formatting throughout.
3323 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3325 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3327 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
3329 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3330 *ABS*/*UND* sections.
3331 (elf32_frv_relocate_section): Move zero-addend-required error...
3332 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3333 missing needed TLS section.
3335 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
3337 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3338 being the last symbol.
3339 (aout_link_add_symbols): Just return TRUE if a warning
3342 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3344 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3345 R_MIPS_GPREL32 relocations against external symbols.
3346 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3349 2005-02-07 Alan Modra <amodra@bigpond.net.au>
3351 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3352 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3353 elf_string_from_elf_strtab.
3354 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3355 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3356 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3357 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3358 looking at cached symtab info first, before iterating over headers.
3359 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3360 * elfcode.h (elf_object_p): Don't load section header stringtab
3363 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3365 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3366 against protected function when building shared library.
3369 * elf64-x86-64.c (is_32bit_relative_branch): New.
3370 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3371 protected function symbol when building shared library for
3372 32bit relative branch instruction.
3374 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3376 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3377 syms when doing a relocatable link.
3378 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3380 (ppc64_elf_tls_setup): Likewise.
3381 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3383 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3385 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3386 (link_hash_newfunc): Clear all locals using memset.
3387 (make_fdh): Remove flags param. Always create fake func desc
3388 weak. Link the descriptor with the code entry sym.
3389 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3390 (add_symbol_adjust): Adjust make_fdh call.
3391 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3392 descriptor to strong undefined if code entry is strong.
3394 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3396 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3397 lookup here. Set to new before calling bfd_link_repair_undef_list.
3398 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3400 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3402 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3404 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3406 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3407 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3408 before the as-needed lib was loaded. Abort on unexpected refs.
3410 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3412 * elflink.c (elf_smash_syms): Expand comments.
3413 (elf_link_add_object_symbols): Only call elf_smash_syms for
3414 as-needed dynamic objects.
3416 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3417 everything, just the field specific to ia64.
3418 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3420 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3422 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3423 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3425 (struct add_symbol_adjust_data): New.
3426 (add_symbol_adjust): Make an undefweak func desc for old ABI
3427 objects to link with --as-needed shared libs. Return fail status.
3428 Don't adjust old ABI func entry sym to weak if func desc syms
3430 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3433 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3435 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3438 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3440 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3441 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3442 remove anything but new and undefweak.
3443 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3445 (_bfd_elf_create_dynamic_sections): Formatting.
3446 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3447 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3448 (struct elf_smash_data): New.
3449 (elf_smash_syms): New function.
3450 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3451 unneeded dynamic objects to loaded list.
3452 (elf_link_output_extsym): Don't handle as-needed here. Strip
3453 bfd_link_hash_new symbols.
3454 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3455 delref when dynindx is already -1.
3456 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3458 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3460 2005-02-01 Ben Elliston <bje@au.ibm.com>
3462 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3464 2005-02-01 Ben Elliston <bje@au.ibm.com>
3466 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3467 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3468 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3469 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3470 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3471 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3472 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3473 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3474 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3475 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3476 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3477 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3478 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3479 throughout. Similarly, collapse #if 1'd code.
3481 2005-02-01 Ben Elliston <bje@au.ibm.com>
3483 * elf-bfd.h (bfd_elf_discard_group): Remove.
3484 * elf.c (bfd_elf_discard_group): Likewise.
3485 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3487 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3489 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3490 (_bfd_elf_eh_frame_address_size): Declare.
3491 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3492 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3493 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3494 (elf_backend_eh_frame_address_size): Define.
3495 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3496 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3497 size from the new backend hook.
3498 (_bfd_elf_write_section_eh_frame): Likewise.
3499 (_bfd_elf_eh_frame_address_size): New function.
3501 2005-01-31 Andrew Cagney <cagney@gnu.org>
3503 * configure: Regenerate to track ../gettext.m4.
3505 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3507 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3508 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3510 2005-01-31 Nick Clifton <nickc@redhat.com>
3512 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3513 sparc-lynxos, vax-vms) be obsolete.
3515 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3517 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3518 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3519 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3520 * elfcode.h (elf_object_p): Use minpagesize instead of
3522 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3523 (elfNN_bed): Include ELF_MINPAGESIZE.
3525 2005-01-28 Julian Brown <julian@codesourcery.com>
3527 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3528 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3529 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3530 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3531 passing flag value from ld. Set flag value in global hash table entry.
3532 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3535 2005-01-27 Andrew Cagney <cagney@gnu.org>
3537 * configure: Regenerate to track ../gettext.m4 change.
3539 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3541 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3544 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3546 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3547 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3549 * reloc.c: Add R_FRV_TLSMOFF.
3550 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3551 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3552 (elf32_frv_relocate_section): Handle it.
3553 (elf32_frv_check_relocs): Likewise.
3554 * libbfd.h, bfd-in2.h: Rebuilt.
3555 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3556 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3557 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3558 such that they return the constant in gr9.
3559 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3561 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3562 too, such that they shrink on relaxation.
3563 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3564 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3565 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3566 if we can guarantee the use of 16-bit constants.
3567 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3568 Introduce TLS support for FR-V FDPIC.
3569 * reloc.c: Add TLS relocations.
3570 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3571 (elf32_frv_rel_tlsdesc_value_howto): New.
3572 (elf32_frv_rel_tlsoff_howto): New.
3573 (frv_reloc_map): Add new mappings.
3574 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3576 (frvfdpic_dynamic_got_plt_info): New.
3577 (frvfdpic_plt_tls_ret_offset): New.
3578 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3579 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3580 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3581 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3583 (struct frvfdpic_relocs_info): Add TLS fields.
3584 (frvfdpic_relocs_info_hash): Warning clean up.
3585 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3586 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3587 (FRVFDPIC_TLS_BIAS): Define.
3588 (tls_biased_base): New.
3589 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3591 (frv_reloc_type_lookup): Likewise.
3592 (frvfdpic_info_to_howto_rel): Likewise.
3593 (elf32_frv_relocate_section): Likewise.
3594 (_frv_create_got_section): Create the PLT section here.
3595 (elf32_frvfdpic_create_dynamic_sections): Not here.
3596 (_frvfdpic_count_nontls_entries): Move out of...
3597 (_frvfdpic_count_got_plt_entries): ... here.
3598 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3599 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3601 (_frvfdpic_relax_tls_entries): New.
3602 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3603 (_frvfdpic_get_tlsdesc_entry): New.
3604 (_frvfdpic_assign_got_entries): Add TLS support.
3605 (_frvfdpic_assign_plt_entries): Likewise.
3606 (_frvfdpic_reset_got_plt_entries): New.
3607 (_frvfdpic_size_got_plt): Move out of...
3608 (elf32_frvfdpic_size_dynamic_sections): ... here.
3609 (_frvfdpic_relax_got_plt_entries): New.
3610 (elf32_frvfdpic_relax_section): New.
3611 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3612 (elf32_frv_check_relocs): Add TLS support.
3613 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3614 * libbfd.h, bfd-in2.h: Rebuilt.
3616 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3618 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3619 loadable reloc sections.
3620 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3621 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3623 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3625 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3626 sections immediately when linking shared libs. Instead, wait until
3627 we know a lib is needed.
3628 (_bfd_elf_link_create_dynstrtab): Extract from..
3629 (_bfd_elf_link_create_dynamic_sections_): ..here.
3630 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3631 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3632 for non-existent .dynamic.
3633 (elf_link_output_extsym): Don't complain about undefined symbols
3634 in as-needed dynamic libs that aren't actually linked.
3636 2005-01-24 Andrew Cagney <cagney@gnu.org>
3638 * configure: Regenerate, ../gettext.m4 was updated.
3640 2005-01-21 Ben Elliston <bje@au.ibm.com>
3642 * aout-encap.c: Remove unused file.
3644 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3647 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3648 non-function symbols are local.
3649 (_bfd_elf_symbol_refs_local_p): Likewise.
3651 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3653 * bfd.c (bfd_link_just_syms): Add abfd param.
3654 * bfd-in2.h: Regenerate.
3656 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3658 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3659 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3660 instructions. If the amount of padding is known, reduce the size
3661 of the CIE or FDE by that amount.
3663 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3665 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3666 augmentation_size. Use bfd_signed_vmas for data_align.
3667 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3668 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3669 functions. Don't read past the end of the enclosing CIE or FDE.
3670 (skip_bytes): New utility function.
3671 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3673 (_bfd_elf_write_section_eh_frame): Use new functions.
3675 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3677 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3678 assert-style REQUIRE() macro to handle sanity checks.
3680 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3682 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3684 (read_unsigned_leb128): Removed.
3685 (read_signed_leb128): Removed.
3686 (find_abstract_instance_name): Updated.
3687 (parse_comp_unit): Accept info_ptr_unit.
3688 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3689 comp unit and pass it to parse_comp_unit.
3691 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3692 (read_signed_leb128): Moved to ...
3695 * libbfd-in.h (read_unsigned_leb128): New prototype.
3696 (read_signed_leb128): Likewise.
3697 * libbfd.h: Regenerated.
3699 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3700 Nick Clifton <nickc@redhat.com>
3702 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3703 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3704 arch_sh4a_nofpu_up in order to match the external names and make the
3705 testsuite's job easier.
3706 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3708 * bfd-in2.h: Regenerate.
3710 2005-01-15 Andrew Cagney <cagney@gnu.org>
3713 * acinclude.m4: Move BFD_NEED_DECLARATION,
3714 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3715 the new file bfd.m4. Include ../bfd/bfd.m4.
3716 * configure: Re-generate.
3718 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3720 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3721 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3723 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3724 R_PPC_RELAX32PC_PLT.
3726 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3728 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3730 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3731 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3732 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3733 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3734 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3735 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3736 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3737 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3738 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3739 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3740 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3741 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3742 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3743 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3745 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3747 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3750 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3752 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3753 * bfd-in2.h: Regenerate.
3754 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3755 to support these new machine values.
3756 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3758 (bfd_maxq_arch): Update values for the maxq20.
3760 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3762 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3763 non-shared object, do not reserve space in .plt and .rela.plt for
3764 regular symbols neither defined nor referenced in shared objects.
3766 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3768 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3769 to zero the structure.
3770 (create_got_section): Use BFD_ASSERT instead of abort.
3771 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3773 (create_got_section): New function.
3774 (sparc64_elf_create_dynamic_sections): Likewise.
3775 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3776 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3777 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3778 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3779 (sparc64_elf_finish_dynamic_symbol): Likewise.
3780 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3781 (elf_backend_create_dynamic_sections): Define to
3782 sparc64_elf_create_dynamic_sections.
3784 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3786 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3787 (elf_backend_omit_section_dynsym): Define to it.
3788 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3789 (elf_backend_omit_section_dynsym): Define to it.
3791 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3793 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3794 PT_DYNAMIC segment, unless .dynamic.
3796 2005-01-06 Paul Brook <paul@codesourcery.com>
3798 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3799 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3800 * configure: Regenerate.
3801 * elf32-arm.c: Add VxWorks target bfd.
3803 (elf32_arm_link_hash_table): Add use_rel.
3804 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3805 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3806 Correct offset calculation for RELA case.
3807 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3808 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3809 (elf32_arm_vxworks_link_hash_table_create): New function.
3810 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3811 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3812 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3814 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3816 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3818 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3819 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3820 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3821 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3822 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3823 (toc_adjusting_stub_needed): Rewrite.
3824 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3825 toc tests. Adjust for toc_adjusting_stub_needed changes.
3826 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3827 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3828 * section.c: Expand comment on backend bits.
3829 * bfd-in2.h: Regenerate.
3830 * libbfd.h: Regenerate.
3832 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3834 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3835 toc adjusting stub, do not test source section flags.
3837 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3839 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3840 from STABS debugging sections again.
3842 2005-01-05 Fred Fish <fnf@specifixinc.com>
3844 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3845 (find_abstract_instance_name): New function.
3846 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3847 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3848 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3850 2004-12-31 Paul Brook <paul@copdesourcery.com>
3852 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3854 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3856 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3857 Commit missing changes from 2004-12-22.
3858 * bfd-in2.h: Regenerate.
3860 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3862 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3864 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3866 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3867 Add 'base' argument for constructing register sections. Reformat.
3868 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3869 gp and fp regs. Reformat.
3871 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3873 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3874 * bfd-in2.h: Regenerate.
3875 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3876 (avr_reloc_map): Likewise.
3877 (avr_final_link_relocate): Likewise.
3879 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3881 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3882 as-needed dynamic libs as undefined.
3883 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3884 libs when finding they are needed.
3886 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3888 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3889 (opd_entry_value): Use opd_relocs if available.
3890 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3891 copy .opd relocations to opd_relocs.
3892 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3894 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3896 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3897 * elf32-v850.c (v850_elf_howto_table): Add entry for
3898 R_V850_LO16_SPLIT_OFFSET.
3899 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3900 (v850_elf_perform_lo16_relocation): New function, extracted from...
3901 (v850_elf_perform_relocation): ...here. Use it to handle
3902 R_V850_LO16_SPLIT_OFFSET.
3903 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3904 R_V850_LO16_SPLIT_OFFSET.
3905 * libbfd.h, bfd-in2.h: Regenerate.
3907 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3909 * config.bfd: Add s390x-ibm-tpf support.
3911 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3913 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3914 to prototype, to make hash info available.
3915 Prevent wrapped symbols from being adjusted twice.
3917 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3919 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3920 overflow for calls to undefined weak symbols.
3922 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3924 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3925 canonical sections syms have a name.
3927 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3929 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3930 have been adjusted for output.
3931 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3933 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3935 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3936 add symtab_hdr param.
3937 (group_signature): Update calls.
3938 * elf-bfd.h (bfd_elf_sym_name): Update.
3939 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3940 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3941 (ppc64_elf_relocate_section): Update.
3942 * elflink.c (elf_link_input_bfd): Update.
3944 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3946 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3947 st_shndx on STT_SECTION sections.
3949 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3951 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3952 ELF section symbols.
3954 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3956 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3957 return a real value, unless it is a PLT symbol.
3958 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3961 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3962 R_MIPS_JALR entry to 0.
3964 * archures.c: Define bfd_mach_mips9000.
3965 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3966 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3967 * cpu-mips.c (I_mips9000): Define.
3968 (arch_info_struct): Add case for bfd_mach_mips9000.
3969 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3970 * bfd-in2.h: Regenerate.
3972 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3974 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3977 2004-12-07 Ben Elliston <bje@gnu.org>
3979 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3981 2004-12-06 Daniel Jacobowitz <dan@debian.org>
3983 Suggested by Fergal Daly <fergal@esatclear.ie>:
3984 * simple.c (simple_dummy_multiple_definition): New function.
3985 (bfd_simple_get_relocated_section_contents): Use it.
3987 2004-12-03 Jan Beulich <jbeulich@novell.com>
3989 * elf.c (elf_find_function): Don't use the last file symbol ever,
3990 seen, but the last one seen prior to the symbol being reported.
3991 Don't report a filename at all for global symbols when that might
3994 2004-12-01 Paul Brook <paul@codesourcery.com>
3996 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3997 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4000 2004-12-01 Paul Brook <paul@codesourcery.com>
4002 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4005 2004-11-30 Paul Brook <paul@codesourcery.com>
4007 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4008 no_pipeline_knowledge
4009 (elf32_arm_link_hash_table_create): Ditto.
4010 (bfd_elf32_arm_process_before_allocation): Ditto.
4011 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4013 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4015 * bfd-in2.h: Regenerate.
4017 2004-11-30 Randolph Chung <tausq@debian.org>
4019 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4020 (elf32_hppa_grok_psinfo): New function.
4021 (elf_backend_grok_prstatus): Define.
4022 (elf_backend_grok_psinfo): Define.
4024 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4027 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4029 2004-11-24 Paul Brook <paul@codesourcery.com>
4031 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4033 2004-11-24 Paul Brook <paul@codesourcery.com>
4035 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4036 (elf32_arm_swap_symbol_out): New function.
4037 (elf32_arm_size_info): Add.
4038 (elf_backend_size_info): Define.
4040 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4042 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4045 2004-11-19 Alan Modra <amodra@bigpond.net.au>
4047 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4048 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4049 * nlmcode.h (nlm_write_object_contents): Warning fix.
4051 2004-11-18 Bob Wilson <bob.wilson@acm.org>
4053 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4055 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4057 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4058 (elf32_arm_plt_thumb_stub): New.
4059 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4061 (elf32_arm_link_hash_traverse): Fix typo.
4062 (elf32_arm_link_hash_table): Add obfd.
4063 (elf32_arm_link_hash_newfunc): Initialize new fields.
4064 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4065 (elf32_arm_link_hash_table_create): Initialize obfd.
4066 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4067 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4068 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4069 interworking BFD is not dynamic.
4070 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4071 not emit glue for PLT references.
4072 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4073 emit glue for PLT references. Support the Thumb PLT prefix.
4074 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4076 (elf32_arm_check_relocs): Likewise.
4077 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4079 (allocate_dynrelocs): Handle Thumb PLT references.
4080 (elf32_arm_finish_dynamic_symbol): Likewise.
4081 (elf32_arm_symbol_processing): New function.
4082 (elf_backend_symbol_processing): Define.
4084 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4086 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4087 add_fde_encoding. Remove need_relative.
4088 * elf-eh-frame.c (extra_augmentation_string_bytes)
4089 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4090 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4091 in cases where the CIE has no existing 'R' augmentation. Use
4092 size_of_output_cie_fde when assigning offsets. Use the final offset
4093 as the new section size.
4094 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4095 Account for any extra augmentation bytes in the returned offset.
4096 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4097 moved before being modified. Pad growing entries with DW_CFA_nops.
4098 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4099 and add_fde_encoding.
4101 2004-11-15 Mark Mitchell <mark@codesourcery.com>
4103 * elf32-arm.c (elf32_arm_relocate_section): Use
4104 arm_real_reloc_type.
4106 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4108 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4109 for discard relocations; don't add an R_MIPS_NONE to the main body
4112 2004-11-04 Paul Brook <paul@codesourcery.com>
4114 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4115 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4116 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4117 default version definition for unversioned symbols.
4118 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4119 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4120 _bfd_elf_slurp_version_tables. Set default version for unversioned
4123 2004-11-15 Paul Brook <paul@codesourcery.com>
4125 * elflink.c (elf_link_add_object_symbols): Don't assume version
4126 indices are consecutive.
4128 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
4130 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4131 composite relocations against the personality data.
4133 2004-11-13 Paul Brook <paul@codesourcery.com>
4135 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4136 R_ARM_PREL31 relocations to PLT entries.
4137 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4138 (elf32_arm_check_relocs): Ditto.
4140 2004-11-12 Bob Wilson <bob.wilson@acm.org>
4142 * xtensa-isa.c (xtensa_interface_class_id): New.
4144 2004-11-11 Bob Wilson <bob.wilson@acm.org>
4146 * elf32-xtensa.c (property_table_compare): Remove assertion about
4147 entries with the same address and non-zero size.
4148 (xtensa_read_table_entries): Report such entries as errors.
4150 2004-11-11 Mark Mitchell <mark@codesourcery.com>
4152 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4153 R_ARM_RELATIVE on Symbian OS.
4155 2004-11-09 Mark Mitchell <mark@codesourcery.com>
4157 * som.c (som_bfd_print_private_bfd_data): New function.
4158 (som_object_setup): Save the auxiliary header. Don't assume that
4159 zero is an invalid entry point for a shared library.
4160 (som_object_p): Allocate the auxiliary header on the heap.
4162 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4164 (elf32_arm_symbian_modify_segment_map): Likewise.
4166 2004-11-09 Daniel Jacobowitz <dan@debian.org>
4168 From David Poole <daveml@mbuf.com>:
4169 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4170 (elf32_arm_size_dynamic_sections): Call it.
4172 2004-11-09 Alan Modra <amodra@bigpond.net.au>
4174 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4175 (ALL_MACHINES_CFILES): Fix typo.
4176 * Makefile.in: Regenerate.
4177 * po/SRC-POTFILES.in: Regenerate.
4179 2004-11-08 Mark Mitchell <mark@codesourcery.com>
4181 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4182 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4183 symbol in the relocation.
4185 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4186 Vineet Sharma <vineets@noida.hcltech.com>
4188 * coff-maxq.c: New File.
4189 * cpu-maxq.c: New File.
4190 * coffcode.h: Likewise.
4191 * config.bfd: Likewise.
4192 * configure.in (maxqcoff_vec): New target vector.
4193 * Makefile.am: Add support for maxq target.
4194 * configure.in: Likewise.
4195 * archures.c:. Likewise.
4196 * targets.c: Likewise.
4197 * bfd_in2.h : Regenerated.
4198 * Makefile.in: Regenerated.
4199 * configure: Regenerated.
4200 * doc/Makefile.in: Regenerated.
4202 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4204 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4205 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4206 C_NT_WEAK aux entries.
4207 (_bfd_coff_generic_relocate_section): Handle undefined
4210 2004-11-07 Andreas Schwab <schwab@suse.de>
4212 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4213 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4214 non-default visibility.
4216 2004-11-01 Mark Mitchell <mark@codesourcery.com>
4218 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4220 (elf32_arm_symbian_modify_segment_map): Don't
4221 reset includes_filehdr and includes_phdrs here.
4223 2004-11-04 Daniel Jacobowitz <dan@debian.org>
4225 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4226 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4227 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4229 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4230 to a new removed list. Remove normal configuration stanzas.
4231 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4232 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4233 elfarm-nabi.lo with elf32-arm.lo.
4234 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4235 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4236 * elf32-arm.h: Remove.
4237 * elfarm-oabi.c: Remove.
4238 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4239 and bfd_elf32_littlearm_oabi_vec.
4240 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4242 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
4244 * config.bfd: Support crisv32-*-* like cris-*-*.
4245 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4246 (bfd_mach_cris_v10_v32): New macros.
4247 * cpu-cris.c: Tweak formatting.
4248 (get_compatible): New function.
4250 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4251 bfd_arch_info_type:s.
4252 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4253 get_compatible for member compatible and link bfd_cris_arch_v32 as
4255 * elf32-cris.c (cris_elf_pcrel_reloc)
4256 (cris_elf_set_mach_from_flags): New functions.
4257 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4258 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4259 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4260 numbers for bfd_mach_cris_v32.
4261 (PLT_ENTRY_SIZE_V32): New macro.
4262 (elf_cris_plt0_entry): Drop last comma in initializer.
4263 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4264 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4266 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4268 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4269 (elf_cris_finish_dynamic_sections): Similar.
4270 (elf_cris_adjust_dynamic_symbol): Similar.
4271 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4273 <switch with PIC relocs>: Emit error and return FALSE for
4274 bfd_mach_cris_v10_v32.
4275 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4276 Emit warning when generating textrel reloc.
4277 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4278 (cris_elf_final_write_processing): Set flags according to mach.
4279 (cris_elf_print_private_bfd_data): Display
4280 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4281 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4282 new_flags. Don't call cris_elf_final_write_processing. Don't
4283 look at the actual elf header flags at all; use
4284 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4285 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4287 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4288 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4289 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4290 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4291 * bfd-in2.h, libbfd.h: Regenerate.
4293 2004-11-04 Alan Modra <amodra@bigpond.net.au>
4295 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4296 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4298 (struct adjust_toc_info): New.
4299 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4301 2004-11-03 Bob Wilson <bob.wilson@acm.org>
4303 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4304 if there are no segments.
4306 2004-11-02 Daniel Jacobowitz <dan@debian.org>
4308 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4310 2004-11-02 Nick Clifton <nickc@redhat.com>
4312 * elf32-iq2000.c: Convert to ISO C90 formatting.
4314 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
4316 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4318 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4320 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4321 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4322 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4324 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4326 * elf32-sh.c (tpoff): Take alignment into account.
4328 2004-10-28 Nick Clifton <nickc@redhat.com>
4330 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4331 performing a relocatable link.
4332 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4333 for MIPS ports under Irix.
4335 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
4337 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4338 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4339 (elf32_arm_final_link_relocate): Ditto.
4340 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4341 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4342 (elf32_arm_adjust_dynamic_symbol): Ditto.
4343 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4344 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4345 (elf32_arm_r_howto): ... To here.
4346 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4348 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4351 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4352 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4353 and R_IA64_SECREL64LSB.
4355 2004-10-26 Paul Brook <paul@codesourcery.com>
4357 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4358 (bfd_elf_size_dynamic_sections): Create default version definition.
4359 (elf_link_output_extsym): Adjust for default symbol version.
4361 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4363 * mmo.c: Adjust to ISO C.
4365 * mmo.c (mmo_write_section_description): New function broken out
4366 of mmo_internal_write_section.
4367 (mmo_internal_write_section): For each of .text and .data, call
4368 mmo_write_section_description before outputting contents if it has
4369 nontrivially deducible vma or contents.
4370 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4371 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4372 symbols if found within the .data address range.
4374 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4376 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4378 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4380 * mmo.c (File Layout): Correct place of misplaced blurb about
4383 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4385 * config.bfd: Add mips64*-*-openbsd.
4387 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4389 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4392 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4394 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4395 * configure: Regenerate.
4397 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4400 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4401 to linker reloc_overflow callback.
4402 (aout_link_input_section_ext): Likewise.
4403 (aout_link_reloc_link_order): Likewise.
4404 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4405 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4407 (alpha_relocate_section): Likewise.
4408 * coff-arm.c (coff_arm_relocate_section): Likewise.
4409 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4410 * coff-h8500.c (extra_case): Likewise.
4411 * coff-i960.c (coff_i960_relocate_section): Likewise.
4412 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4413 * coff-mips.c (mips_relocate_section): Likewise.
4414 * coff-or32.c (coff_or32_relocate_section): Likewise.
4415 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4416 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4417 * coff-sh.c (sh_relocate_section): Likewise.
4418 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4419 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4420 * coff-z8k.c (extra_case): Likewise.
4421 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4422 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4423 (_bfd_coff_generic_relocate_section): Likewise.
4424 * ecoff.c (ecoff_reloc_link_order): Likewise.
4425 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4426 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4427 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4428 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4429 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4430 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4431 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4432 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4433 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4434 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4435 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4436 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4437 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4438 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4439 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4440 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4441 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4442 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4443 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4444 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4445 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4446 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4447 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4448 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4449 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4450 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4451 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4452 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4453 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4454 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4455 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4456 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4457 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4458 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4459 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4460 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4461 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4462 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4463 * elflink.c (elf_reloc_link_order): Likewise.
4464 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4465 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4466 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4467 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4468 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4469 (aout_link_reloc_link_order): Likewise.
4470 * reloc.c (bfd_generic_get_relocated_section_contents):
4472 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4473 * simple.c (simple_dummy_reloc_overflow): Updated.
4475 2004-10-20 Andreas Schwab <schwab@suse.de>
4477 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4478 (elf_backend_plt_sym_val): Define.
4480 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4482 * config.bfd: Set targ_underscore=yes for PE COFF targets
4484 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4486 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4487 (ppc64_elf_edit_opd): Likewise.
4489 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4491 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4492 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4493 set SEC_ALLOC and SEC_LOAD.
4495 2004-10-18 Nick Clifton <nickc@redhat.com>
4497 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4498 'name' for relocs against both local and global symbols.
4500 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4502 * bfd-in2.h: Regenerate.
4503 * bfd.c (struct bfd): Add no_export.
4504 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4506 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4508 * config.bfd: Whitespace cleanup.
4509 * Makefile.am: Run "make dep-am"
4510 * Makefile.in: Regenerate.
4512 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4514 * elflink.c (struct already_linked_section): Removed.
4515 (try_match_symbols_in_sections, already_linked): Removed.
4516 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4517 prefix of section names when finding already_linked_table
4518 chain. Compare section names. Instead of calling already_linked,
4519 do it inline and only for sections in the same already_linked_list.
4521 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4523 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4524 parameter. If called after _bfd_elf_write_section_eh_frame,
4525 don't allow a -2 return unless need_* bit is already set, and
4526 handle offsets adjusted for output_offset.
4527 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4528 * elf.c (_bfd_elf_section_offset): Update call.
4530 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4533 * coffcode.h (coff_compute_section_file_positions): Cast to
4534 bfd_vma when computing page alignment.
4536 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4538 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4539 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4541 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4543 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4544 relocations use a virtual address, not a section offset.
4546 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4548 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4549 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4550 xtensa_format_encode.
4551 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4552 (ebb_add_proposed_action): Delete.
4554 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4556 * elf32-xtensa.c: Use ISO C90 formatting.
4558 2004-10-12 Paul Brook <paul@codesourcery.com>
4560 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4563 2004-10-12 Paul Brook <paul@codesourcery.com>
4565 * elf32-arm.h: Support EABI version 4 objects.
4567 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4570 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4571 Don't mark as default.
4572 (bfd_x86_64_arch): Don't mark as default.
4574 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4576 * elflink.c (enum action_discarded): New.
4577 (elf_section_complain_discarded): Delete.
4578 (elf_action_discarded): New function subsuming the above and also
4579 controlling reloc behaviour.
4580 (elf_link_input_bfd): Use it.
4582 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4584 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4585 (special_sections): Add .gnu.liblist and .gnu.conflict.
4586 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4588 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4591 * elflink.c (elf_link_input_bfd): Try harder to support
4592 relocations against symbols in removed linkonce sections.
4594 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4596 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4599 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4600 sections do not reference symbols in non-SEC_ALLOC sections.
4602 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4605 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4606 (_bfd_elf_link_omit_section_dynsym): Formatting.
4608 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4610 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4611 * libbfd.h: Regnerate.
4612 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4613 * elf32-frv.c: Likewise.
4614 * elf32-m32r.c: Likewise.
4615 * elf32-ppc.c: Likewise.
4616 * elf64-hppa.c: Likewise.
4617 * elfxx-ia64.c: Likewise.
4618 * opncls.c: Likewise.
4620 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4622 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4623 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4624 offsets stored in struct eh_cie_fde entries before doing other
4627 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4628 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4629 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4630 setting offsets for removed CIEs. Don't set "sec", instead set
4631 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4632 CIE in hdr_info. Only set make_relative and make_lsda_relative
4633 for CIEs. Use pointers rather than array indices.
4634 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4635 make_lsda_relative, need_* on cie_inf for FDEs.
4636 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4637 section output_offset. Delete cie_offset, instead use cie_inf
4638 pointer to CIE entry. Use need_relative and need_lsda_relative on
4639 CIE entry for FDEs. Use pointers rather than array indices.
4641 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4643 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4644 bfd_is_target_special_symbol.
4645 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4646 * som.c (som_bfd_is_target_special_symbol): Define.
4648 2004-10-08 Nick Clifton <nickc@redhat.com>
4650 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4651 * configure: Regenerate.
4652 * bfd-in2.h: Regenerate.
4653 * syms.c (bfd_is_target_special_symbol): New interface function.
4654 Returns true when a symbol should be considered to be special.
4655 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4656 the symbol jump table.
4657 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4658 Return true iff the symbol is a mapping symbol.
4659 (bfd_elf32_bfd_is_target_special_symbol): Define.
4660 * elfxx-target.h: Provide a default definition for
4661 bfd_is_target_special_symbol.
4662 * aout-target.h: Likewise.
4663 * aout-tic30.c: Likewise.
4664 * binary.c: Likewise.
4665 * coffcode.h: Likewise.
4666 * i386msdos.c: Likewise.
4669 * libaout.h: Likewise.
4670 * libbfd-in.h: Likewise
4671 * libecoff.h: Likewise.
4672 * mach-o.c: Likewise.
4674 * nlm-target.h: Likewise.
4675 * oasys.c: Likewise.
4677 * ppcboot.c: Likewise.
4679 * tekhex.c: Likewise.
4680 * versados.c: Likewise.
4682 * xcoff-target.h: Likewise.
4684 * libbfd.h: Regenerate.
4686 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4688 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4689 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4690 (elf_backend_section_from_shdr): Define.
4692 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4694 * syms.c (bfd_is_local_label): Return false for file symbols.
4696 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4697 David Heine <dlheine@tensilica.com>
4699 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4700 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4701 (elf32xtensa_no_literal_movement): New global variable.
4702 (elf_howto_table): Add entries for new relocations.
4703 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4704 (property_table_compare): When addresses are equal, compare sizes and
4705 various property flags.
4706 (property_table_matches): New.
4707 (xtensa_read_table_entries): Extend to read new property tables. Add
4708 output_addr parameter to indicate that output addresses should be used.
4709 Use bfd_get_section_limit.
4710 (elf_xtensa_find_property_entry): New.
4711 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4712 (elf_xtensa_check_relocs): Handle new relocations.
4713 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4714 relocations. Use new xtensa-isa.h functions.
4715 (build_encoding_error_message): Remove encode_result parameter. Add
4716 new target_address parameter used to detect alignment errors.
4717 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4718 error handling. Use new is_operand_relocation function.
4719 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4720 Use underbar macro for error messages. Formatting.
4721 (get_const16_opcode): New.
4722 (get_l32r_opcode): Add a separate flag for initialization.
4723 (get_relocation_opnd): Operand number is no longer explicit in the
4724 relocation. Change to decode the opcode and analyze its operands.
4725 (get_relocation_slot): New.
4726 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4727 Use new xtensa-isa.h functions to handle multislot instructions.
4728 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4729 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4730 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4731 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4732 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4733 get_single_format, init_op_single_format_table): New.
4734 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4735 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4736 (contract_asm_expansion): Add error_message parameter and pass it to
4737 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4738 with R_XTENSA_SLOT0_OP.
4739 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4740 instructions. Use new xtensa-isa.h functions.
4741 (r_reloc struct): Add new virtual_offset field.
4742 (r_reloc_init): Add contents and content_length parameters. Set
4743 virtual_offset field to zero. Add contents to target_offset field for
4744 partial_inplace relocations.
4745 (r_reloc_is_defined): Check for null.
4746 (print_r_reloc): New debug function.
4747 (source_reloc struct): Replace xtensa_operand field with pair of the
4748 opcode and the operand position. Add is_abs_literal field.
4749 (init_source_reloc): Specify operand by opcode/position pair. Set
4750 is_abs_literal field.
4751 (source_reloc_compare): When target_offsets are equal, compare other
4752 fields to make sorting predictable.
4753 (literal_value struct): Add is_abs_literal field.
4754 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4755 (init_literal_value): New.
4756 (is_same_value): Replace with ...
4757 (literal_value_equal): ... this function. Add comparisons of
4758 virtual_offset and is_abs_literal fields.
4759 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4760 failure. Initialize has_last_loc field.
4761 (value_map_hash_table_delete): New.
4762 (hash_literal_value): Rename to ...
4763 (literal_value_hash): ... this. Include is_abs_literal flag and
4764 virtual_offset field in the hash value.
4765 (get_cached_value): Rename to ...
4766 (value_map_get_cached_value): ... this. Update calls to
4767 literal_value_hash and literal_value_equal.
4768 (add_value_map): Check for allocation failure. Update calls to
4769 value_map_get_cached_value and literal_value_hash.
4770 (text_action, text_action_list, text_action_t): New types.
4771 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4772 text_action_add, text_action_add_literal, offset_with_removed_text,
4773 offset_with_removed_text_before_fill, find_insn_action,
4774 print_action_list, print_removed_literals): New.
4775 (offset_with_removed_literals): Delete.
4776 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4777 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4778 allocated_relocs_count fields.
4779 (init_xtensa_relax_info): Initialize new fields.
4780 (reloc_bfd_fix struct): Add new translated field.
4781 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4783 (fix_compare, cache_fix_array): New.
4784 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4785 section via get_xtensa_relax_info. Use cache_fix_array to set up
4786 sorted fix_array and use bsearch instead of linear search.
4787 (section_cache_t): New struct.
4788 (init_section_cache, section_cache_section, clear_section_cache): New.
4789 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4790 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4791 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4792 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4794 (retrieve_contents): Use bfd_get_section_limit.
4795 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4796 to compute_removed_literals. Free value_map_hash_table when no longer
4798 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4799 compute_text_actions for all sections.
4800 (find_relaxable_sections): Mark sections as relaxable if they contain
4801 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4802 call. Increment relax_info src_count field only for appropriate
4803 relocation types. Remove is_literal_section check.
4804 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4805 r_reloc_init and find_associated_l32r_irel. Check
4806 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4807 literals. Pass is_abs_literal flag to init_source_reloc.
4808 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4809 CONST16 instructions. Adjust calls to r_reloc_init and
4810 pcrel_reloc_fits. Handle weak symbols conservatively.
4811 (find_associated_l32r_irel): Add bfd parameter and pass it to
4813 (compute_text_actions, compute_ebb_proposed_actions,
4814 compute_ebb_actions, check_section_ebb_pcrels_fit,
4815 check_section_ebb_reduces, text_action_add_proposed,
4816 compute_fill_extra_space): New.
4817 (remove_literals): Replace with ...
4818 (compute_removed_literals): ... this function. Call
4819 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4820 Call xtensa_read_table_entries to get the property table. Skip
4821 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4822 is_removable_literal, remove_dead_literal, and
4823 identify_literal_placement functions.
4824 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4825 instead of linear search.
4826 (is_removable_literal, remove_dead_literal,
4827 identify_literal_placement): New.
4828 (relocations_reach): Update check for literal not referenced by any
4829 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4830 (coalesce_shared_literal, move_shared_literal): New.
4831 (relax_section): Use bfd_get_section_limit. Call
4832 translate_section_fixes. Update calls to r_reloc_init and
4833 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4834 Add call to pin_internal_relocs. Add special handling for
4835 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4836 info to calculate new addend_displacement variable. Replace code for
4837 deleting literals with more general code to perform the actions
4838 determined by the action_list for the section.
4839 (translate_section_fixes, translate_reloc_bfd_fix): New.
4840 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4841 find_removed_literal only if is_operand_relocation. Update call to
4842 offset_with_removed_text. Use new target_offset and removed_bytes
4844 (move_literal): New.
4845 (relax_property_section): Use bfd_get_section_limit. Set new
4846 is_full_prop_section flag and handle new property tables. Update calls
4847 to r_reloc_init and offset_with_removed_text. Check
4848 is_relaxable_asm_section flag. Handle expansion of zero-sized
4849 unreachable entries, with use of offset_with_removed_text_before_fill.
4850 For relocatable links, combine entries only for literal tables.
4851 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4852 calls to offset_with_removed_text. Translate st_size field for
4854 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4855 failure. Add contents parameter. Update call to get_bfd_fix. Update
4856 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4857 R_XTENSA_ASM_EXPAND relocs.
4858 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4859 call to get_bfd_fix. Include offset from contents for partial_inplace
4861 (is_reloc_sym_weak): New.
4862 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4863 (prop_sec_len): New.
4864 (xtensa_is_property_section): Handle new property sections.
4865 (is_literal_section): Delete.
4866 (internal_reloc_compare): When r_offset matches, compare r_info and
4867 r_addend to make sorting predictable.
4868 (internal_reloc_matches): New.
4869 (xtensa_get_property_section_name): Handle new property sections.
4870 (xtensa_get_property_predef_flags): New.
4871 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4872 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4873 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4874 (xtisa_errno, xtisa_error_msg): New variables.
4875 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4876 (xtensa_insnbuf_alloc): Add error handling.
4877 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4878 use xtensa_format_decode. Add error handling.
4879 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4880 instruction length to find the number of bytes to copy.
4881 (xtensa_isa_init): Add error handling. Replace calls to
4882 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4883 tables in the xtensa_modules structure.
4884 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4885 xtensa_extend_isa): Delete.
4886 (xtensa_isa_free): Change to only free lookup tables.
4887 (opname_lookup_compare): Replace with ...
4888 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4889 (xtensa_insn_maxlength): Rename to ...
4890 (xtensa_isa_maxlength): ... this.
4891 (xtensa_insn_length): Delete.
4892 (xtensa_insn_length_from_first_byte): Replace with ...
4893 (xtensa_isa_length_from_chars): ... this function.
4894 (xtensa_num_opcodes): Rename to ...
4895 (xtensa_isa_num_opcodes): ... this.
4896 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4897 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4898 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4899 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4900 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4901 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4902 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4903 (xtensa_opcode_lookup): Add error handling.
4904 (xtensa_decode_insn): Replace with ...
4905 (xtensa_opcode_decode): ... this function, with new format and
4906 slot parameters. Add error handling.
4907 (xtensa_encode_insn): Replace with ...
4908 (xtensa_opcode_encode): ... this function, which does the encoding via
4909 one of the entries in the "encode_fns" array. Add error handling.
4910 (xtensa_opcode_name): Add error handling.
4911 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4912 xtensa_opcode_is_call): New.
4913 (xtensa_num_operands): Replace with ...
4914 (xtensa_opcode_num_operands): ... this function. Add error handling.
4915 (xtensa_opcode_num_stateOperands,
4916 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4917 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4918 xtensa_operand_is_visible): New.
4919 (xtensa_get_operand, xtensa_operand_kind): Delete.
4920 (xtensa_operand_inout): Add error handling and special-case for
4922 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4923 operate on one slot of an instruction. Added error handling.
4924 (xtensa_operand_encode): Handle default operands with no encoding
4925 functions. Check for success by comparing against decoded value.
4927 (xtensa_operand_decode): Handle default operands. Return decoded value
4928 through argument pointer. Add error handling.
4929 (xtensa_operand_is_register, xtensa_operand_regfile,
4930 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4931 (xtensa_operand_isPCRelative): Rename to ...
4932 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4933 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4934 through argument pointer. Add error handling.
4935 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4936 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4937 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4938 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4939 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4940 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4941 xtensa_state_is_exported, xtensa_sysreg_lookup,
4942 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4943 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4944 xtensa_interface_num_bits, xtensa_interface_inout,
4945 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4946 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4947 * xtensa-modules.c: Rewrite to use new data structures.
4948 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4949 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4950 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4951 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4952 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4953 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4954 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4955 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4956 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4957 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4958 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4959 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4960 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4961 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4962 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4963 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4964 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4965 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4966 * Makefile.in: Regenerate.
4967 * bfd-in2.h: Likewise.
4968 * libbfd.h: Likewise.
4970 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4972 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4973 against the absolute section.
4974 (mips_elf64_write_rela): Likewise.
4976 2004-10-07 Jan Beulich <jbeulich@novell.com>
4978 * elf.c (elf_find_function): Don't generally check for matching
4979 section, just for non-file symbols. Remove redunant comparison
4981 * elf32-arm.h (arm_elf_find_function): Likewise.
4983 2004-10-07 Jeff Baker <jbaker@qnx.com>
4985 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4986 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4989 2004-10-04 Roland McGrath <roland@redhat.com>
4991 * hash.c (bfd_hash_set_default_size): Use const for table.
4992 Use size_t instead of int for variable compared to sizeof results.
4994 2004-10-05 Alan Modra <amodra@bigpond.net.au>
4997 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4999 2004-10-01 Paul Brook <paul@codesourcery.com>
5001 * elf32-arm.h (elf32_arm_fake_sections,
5002 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5004 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5006 2004-10-01 Alan Modra <amodra@bigpond.net.au>
5008 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5010 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5011 need_relative or need_lsda_relative if we are processing an
5012 offset for a reloc on a FDE initial loc or LSDA field
5014 (_bfd_elf_write_section_eh_frame): Test need_relative and
5015 need_lsda_relative in place of corresponding make_* field
5016 when deciding to use pc-relative encodings.
5018 2004-09-30 Paul Brook <paul@codesourcery.com>
5020 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5021 target2 relocation type.
5023 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5026 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5028 2004-09-30 Paul Brook <paul@codesourcery.com>
5030 * reloc.c: Add BFD_RELOC_ARM_SMI.
5031 * bfd-in2.h: Regenerate.
5034 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5036 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5037 vma and output offset to address.
5038 * simple.c (simple_save_output_info): Only set output section
5039 and offset for debug sections, or those not already set up by
5041 (bfd_simple_get_relocated_section_contents): Update comment.
5043 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5045 * elf.c (IS_LOADED): Delete.
5046 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5047 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5050 2004-09-23 Alan Modra <amodra@bigpond.net.au>
5053 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5054 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5055 redundant assignment of EM_SPARC.
5057 2004-09-22 Brian Ford <ford@vss.fsi.com>
5059 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5060 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5062 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5064 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5066 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5067 (elf_backend_modify_segment_map): Don't define.
5069 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5071 * elf.c (IS_LOADED): Define.
5072 (assign_file_positions_for_segments): Don't round up file offset of
5073 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5074 Delete code handling link script adjustment of lma. Do the adjust
5075 in later code handling similar ajustments. Remove dead code error
5076 check. Warn if section lma would require a negative offset
5077 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5078 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5079 update voff in section loop. Change voff in segment loop to be an
5080 adjustment on top of "off". Set sec->filepos and update "off" later.
5081 Test for loadable sections consistently using IS_LOADED. Similarly,
5082 test for alloc-only sections other than .tbss consistently.
5083 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5084 Tidy PT_NOTE handling. Use %B and %A in error messages.
5085 (assign_file_positions_except_relocs): Use %B in error message.
5087 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5089 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5090 (CONFIG_STATUS_DEPENDENCIES): New.
5091 (Makefile): Removed.
5092 (config.status): Likewise.
5093 * Makefile.in: Regenerated.
5095 2004-09-17 Paul Brook <paul@codesourcery.com>
5097 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5098 (bfd_elf32_arm_process_before_allocation): Update prototype.
5099 * bfd-in2.h: Regenerate.
5100 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5101 (elf32_arm_link_hash_table_create): Set it.
5102 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5103 (bfd_elf32_arm_set_target_relocs): New function.
5104 (arm_real_reloc_type): New function.
5105 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5106 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5107 (elf32_arm_gc_sweep_hook): Ditto.
5108 (elf32_arm_check_relocs): Ditto.
5109 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5110 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5112 (elf32_arm_got_prel): New variable.
5113 (elf32_arm_howto_from_type): New function.
5114 (elf32_arm_info_to_howto): Use it.
5115 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5116 BFD_RELOC_ARM_TARGET2.
5117 * libbfd.h: Regenerate.
5118 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5120 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5122 * ecoff.c: Update u.undef.next refs.
5123 * elf64-ppc.c: Likewise.
5124 * elflink.c: Likewise.
5125 * linker.c: Likewise.
5126 * xcofflink.c: Likewise.
5128 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5129 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5130 fields to indirect struct.
5131 * elf-m10300.c: Update u.weakdef refs.
5132 * elf32-arm.h: Likewise.
5133 * elf32-cris.c: Likewise.
5134 * elf32-frv.c: Likewise.
5135 * elf32-hppa.c: Likewise.
5136 * elf32-i370.c: Likewise.
5137 * elf32-i386.c: Likewise.
5138 * elf32-m32r.c: Likewise.
5139 * elf32-m68k.c: Likewise.
5140 * elf32-ppc.c: Likewise.
5141 * elf32-s390.c: Likewise.
5142 * elf32-sh.c: Likewise.
5143 * elf32-sparc.c: Likewise.
5144 * elf32-vax.c: Likewise.
5145 * elf32-xtensa.c: Likewise.
5146 * elf64-alpha.c: Likewise.
5147 * elf64-hppa.c: Likewise.
5148 * elf64-ppc.c: Likewise.
5149 * elf64-s390.c: Likewise.
5150 * elf64-sh64.c: Likewise.
5151 * elf64-sparc.c: Likewise.
5152 * elf64-x86-64.c: Likewise.
5153 * elfxx-ia64.c: Likewise.
5154 * elfxx-mips.c: Likewise.
5155 * elflink.c: Likewise. Also u.elf_hash_value.
5156 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5158 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5159 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5160 (bfd_elf_gc_record_vtentry): Likewise.
5161 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5163 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5165 * Makefile.am: Run "make dep-am".
5166 * Makefile.in: Regenerate.
5167 * bfd-in2.h: Regenerate.
5168 * po/SRC-POTFILES.in: Regenerate.
5169 * po/bfd.pot: Regenerate.
5171 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5173 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5174 with bitfields. Make "type" and "other" bitfields too.
5175 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5176 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5177 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5178 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5179 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5180 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5181 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5182 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5183 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5184 * elf-m10300.c: Likewise.
5186 * elf32-arm.h: Likewise.
5187 * elf32-cris.c: Likewise.
5188 * elf32-frv.c: Likewise.
5189 * elf32-hppa.c: Likewise.
5190 * elf32-i370.c: Likewise.
5191 * elf32-i386.c: Likewise.
5192 * elf32-m32r.c: Likewise.
5193 * elf32-m68k.c: Likewise.
5194 * elf32-ppc.c: Likewise.
5195 * elf32-s390.c: Likewise.
5196 * elf32-sh-symbian.c: Likewise.
5197 * elf32-sh.c: Likewise.
5198 * elf32-sh64.c: Likewise.
5199 * elf32-sparc.c: Likewise.
5200 * elf32-vax.c: Likewise.
5201 * elf32-xtensa.c: Likewise.
5202 * elf64-alpha.c: Likewise.
5203 * elf64-hppa.c: Likewise.
5204 * elf64-ppc.c: Likewise.
5205 * elf64-s390.c: Likewise.
5206 * elf64-sh64.c: Likewise.
5207 * elf64-sparc.c: Likewise.
5208 * elf64-x86-64.c: Likewise.
5209 * elflink.c: Likewise.
5210 * elfxx-ia64.c: Likewise.
5211 * elfxx-mips.c: Likewise.
5212 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5213 * configure: Regenerate.
5214 * aclocal.m4: Regenerate.
5216 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5218 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5219 around uses of R_ARM_TARGET1.
5220 (elf32_arm_check_relocs): Likewise.
5222 2004-09-13 Paul Brook <paul@codesourcery.com>
5224 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5226 * bfd-in2.h: Regenerate.
5227 * libbfd.h: Regenerate.
5228 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5229 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5230 (bfd_elf32_arm_process_before_allocation): Ditto.
5231 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5232 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5233 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5236 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5238 * hpux-core.c (thread_section_p): New function.
5239 (hpux_core_core_file_p): Fix computation of offset in call
5240 to bfd_seek. Create a ".reg" section from an arbitrary
5241 ".reg/<id>" section if none was created after having read
5244 2004-09-11 Andreas Schwab <schwab@suse.de>
5246 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5247 * aclocal.m4: Rebuild.
5248 * configure: Rebuild.
5250 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5252 * section.c (bfd_sections_find_if): Fix parameter name in
5253 comment to match code.
5255 2004-09-10 Alan Modra <amodra@bigpond.net.au>
5257 * elf.c (assign_file_positions_except_relocs): Assign relocs
5258 stored in a bfd section.
5260 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
5262 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5263 h->gotplt_refcount to 0, not -1.
5265 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
5267 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5268 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5270 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5271 handle symbol visibility here.
5273 2004-09-07 Alan Modra <amodra@bigpond.net.au>
5275 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5276 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5278 (ppc_stub_name): Remove trailing "+0" on stub name.
5279 (create_linkage_sections): Create relocations for
5280 branch lookup table when --emit-relocs as well as when --shared.
5281 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5282 relbrlt test. For --emit-stub-syms, always output a sym even when
5283 one already exists on a plt call stub. Put stub type in the stub
5285 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5287 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5288 reloc_count in stub sections. Adjust relbrlt test.
5289 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5290 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5291 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5292 for relocs against discarded symbols. Fix comments.
5294 2004-09-06 Mark Mitchell <mark@codesourcery.com>
5296 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5297 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5299 (map_sections_to_segments): ... here. Use it. Assign a file
5300 position to the .dynamic section if it is not loadable, but part
5301 of the PT_DYNAMIC segment.
5302 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5303 offsets, not VMAs, for the BPABI. Do not fill in the header in
5304 the .got.plt section for the BPABI.
5305 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5307 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5309 2004-09-06 Nick Clifton <nickc@redhat.com>
5311 * elflink.c (elf_link_add_object_symbols): Set the error code to
5312 bfd_error_wrong_format when the input format does not match the
5315 2004-09-06 Alan Modra <amodra@bigpond.net.au>
5317 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5318 (ppc64_elf_check_directives): ..here.
5319 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5320 before accessing ppc64_elf_tdata.
5321 (ppc64_elf_finish_dynamic_sections): And here too.
5323 2004-09-04 Alan Modra <amodra@bigpond.net.au>
5325 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5327 2004-09-03 Mark Mitchell <mark@codesourcery.com>
5329 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5330 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5331 (bfd_elf32_littlearm_symbian_vec): Likewise.
5332 * configure: Regenerated.
5333 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5334 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5335 (PLT_ENTRY_SIZE): Likewise.
5336 (bfd_vma_elf32_arm_symbian_plt_entry): New
5338 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5340 (create_got_section): Don't create sections when generating BPABI
5342 (elf32_arm_create_dynamic_sections): Tidy.
5343 (elf32_arm_link_hash_table_create): Set plt_header_size,
5344 plt_entry_size, and symbian_p.
5345 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5346 generating BPABI objects.
5347 (allocate_dynrelocs): Use htab->plt_header_size, not
5348 PLT_HEADER_SIZE. Do not add to .got.plt when
5349 generating BPABI objects.
5350 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5351 * elfarm-nabi.c: Add SymbianOS target vectors.
5352 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5353 (_bfd_elf_link_create_dynamic_sections): Likewise.
5354 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5355 (elfNN_bed): Use it.
5356 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5357 (bfd_elf32_littlearm_symbian_vec): Likewise.
5358 (_bfd_target_vector): Add them.
5360 2004-09-03 Nick Clifton <nickc@redhat.com>
5363 * coffcode.h (handle_COMDAT): Replace abort with an warning
5364 message and allow the scan to continue.
5366 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5368 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5369 in when reading relocs, not our sorted syms. Remove unnecessary
5372 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5374 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5376 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5378 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5379 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5380 replace uses of *_alias with *_noncanonical.
5381 * aclocal.m4: Rebuild with aclocal 1.4p6.
5382 * Makefile.in: Rebuild with automake 1.4p6.
5383 * doc/Makefile.in: Rebuild with automake 1.4p6.
5384 * configure.in: Autoupdate with autoupdate 2.59.
5385 * config.in: Regenerate with autoheader 2.59.
5386 * configure: Regnerate with autoconf 2.59.
5388 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5390 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5391 symbol pointer arrays before modifying.
5393 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5395 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5396 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5397 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5398 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5399 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5400 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5401 Use both symbol tables on non-relocatable objects. Use a common
5402 error exit. Fix "mid" warning.
5403 * libbfd.h: Regenerate.
5404 * bfd-in2.h: Regenerate.
5406 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5408 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5410 (struct sfpr_def_parms): Save some space.
5411 (sfpr_define): Here too.
5413 * elf64-ppc.c (compare_symbols): Put section syms first.
5414 (sym_exists_at): New function.
5415 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5416 points only for relocatable files. Use .opd section contents
5417 otherwise. Generally clean up the code.
5419 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5421 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5422 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5423 (struct sfpr_def_parms): New.
5424 (sfpr_define): New function.
5425 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5426 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5427 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5428 (savefpr1_tail, restfpr1_tail): New functions.
5429 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5430 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5431 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5432 code. Define all ABI mandated _save and _rest functions.
5434 2004-08-26 Paul Brook <paul@codesourcery.com>
5436 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5438 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5440 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5443 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5445 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5446 that pcrel correction is applied for R_386_PC32.
5448 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5450 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5451 for R_386_32 and R_386_PC32 relocs against symbols defined in
5454 2004-08-25 Dmitry Diky <diwil@spec.ru>
5456 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5457 Add new relocations.
5458 * bfd-in2.h: Regenerate.
5459 * libbfd.h: Regenerate.
5460 * elf32-msp430.c: Clean-up code.
5461 (elf_msp430_howto_table): Add new relocation entries.
5462 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5463 (msp430_elf_relax_section): New function.
5464 (msp430_elf_relax_delete_bytes): New function.
5465 (msp430_elf_symbol_address_p): New function.
5467 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5469 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5470 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5472 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5474 * elflink.c (_bfd_elf_section_already_linked): Handle
5475 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5477 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5479 * config.bfd (arm*-*-symbianelf*): New target.
5480 (arm*-*-eabi*): Likewise.
5482 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5484 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5485 "struct ppc_link_hash_entry *".
5486 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5487 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5489 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5491 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5492 entries (where fd_aux overlaps next entry's fd_func).
5493 Add non_overlapping argument, use it.
5494 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5495 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5496 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5497 as indexes into opd_sym_map/opd_adjust array.
5498 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5500 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5502 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5503 if we can look up their function descriptor in a regular file.
5505 2004-08-18 Nick Clifton <nickc@redhat.com>
5508 * cofflink.c (coff_link_add_symbols): Check that the comdat
5509 pointer in the coff_section_data structure has been initialised
5512 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5515 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5516 changing bfd_link_hash_undefined to bfd_link_hash_new.
5518 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5520 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5522 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5523 (synthetic_opd, synthetic_relocatable): New variables.
5524 (compare_symbols, compare_relocs): New helper routines.
5525 (ppc64_elf_get_synthetic_symtab): New function.
5526 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5528 * bfd-in2.h: Regenerated.
5529 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5530 to relsyms. Return 0 if abfd is relocatable.
5532 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5534 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5536 2004-08-17 Nick Clifton <nickc@redhat.com>
5538 * (is_arm_mapping_symbol_name): New function - return true
5539 when a symbol name matches the requirements for an ARM mapping
5541 (arm_elf_find_function): New function based on
5542 elf_find_function in elf.c but skipping ARM mapping symbols
5543 and including thumb function symbols.
5544 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5545 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5547 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5549 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5550 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5551 (ppc64_elf_brtaken_reloc): Here too.
5553 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5555 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5557 (ppc64_elf_check_directives): Check that we have the right hash
5558 table before proceeding.
5560 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5562 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5563 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5564 the sections that will be discarded.
5566 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5568 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5570 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5572 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5573 free space available.
5575 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5577 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5578 occurrences with bfd_byte * thoughout file.
5580 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5581 (xcoff_write_armap_big): Likewise.
5582 (xcoff_write_archive_contents_old): Likewise.
5583 (xcoff_write_archive_contents_big): Likewise.
5585 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5587 2004-08-13 Nick Clifton <nickc@redhat.com>
5589 * elf32-arm.h: Convert to ISO C90.
5591 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5594 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5597 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5599 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5600 (bfd_archive_filename, bfd_get_section_ident): Delete.
5601 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5602 bfd_archive_filename.
5603 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5604 to warn about symbols in discarded sections. Use _bfd_error_handler.
5605 * aout-adobe.c (aout_adobe_callback): See below.
5606 * aout-cris.c (swap_ext_reloc_in): ..
5607 * coff-arm.c (find_thumb_glue, find_arm_glue,
5608 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5609 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5610 coff_arm_copy_private_bfd_data): ..
5611 * coff-i860.c (i860_reloc_processing): ..
5612 * coff-mcore.c (mcore_coff_unsupported_reloc,
5613 coff_mcore_relocate_section): ..
5614 * coff-ppc.c (coff_ppc_relocate_section): ..
5615 * coff-rs6000.c (xcoff_create_csect_from_smclas
5616 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5617 sh_swap_insns, sh_relocate_section): ..
5618 * coff-tic54x.c (tic54x_reloc_processing): ..
5619 * coff-tic80.c (coff_tic80_relocate_section): ..
5620 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5621 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5622 coff_slurp_symbol_table, coff_classify_symbol,
5623 coff_slurp_reloc_table): ..
5624 * coffgen.c (_bfd_coff_read_string_table): ..
5625 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5626 _bfd_coff_generic_relocate_section): ..
5627 * cpu-arm.c (bfd_arm_merge_machines): ..
5628 * cpu-sh.c (sh_merge_bfd_arch): ..
5629 * elf-hppa.h (elf_hppa_relocate_section): ..
5630 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5631 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5632 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5633 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5634 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5635 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5636 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5637 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5638 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5639 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5640 cris_elf_merge_private_bfd_data
5641 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5642 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5643 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5644 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5645 elf32_hppa_relocate_section): ..
5646 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5647 i370_elf_check_relocs, i370_elf_relocate_section): ..
5648 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5649 elf_i386_relocate_section): ..
5650 * elf32-m32r.c (m32r_elf_relocate_section,
5651 m32r_elf_merge_private_bfd_data): ..
5652 * elf32-m68hc1x.c (m68hc12_add_stub,
5653 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5654 * elf32-m68k.c (elf_m68k_relocate_section): ..
5655 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5656 mcore_elf_relocate_section): ..
5657 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5658 ppc_elf_check_relocs, ppc_elf_relocate_section,
5659 ppc_elf_begin_write_processing): ..
5660 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5661 elf_s390_relocate_section): ..
5662 * elf32-sh-symbian.c (sh_symbian_import_as,
5663 sh_symbian_process_embedded_commands,
5664 sh_symbian_relocate_section): ..
5665 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5666 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5667 sh_elf_merge_private_data): ..
5668 * elf32-sparc.c (elf32_sparc_check_relocs,
5669 elf32_sparc_relocate_section,
5670 elf32_sparc_merge_private_bfd_data): ..
5671 * elf32-v850.c (v850_elf_check_relocs,
5672 v850_elf_merge_private_bfd_data): ..
5673 * elf32-xtensa.c (elf_xtensa_check_relocs,
5674 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5675 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5676 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5677 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5678 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5679 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5680 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5681 ppc64_elf_relocate_section): ..
5682 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5683 elf_s390_relocate_section): ..
5684 * elf64-sh64.c (sh_elf64_relocate_section): ..
5685 * elf64-sparc.c (sparc64_elf_check_relocs,
5686 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5687 sparc64_elf_merge_private_bfd_data): ..
5688 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5689 elf64_x86_64_relocate_section): ..
5690 * elflink.c (_bfd_elf_add_default_symbol,
5691 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5692 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5693 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5694 elf_get_linked_section_vma, elf_fixup_link_order,
5695 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5696 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5697 * elfxx-ia64.c (elfNN_ia64_relax_section,
5698 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5699 * elfxx-mips.c (mips_elf_perform_relocation,
5700 _bfd_mips_elf_check_relocs,
5701 _bfd_mips_elf_merge_private_bfd_data): ..
5702 * ieee.c (ieee_slurp_external_symbols): ..
5703 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5704 * libbfd.c (_bfd_generic_verify_endian_match): ..
5705 * linker.c (_bfd_generic_link_add_one_symbol,
5706 _bfd_generic_section_already_linked): ..
5707 * pdp11.c (translate_to_native_sym_flags): ..
5708 * pe-mips.c (coff_pe_mips_relocate_section): ..
5709 * peicode.h (pe_ILF_build_a_bfd): ..
5710 * srec.c (srec_bad_byte): ..
5711 * stabs.c (_bfd_link_section_stabs): ..
5712 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5713 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5714 with corresponding %B and %A in _bfd_error_handler format string.
5715 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5716 calls to use %A and %B. Fix "against symbol .. from section" and
5717 similar error messages. Combine multiple _bfd_error_handler calls
5718 where they were separated due to bfd_archive_filename deficiencies.
5719 * bfd-in2.h: Regenerate.
5721 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5723 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5726 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5728 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5729 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5730 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5732 (link_hash_newfunc): Init was_undefined.
5733 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5734 Use undefweak instead.
5735 (ppc64_elf_check_directives): Fix undefs chain.
5736 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5738 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5739 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5740 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5742 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5744 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5745 error, test input_section flags rather than sec.
5747 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5749 * elf-bfd.h (struct elf_backend_data): Add
5750 elf_backend_archive_symbol_lookup.
5751 (_bfd_elf_archive_symbol_lookup): Declare.
5752 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5753 (elf_link_add_archive_symbols): ..extracted from here. Call the
5755 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5756 (elfNN_bed): Init new field.
5757 * elf64-ppc.c (elf_backend_check_directives): Define.
5758 (elf_backend_archive_symbol_lookup): Define.
5759 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5760 a ppc_link_hash_entry pointer.
5762 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5763 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5764 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5765 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5766 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5767 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5768 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5771 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5773 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5774 (ppc64_elf_add_symbol_hook): Test for NULL section.
5775 (get_sym_h): Formatting.
5776 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5779 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5780 long branch stubs with code handling plt and r2off branch stubs.
5782 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5784 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5785 * elflink.c (elf_link_input_bfd): Formatting.
5786 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5788 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5789 (link_hash_newfunc): Don't set it.
5790 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5791 (ppc64_elf_mark_entry_syms): Delete.
5792 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5793 sections. Use get_opd_info.
5794 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5796 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5798 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5800 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5801 (func_desc_adjust): Don't set have_undefweak.
5802 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5803 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5805 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5806 "struct ppc_link_hash_entry *". Adjust all references.
5807 (ppc64_elf_hide_symbol): Correct a comment.
5809 * elf64-ppc.c (get_opd_info): New function.
5810 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5811 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5812 before calling get_fdh. Test fdh rather than h before dereferencing
5813 fdh. Mark removed symbols in opd_adjust.
5814 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5815 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5817 (ppc64_elf_output_symbol_hook): Likewise.
5819 2004-08-06 Paul Brook <paul@codesourcery.com>
5821 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5822 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5823 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5824 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5825 and BFD_RELOC_ARM_SBREL32.
5826 * bfd-in2.h, bbfd.h: Regenerate.
5828 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5830 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5831 the dynamic link symbol actually in use.
5833 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5835 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5837 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5838 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5840 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5841 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5843 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5844 Nick Clifton <nickc@redhat.com>
5847 * bfd.c (_bfd_default_error_handler): Make it global.
5849 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5851 * elf.c (assign_section_numbers): Cope gracefully with sections
5852 which have SHF_LINK_ORDER set but no sh_link set up.
5853 * elflink.c (elf_get_linked_section_vma): Likewise.
5855 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5858 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5859 Set it to _bfd_default_error_handler.
5860 (elfNN_bed): Add elf_backend_link_order_error_handler.
5862 * libbfd-in.h (_bfd_default_error_handler): New.
5864 * libbfd.h: Regenerated.
5866 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5868 * archures.c (bfd_mach_sparc_64bit_p): Define.
5869 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5870 * bfd-in2.h: Rebuilt.
5872 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5874 Introduce SH2a support.
5875 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5876 * archures.c (bfd_mach_sh2a_nofpu): New.
5877 * bfd-in2.h: Rebuilt.
5878 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5879 (arch_info_struct): Add sh2a_nofpu.
5880 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5881 2003-12-29 DJ Delorie <dj@redhat.com>
5882 * reloc.c: Add relocs for sh2a.
5883 * bfd-in2.h: Regenerate.
5884 * libbfd.hh: Regenerate.
5885 2003-12-01 Michael Snyder <msnyder@redhat.com>
5886 * archures.c (bfd_mach_sh2a): New.
5887 * bfd-in2.h: Rebuilt.
5888 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5890 (arch_info_struct): Add sh2a.
5891 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5893 2004-07-28 Nick Clifton <nickc@redhat.com>
5894 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5897 * som.c (setup_sections): Improve estimation of space sizes in
5898 relocatable objects.
5900 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5901 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5902 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5904 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5905 * configure: Regenerate.
5906 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5907 case that accepts OSABI=NetBSD and OSABI=SysV.
5908 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5909 the base of .got or .data (if .got does not exist).
5910 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5912 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5913 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5914 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5915 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5917 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5920 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5921 (elf_sec_group): Defined.
5922 (bfd_elf_match_symbols_in_sections): New prototype.
5923 (_bfd_elf_setup_group_pointers): Likewise.
5925 * elf.c (bfd_elf_discard_group): Abort.
5926 (bfd_elf_set_group_contents): Also include relocation sections.
5927 Remove zero-fill for ld -r.
5928 (_bfd_elf_setup_group_pointers): New function.
5929 (elf_sort_elf_symbol): Likewise.
5930 (elf_sym_name_compare): Likewise.
5931 (bfd_elf_match_symbols_in_sections): Likewise.
5933 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5935 * elflink.c (match_group_member): New.
5936 (elf_link_input_bfd): Check group member for discarded section.
5937 (try_match_symbols_in_sections): New function.
5938 (already_linked): Likewise.
5939 (_bfd_elf_section_already_linked): Support mixing comdat group
5940 and linkonce section.
5942 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5943 * linker.c (bfd_section_already_linked_table_traverse): New.
5945 * libbfd.h: Regenerated.
5947 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5949 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5950 BFD_RELOC_CRX_SWITCH32.
5951 * bfd-in2.h: Regenerate.
5952 * libbfd.h: Regenerate.
5953 * elf32-crx.c: Support relocation/relaxation of
5954 BFD_RELOC_CRX_SWITCH* types.
5956 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5958 * elf64-ppc.c: Correct "Linker stubs" comment.
5960 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5962 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5964 (elf_linked_to_section): New.
5966 * elf.c (assign_section_numbers): Set up sh_link for
5969 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5970 to sh_link for SHT_IA_64_UNWIND sections.
5972 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5974 * elflink.c (elf_fixup_link_order): Add _() to error message.
5976 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5978 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5981 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5983 * aout-adobe.c (aout_32_section_already_linked): Defined.
5984 * aout-target.h (MY_section_already_linked): Likewise.
5985 * aout-tic30.c (MY_section_already_linked): Likewise.
5986 * binary.c (binary_section_already_linked): Likewise.
5987 * bout.c (b_out_section_already_linked): Likewise.
5988 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5989 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5990 * coffcode.h (coff_section_already_linked): Likewise.
5991 * i386msdos.c (msdos_section_already_linked): Likewise.
5992 * i386os9k.c (os9k_section_already_linked): Likewise.
5993 * ieee.c (ieee_section_already_linked): Likewise.
5994 * ihex.c (ihex_section_already_linked): Likewise.
5995 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5996 * mmo.c (mmo_section_already_linked): Likewise.
5997 * nlm-target.h (nlm_section_already_linked): Likewise.
5998 * oasys.c (oasys_section_already_linked): Likewise.
5999 * pef.c (bfd_pef_section_already_linked): Likewise.
6000 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6001 * som.c (som_bfd_discard_group): Likewise.
6002 * srec.c (srec_section_already_linked): Likewise.
6003 * tekhex.c (tekhex_section_already_linked): Likewise.
6004 * versados.c (versados_section_already_linked): Likewise.
6005 * vms.c (vms_section_already_linked): Likewise.
6006 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6007 * xsym.c (bfd_sym_section_already_linked): Likewise.
6009 * bfd-in.h (bfd_section_already_linked_table_init): New.
6010 (bfd_section_already_linked_table_free): Likewise.
6012 * coff-rs6000.c (rs6000coff_vec): Add
6013 _bfd_generic_section_already_linked.
6014 (pmac_xcoff_vec): Likewise.
6015 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6016 (aix5coff64_vec): Likewise.
6018 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6019 * elflink.c (_bfd_elf_section_already_linked): New function.
6021 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6023 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6024 (_bfd_generic_section_already_linked): New.
6025 (bfd_section_already_linked_hash_entry): Likewise.
6026 (bfd_section_already_linked): Likewise.
6027 (bfd_section_already_linked_table_lookup): Likewise.
6028 (bfd_section_already_linked_table_insert): Likewise.
6030 * linker.c (bfd_section_already_linked): New.
6031 (_bfd_section_already_linked_table): Likewise.
6032 (bfd_section_already_linked_table_lookup): Likewise.
6033 (bfd_section_already_linked_table_insert): Likewise.
6034 (already_linked_newfunc): Likewise.
6035 (bfd_section_already_linked_table_init): Likewise.
6036 (bfd_section_already_linked_table_free): Likewise.
6037 (_bfd_generic_section_already_linked): Likewise.
6039 * section.c (bfd_section): Remove comdat.
6040 (bfd_comdat_info): Moved to ...
6041 * bfd-in.h (coff_comdat_info): Here.
6042 (bfd_coff_get_comdat_section): New.
6043 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6044 * libcoff-in.h (coff_section_tdata): Add comdat.
6045 * coffcode.h (handle_COMDAT): Updated.
6046 * cofflink.c (coff_link_add_symbols): Likewise.
6047 * ecoff.c (bfd_debug_section): Likewise.
6049 * targets.c (bfd_target): Add _section_already_linked.
6050 (BFD_JUMP_TABLE_LINK): Updated.
6052 * bfd-in2.h: Regenerated.
6053 * libbfd.h: Likewise.
6054 * libcoff.h: Likewise.
6056 2003-07-21 Paul Brook <paul@codesourcery.com>
6058 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6059 elf_fixup_link_order): New functions.
6060 (bfd_elf_final_link): Call elf_fixup_link_order.
6062 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
6064 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6065 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6067 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6068 _bfd_elf_symbol_refs_local_p.
6069 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6072 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6074 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6076 (bfd_elf_get_dyn_lib_class): New prototype.
6077 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6079 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6080 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6081 entry is needed. Issue an error if a DT_NEEDED entry is needed
6082 for a file marked DYN_NO_NEEDED.
6083 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6086 * bfd-in2.h: Regenerated.
6088 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6090 * elflink.c (elf_section_complain_discarded): Don't complain in
6093 2004-07-10 James E Wilson <wilson@specifixinc.com>
6095 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6096 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6097 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6098 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6100 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6101 bfd_put_64 to bfd_putl64.
6102 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6104 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6107 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6108 .init/.fini sections when trying to relax it.
6110 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6112 * elf.c (assign_file_positions_for_segments): Make sure the
6113 .dynamic section is the first section in the PT_DYNAMIC segment.
6115 2004-07-09 Nick Clifton <nickc@redhat.com>
6117 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6118 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6119 sh_elf_get_flags_from_mach functions so that they do not conflict
6120 when this target is built with other sh-elf targets.
6121 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6122 suppression of this function.
6123 (sh_elf_find_flags): Likewise.
6125 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6127 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6128 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6129 (BFD32_BACKENDS): Add elf32-crx.lo.
6130 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6131 (cpu-crx.lo): New target.
6132 (elf32-crx.lo): New target.
6133 * Makefile.in: Regenerate.
6134 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6135 (bfd_archures_list): Add bfd_crx_arch.
6136 * bfd-in2.h: Regenerate.
6137 * config.bfd: Handle crx-*-elf*, crx*.
6138 * configure.in: Handle bfd_elf32_crx_vec.
6139 * configure: Regenerate.
6140 * cpu-crx.c: New file.
6141 * elf32-crx.c: Likewise.
6142 * libbfd.h: Regenerate.
6143 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6144 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6145 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6146 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6147 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6148 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6149 * targets.c (bfd_elf32_crx_vec): Declare.
6150 (bfd_target_vector): Add bfd_elf32_crx_vec.
6152 2004-07-06 Nick Clifton <nickc@redhat.com>
6154 * config.bfd: Add sh-symbian-elf target.
6155 * configure.in: Add bfd_elf32_shl_symbian_vec.
6156 * configure: Regenerate.
6157 * elf-bfd.h (struct elf_backend_data): Add new field
6159 * elflink.c (elf_link_add_object_symbols): Invoke the
6160 check_directives function, if defined.
6161 * elfxx-target.h: Provide a default, NULL definition for
6163 * targets.c: Add bfd_elf32_shl_symbian_vec.
6164 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6166 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6167 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6168 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6169 not already been defined.
6170 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6171 * sh-symbian.c: New file. Provide functions to support the
6172 * sh-symbian-elf target.
6173 * Makefile.am: Add elf32-sh-symbian.c
6174 * Makefile.in: Regenerate.
6176 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6178 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6179 * Makefile.am: Ran make dep-am.
6180 * Makefile.in: Ran make dep-in.
6182 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6184 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6187 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6189 * config.bfd: Add want64 to configuration target s390-*-linux*.
6191 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6193 * bfd.c (bfd_get_section_ident): New.
6195 * elflink.c (elf_link_read_relocs_from_section): Call
6196 bfd_get_section_ident to identify the section when reporting
6198 (_bfd_elf_link_output_relocs): Likewise.
6199 (elf_link_output_extsym): Likewise.
6200 (elf_link_input_bfd): Likewise.
6201 (bfd_elf_gc_record_vtinherit): Likewise.
6203 * bfd-in2.h: Regenerated.
6205 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6206 Nick Clifton <nickc@redhat.com>
6209 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6210 of section symbols to mips_elf_sort_hash_table ().
6212 2004-07-01 Alan Modra <amodra@bigpond.net.au>
6214 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6216 (elf_section_complain_discarded): New function. Handle
6217 .gcc_except_table too.
6218 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6219 in discarded sections.
6220 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6222 2004-06-30 James E Wilson <wilson@specifixinc.com>
6224 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6225 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6227 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6230 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6231 local references to discarded sections and report their
6234 2004-06-30 Alan Modra <amodra@bigpond.net.au>
6236 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6237 sec_info_type, test section name instead.
6239 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6242 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6243 in .init/.fini sections.
6245 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6247 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6248 bfd_get_section_limit.
6250 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6252 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6253 output section size.
6255 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6257 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6259 (mmix_elf_perform_relocation): Adjust for above change.
6260 (mmix_elf_relocate_section): Likewise.
6261 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6262 (mmix_elf_get_section_contents): Delete.
6263 (bfd_elf64_get_section_contents): Delete.
6264 (mmix_elf_relocate_section): Zero stub area.
6265 * linker.c (default_indirect_link_order): Alloc max of section size
6267 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6268 * section.c (bfd_malloc_and_get_section): Likewise.
6269 (struct bfd_section): Update rawsize comment.
6270 * bfd-in2.h: Regenerate.
6272 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6274 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6276 * bfd-in.h (bfd_get_section_limit): Define.
6277 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6278 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6279 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6280 * coff-arm.c (coff_arm_relocate_section): Likewise.
6281 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6282 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6283 (bfd_ns32k_final_link_relocate): Likewise.
6284 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6285 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6286 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6287 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6288 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6289 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6290 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6291 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6292 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6293 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6294 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6295 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6296 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6297 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6298 * elf32-v850.c (v850_elf_reloc): Likewise.
6299 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6300 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6301 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6302 * elf64-mips.c (mips_elf64_gprel32_reloc)
6303 (mips16_gprel_reloc): Likewise.
6304 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6305 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6306 * elf64-sparc.c (init_insn_reloc): Likewise.
6307 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6308 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6309 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6310 (_bfd_mips_elf_generic_reloc): Likewise.
6311 * bfd-in2.h: Regenerate.
6313 2004-06-28 Alan Modra <amodra@bigpond.net.au>
6315 * bfd-in.h (struct stab_info): Move from stabs.c.
6316 * stabs.c (struct stab_link_includes_table): Delete.
6317 (stab_link_includes_lookup): Delete.
6318 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6319 level of indirection from sinfo parm.
6320 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6321 stabstr section. Adjust hash table accesses.
6322 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6323 alloc. Adjust stab_info test.
6324 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6325 (_bfd_coff_final_link): Adjust stab_info test.
6326 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6327 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6329 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6330 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6331 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6332 stabstr section. Adjust stab_info test.
6333 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6334 (_bfd_write_stab_strings): Adjust prototypes.
6335 * libbfd.h: Regenerate.
6336 * libcoff.h: Regenerate.
6337 * bfd-in2.h: Regenerate.
6339 2004-06-27 Mark Kettenis <kettenis@gnu.org>
6341 From Miod Vallat <miod@online.fr>:
6342 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6344 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
6346 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6347 (struct elf32_mn10300_link_hash_entry): Remove
6348 pcrel_relocs_copied.
6349 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6350 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6351 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6352 and gotoff relocations if the symbol doesn't bind locally. Use
6353 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6354 relocation for PCREL32.
6355 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6356 to test whether a symbol binds locally.
6357 (elf32_mn10300_link_hash_newfunc): Don't initialize
6358 pcrel_relocs_copied.
6359 (_bfd_mn10300_elf_discard_copies): Delete.
6360 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6362 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6364 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6366 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6368 * som.c (som_set_reloc_info): Correct small typo.
6370 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6372 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6373 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6374 (m32r_elf_gcsweep_hook): Likewise.
6375 (m32r_elf_check_relocs): Likewise.
6376 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6377 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6378 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6379 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6380 * bfd-in2.h: Regenerated.
6381 * libbfd.h: Regenerated.
6383 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6385 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6387 (elf64_x86_64_relocate_section): Issue an error for
6388 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6389 against global symbols when building shared library.
6391 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6393 * section.c (struct sec): Rename "_cooked_size" to "size".
6394 Rename "_raw_size" to "rawsize".
6395 (STD_SECTION): Adjust comments.
6396 (bfd_set_section_size, bfd_get_section_contents): Use size.
6397 (bfd_malloc_and_get_section): New function.
6398 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6399 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6400 Correctly free reloc and contents memory.
6401 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6402 and fake CIE now that we can shink section size to zero.
6403 (_bfd_elf_write_section_eh_frame): Likewise..
6404 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6405 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6406 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6407 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6408 unneeded indirection.
6409 * elf.c (_bfd_elf_section_offset): .. and update call.
6410 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6411 * libbfd.h: Regenerate.
6412 * bfd-in2.h: Regenerate.
6414 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6415 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6416 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6417 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6418 Similarly use "rawsize", if non-zero, in reloc functions to validate
6419 reloc addresses. Use new bfd_malloc_and_get_section in most places
6420 where bfd_get_section_contents was called. Expand all occurrences of
6421 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6422 grok_prstatus and similar functions to "size".
6423 * aix386-core.c (aix386_core_file_p): ..
6424 * aix5ppc-core.c (xcoff64_core_p): ..
6425 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6426 aout_adobe_set_section_contents): ..
6427 * aout-target.h (callback): ..
6428 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6429 MY_bfd_final_link): ..
6430 * aoutf1.h (sunos4_core_file_p): ..
6431 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6432 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6433 final_link, aout_link_input_section): ..
6434 * binary.c (binary_object_p, binary_canonicalize_symtab,
6435 binary_set_section_contents): ..
6436 * bout.c (b_out_callback, b_out_write_object_contents,
6437 b_out_set_section_contents, b_out_bfd_relax_section,
6438 b_out_bfd_get_relocated_section_contents): ..
6439 * cisco-core.c (cisco_core_file_validate): ..
6440 * coff-alpha.c (alpha_ecoff_object_p,
6441 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6442 * coff-arm.c (coff_arm_relocate_section,
6443 bfd_arm_allocate_interworking_sections): ..
6444 * coff-h8300.c (h8300_reloc16_extra_cases,
6445 h8300_bfd_link_add_symbols): ..
6446 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6447 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6448 ppc_bfd_coff_final_link): ..
6449 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6450 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6451 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6452 * coff64-rs6000.c (xcoff64_write_object_contents,
6453 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6454 * coffcode.h (coff_compute_section_file_positions,
6455 coff_write_object_contents): ..
6456 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6457 coff_section_symbol, build_debug_section): ..
6458 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6459 process_embedded_commands, _bfd_coff_link_input_bfd,
6460 _bfd_coff_write_global_sym): ..
6461 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6462 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6463 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6464 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6465 _bfd_dwarf2_find_nearest_line): ..
6466 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6467 ecoff_compute_section_file_positions,
6468 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6469 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6470 _bfd_elf_discard_section_eh_frame_hdr,
6471 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6472 _bfd_elf_write_section_eh_frame,
6473 _bfd_elf_write_section_eh_frame_hdr): ..
6474 * elf-hppa.h (elf_hppa_sort_unwind): ..
6475 * elf-m10200.c (mn10200_elf_relax_section,
6476 mn10200_elf_relax_delete_bytes,
6477 mn10200_elf_get_relocated_section_contents): ..
6478 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6479 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6480 mn10300_elf_relax_delete_bytes,
6481 mn10300_elf_get_relocated_section_contents,
6482 _bfd_mn10300_elf_adjust_dynamic_symbol,
6483 _bfd_mn10300_elf_discard_copies,
6484 _bfd_mn10300_elf_size_dynamic_sections,
6485 _bfd_mn10300_elf_finish_dynamic_sections): ..
6486 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6487 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6488 bfd_elf_set_group_contents, map_sections_to_segments,
6489 elf_sort_sections, assign_file_positions_for_segments,
6490 SECTION_SIZE, copy_private_bfd_data,
6491 _bfd_elf_get_dynamic_reloc_upper_bound,
6492 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6493 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6494 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6495 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6496 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6497 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6498 bfd_elf32_arm_process_before_allocation,
6499 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6500 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6501 elf32_arm_write_section): ..
6502 * elf32-cris.c (cris_elf_grok_prstatus,
6503 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6504 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6505 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6506 elf_cris_discard_excess_dso_dynamics,
6507 elf_cris_discard_excess_program_dynamics): ..
6508 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6509 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6510 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6511 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6512 elf32_frvfdpic_size_dynamic_sections,
6513 elf32_frvfdpic_modify_segment_map,
6514 elf32_frvfdpic_finish_dynamic_sections): ..
6515 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6516 elf32_h8_get_relocated_section_contents): ..
6517 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6518 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6519 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6520 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6521 elf32_hppa_finish_dynamic_sections): ..
6522 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6523 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6524 i370_elf_finish_dynamic_sections): ..
6525 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6526 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6527 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6528 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6529 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6530 * elf32-ip2k.c (ip2k_is_switch_table_128,
6531 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6532 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6533 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6534 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6535 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6536 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6537 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6538 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6539 m32r_elf_get_relocated_section_contents): ..
6540 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6541 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6542 m68hc11_elf_relax_delete_bytes): ..
6543 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6544 m68hc12_elf_size_one_stub): ..
6545 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6546 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6547 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6548 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6549 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6550 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6551 elf32_mips_grok_prstatus): ..
6552 * elf32-or32.c (or32_elf_consth_reloc): ..
6553 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6554 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6555 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6556 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6557 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6558 ppc_elf_final_write_processing): ..
6559 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6560 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6561 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6562 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6563 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6564 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6565 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6566 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6567 * elf32-sh64-com.c (sh64_address_in_cranges,
6568 sh64_get_contents_type): ..
6569 * elf32-sh64.c (sh64_find_section_for_address,
6570 sh64_elf_final_write_processing): ..
6571 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6572 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6573 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6574 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6575 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6576 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6577 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6578 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6579 elf_vax_finish_dynamic_sections): ..
6580 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6581 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6582 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6583 xstormy16_elf_finish_dynamic_sections): ..
6584 * elf32-xtensa.c (xtensa_read_table_entries,
6585 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6586 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6587 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6588 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6589 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6590 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6591 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6592 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6593 xtensa_callback_required_dependence): ..
6594 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6595 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6596 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6597 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6598 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6599 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6600 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6601 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6602 * elf64-hppa.c (allocate_dynrel_entries,
6603 elf64_hppa_size_dynamic_sections,
6604 elf64_hppa_finish_dynamic_sections): ..
6605 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6606 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6607 elf64_mips_grok_prstatus): ..
6608 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6609 mmix_elf_relocate_section, mmix_elf_final_link,
6610 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6611 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6612 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6613 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6614 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6615 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6616 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6617 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6618 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6619 ppc64_elf_finish_dynamic_sections): ..
6620 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6621 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6622 elf_s390_finish_dynamic_sections): ..
6623 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6624 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6625 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6626 sh64_elf64_finish_dynamic_sections): ..
6627 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6628 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6629 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6630 sparc64_elf_finish_dynamic_symbol,
6631 sparc64_elf_finish_dynamic_sections): ..
6632 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6633 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6634 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6635 elf64_x86_64_finish_dynamic_sections): ..
6636 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6637 * elfcode.h (elf_slurp_reloc_table): ..
6638 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6639 elf_finalize_dynstr, elf_link_add_object_symbols,
6640 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6641 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6642 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6643 elf32_mips_grok_prstatus): ..
6644 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6645 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6646 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6647 elfNN_ia64_finish_dynamic_sections): ..
6648 * elfxx-mips.c (mips_elf_create_procedure_table,
6649 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6650 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6651 mips_elf_global_got_index, mips_elf_multi_got,
6652 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6653 mips_elf_allocate_dynamic_relocations,
6654 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6655 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6656 _bfd_mips_elf_always_size_sections,
6657 _bfd_mips_elf_size_dynamic_sections,
6658 _bfd_mips_elf_finish_dynamic_symbol,
6659 _bfd_mips_elf_finish_dynamic_sections,
6660 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6661 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6662 _bfd_elf_mips_get_relocated_section_contents,
6663 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6664 * hp300hpux.c (callback): ..
6665 * hppabsd-core.c (make_bfd_asection): ..
6666 * hpux-core.c (make_bfd_asection): ..
6667 * i386linux.c (linux_link_create_dynamic_sections,
6668 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6669 * i386msdos.c (msdos_write_object_contents): ..
6670 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6671 os9k_set_section_contents): ..
6672 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6673 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6674 ieee_write_section_part, do_with_relocs, do_as_repeat,
6675 do_without_relocs, ieee_write_debug_part, init_for_output,
6676 ieee_set_section_contents): ..
6677 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6678 * irix-core.c (do_sections, make_bfd_asection): ..
6679 * libaout.h (aout_section_merge_with_text_p): ..
6680 * libbfd.c (_bfd_generic_get_section_contents,
6681 _bfd_generic_get_section_contents_in_window): ..
6682 * linker.c (default_indirect_link_order): ..
6683 * lynx-core.c (make_bfd_asection): ..
6684 * m68klinux.c (linux_link_create_dynamic_sections,
6685 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6686 * mach-o.c (bfd_mach_o_make_bfd_section,
6687 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6688 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6689 bfd_mach_o_scan_read_segment): ..
6690 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6691 _bfd_merge_sections): ..
6692 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6693 mmo_map_set_sizes, mmo_canonicalize_symtab,
6694 mmo_internal_write_section, mmo_write_object_contents): ..
6695 * netbsd-core.c (netbsd_core_file_p): ..
6696 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6697 nlm_alpha_set_public_section): ..
6698 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6699 * nlm32-sparc.c (nlm_sparc_write_import): ..
6700 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6701 nlm_compute_section_file_positions): ..
6702 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6703 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6704 * opncls.c (get_debug_link_info): ..
6705 * osf-core.c (make_bfd_asection): ..
6706 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6707 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6708 final_link, aout_link_input_section): ..
6709 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6710 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6711 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6712 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6713 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6714 * ptrace-core.c (ptrace_unix_core_file_p): ..
6715 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6716 _bfd_final_link_relocate, bfd_generic_relax_section,
6717 bfd_generic_get_relocated_section_contents): ..
6718 * reloc16.c (bfd_coff_reloc16_relax_section,
6719 bfd_coff_reloc16_get_relocated_section_c): ..
6720 * riscix.c (riscix_some_aout_object_p): ..
6721 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6722 * sco5-core.c (make_bfd_asection): ..
6723 * simple.c (bfd_simple_get_relocated_section_contents): ..
6724 * som.c (som_object_setup, setup_sections, som_prep_headers,
6725 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6726 som_set_reloc_info, som_get_section_contents,
6727 som_bfd_link_split_section): ..
6728 * sparclinux.c (linux_link_create_dynamic_sections,
6729 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6730 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6731 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6732 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6733 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6734 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6735 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6736 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6737 sunos_finish_dynamic_link): ..
6738 * syms.c (_bfd_stab_section_find_nearest_line): ..
6739 * tekhex.c (first_phase, tekhex_set_section_contents,
6740 tekhex_write_object_contents): ..
6741 * trad-core.c (trad_unix_core_file_p): ..
6742 * versados.c (process_esd, process_otr, process_otr): ..
6743 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6744 * vms-misc.c (add_new_contents): ..
6745 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6746 * vms.c (vms_set_section_contents): ..
6747 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6748 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6749 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6750 * xsym.c (bfd_sym_scan): .. See above.
6752 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6754 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6755 calling _bfd_merged_section_offset only for section symbols.
6757 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6759 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6760 for handling SEC_MERGE symbols in relax_section.
6762 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6764 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6765 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6766 linked together. Mark the result as h8300sx code.
6768 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6770 * elf-bfd.h (struct elf_backend_data): Added
6771 elf_backend_omit_section_dynsym.
6772 (_bfd_elf_link_omit_section_dynsym): Declare.
6773 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6774 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6775 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6776 (_bfd_elf_link_renumber_dynsyms): ... this function.
6777 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6778 _bfd_elf_link_omit_section_dynsym).
6779 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6781 2004-06-21 Nick Clifton <nickc@redhat.com>
6783 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6786 2004-06-17 Jerome Guitton <guitton@gnat.com>
6788 * bfd-in.h (bfd_cache_close_all): New function declaration.
6789 * bfd-in2.h: Regenerate.
6790 * cache.c (bfd_cache_close_all): New function definition.
6792 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6794 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6796 * configure: Regenerate.
6798 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6800 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6801 the pre-existing section.
6803 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6805 * section.c (struct sec): Remove usused flags. Reorganize a little.
6806 (bfd_get_section_size_before_reloc): Delete.
6807 (bfd_get_section_size_after_reloc): Delete.
6808 (STD_SECTION): Update.
6809 (bfd_get_section_size_now): Delete.
6810 (bfd_set_section_contents): Don't referece reloc_done.
6811 (bfd_get_section_contents): Remove reloc_done comment.
6812 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6814 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6815 * ecoff.c (bfd_debug_section): Update initializer.
6816 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6817 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6818 * bfd-in.h (bfd_section_size): Expand.
6819 (bfd_get_section_size): New macro.
6820 * bfd-in2.h: Regenerate.
6821 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6822 bfd_get_section_size_before_reloc with bfd_get_section_size.
6823 * coffcode.h (coff_write_object_contents): Likewise.
6824 * coffgen.c (build_debug_section): Likewise.
6825 * dwarf1.c (parse_line_table): Likewise.
6826 (_bfd_dwarf1_find_nearest_line): Likewise.
6827 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6828 * i386msdos.c (msdos_write_object_contents): Likewise.
6829 * pdp11.c (squirt_out_relocs): Likewise.
6830 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6831 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6833 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6835 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6836 removal) with updated comment.
6837 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6839 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6840 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6842 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6844 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6845 overflow on branches to undefweaks.
6847 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6849 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6850 as ecoff_section_data() does not return a valid lvalue.
6852 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6854 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6855 (elf_link_add_object_symbols): Likewise.
6857 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6858 (elf_backend_reloc_type_class): New.
6860 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6862 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6864 * configure: Regenerate.
6866 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6868 From: Albert Chin-A-Young <china@thewrittenword.com>
6869 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6872 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6874 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6877 2004-05-28 DJ Delorie <dj@redhat.com>
6879 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6880 for linking, but otherwise adjust reloc for merged sections.
6882 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6884 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6885 _bfd_merged_section_offset for local symbols.
6887 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6889 * Makefile.am: Regenerate dependencies.
6890 * Makefile.in: Regenerate.
6891 * archures.c: Add bfd_mach_sh3_nommu .
6892 * bfd-in2.h: Regenerate.
6893 * cpu-sh.c: Add sh3-nommu architecture.
6894 (bfd_to_arch_table): Create new table.
6895 (sh_get_arch_from_bfd_mach): Create new function.
6896 (sh_get_arch_up_from_bfd_mach): Create new function.
6897 (sh_merge_bfd_arch): Create new function.
6898 * elf32-sh.c (sh_ef_bfd_table): Add table.
6899 (sh_elf_check_relocs): Replace switch statement with
6900 use of sh_ef_bfd_table .
6901 (sh_elf_get_flags_from_mach): Add new function.
6902 (sh_find_elf_flags): Likewise.
6903 (sh_elf_copy_private_data): Replace most of non-elf contents
6904 with a call to sh_merge_bfd_arch() .
6906 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6908 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6909 * Makefile.in: Regenerate.
6911 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6913 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6914 custom calling conventions for dynamic symbols.
6915 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6916 symbol if it's an alias to a global one.
6918 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6920 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6923 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6925 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6928 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6930 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6931 for SHT_GROUP sections.
6933 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6935 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6937 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6938 * merge.c: Formatting. Remove unnecessary casts. Expand
6939 bfd_get_section_alignment macro.
6940 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6941 use throughout file.
6942 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6943 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6944 section name to determine sinfo group, instead test output section
6946 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6947 _bfd_strip_section_from_output rather than just twiddling flags.
6948 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6949 (_bfd_merge_sections): Update prototype.
6950 * libbfd.h: Regenerate.
6952 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6954 * netbsd-core.c: Correctly indent section that sets architecture
6957 From Miod Vallat <miod@online.fr>:
6958 * m88kopenbsd.c: New file.
6959 * targets.c (m88k_openbsd_vec): New.
6960 * config.bfd: Add m88k-*-openbsd*.
6961 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6962 (m88kopenbsd_vec): New.
6963 * configure: Regenerate.
6964 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6965 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6967 * Makefile.in: Regenerate.
6968 * po/SRC-POTFILES.in: Regenerate.
6970 2004-05-24 Nick Clifton <nickc@redhat.com>
6972 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6973 introduced by hash table size patch.
6975 2004-05-22 Ben Elliston <bje@au.ibm.com>
6977 * configure.in (is_release): Remove.
6978 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6979 (AC_OUTPUT): Don't output bfdver.h from version.h.
6980 * configure: Regenerate.
6981 * Makefile.am (RELEASE): New variable.
6982 (bfdver.h): New target.
6983 * Makefile.in: Regenerate.
6984 * doc/Makefile.in: Likewise.
6986 2004-05-22 Ben Elliston <bje@au.ibm.com>
6988 * Makefile.am (config.status): Don't depend on version.h.
6989 * Makefile.in: Regenerate.
6991 2004-05-22 Alan Modra <amodra@bigpond.net.au>
6993 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6994 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6995 * libbfd.h: Regenerate.
6996 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6997 (_bfd_elf_rel_local_sym): Likewise.
6998 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6999 (elf_link_input_bfd): Likewise.
7000 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7001 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7002 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7003 (elfNN_ia64_relocate_section): Likewise.
7005 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
7007 * hash.c (bfd_default_hash_table_size): New variable.
7008 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7009 (bfd_hash_set_default_size): New function. Set the default size
7010 to a selected prime number close to the argument. Document new
7012 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7013 * bfd-in2.h: Regenerate.
7014 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7015 * Makefile.in: Regenerate.
7017 2004-05-21 Mark Kettenis <kettenis@gnu.org>
7019 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7020 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7021 arm, m68k, m88k and hppa core files.
7023 2004-05-21 Nick Clifton <nickc@redhat.com>
7025 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7026 (bfd_bwrite): Likewise.
7027 (bfd_tell): Likewise.
7028 (bfd_flush): Likewise.
7029 (bfd_stat): Likewise.
7030 (bfd_seek): Likewise.
7031 (bfd_get_mtime): Likewise.
7032 (bfd_get_size): Likewise.
7034 2004-05-19 Ben Elliston <bje@au.ibm.com>
7036 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7038 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7040 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7041 (bfd_generic_openr_next_archived_file): Likewise.
7043 2004-05-17 Bob Wilson <bob.wilson@acm.org>
7045 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7046 section names by inserting a new substring after .gnu.linkonce, except
7047 for .gnu.linkonce.t.* where the "t." is replaced.
7049 2004-05-17 Adam Nemet <anemet@lnxw.com>
7051 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7052 (m68-*-lynxos* case): Likewise.
7053 (powerpc-*-lyxnos* case): New case.
7054 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7056 2004-05-17 David Heine <dlheine@tensilica.com>
7058 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7059 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7060 * bfd.c (bfd_copy_private_header_data): Define.
7061 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7063 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7064 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7065 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7066 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7067 segments by calling copy_private_bfd_data.
7068 (_bfd_elf_copy_private_header_data): Define.
7069 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7070 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7071 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7072 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7073 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7074 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7075 * som.c (som_bfd_copy_private_header_data): Define.
7076 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7077 * vms.c (vms_bfd_copy_private_header_data): Define.
7078 * bfd-in2.h: Regenerate.
7079 * libbfd.h: Regenerate.
7081 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7083 * elfxx-mips.c (MINUS_TWO): Define.
7084 (mips_elf_higher, mips_elf_highest,
7085 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7086 some bfd_vma values.
7087 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7089 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7091 * som.c (log2): Rename to exact_log2. Adjust all callers.
7093 2004-05-13 Paul Brook <paul@codesourcery.com>
7095 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7096 dwarf3 format CIE entries. Remove comment about the size of the
7097 ra_column field. It is now correctly deduced.
7099 2004-05-13 Joel Sherrill <joel@oarcorp.com>
7101 * config.bfd (or32-*-rtems*): Switch to elf.
7103 2004-05-13 Nick Clifton <nickc@redhat.com>
7105 * po/fr.po: Updated French translation.
7107 2004-05-11 Jakub Jelinek <jakub@redhat.com>
7109 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7110 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7111 Adjust counting of last_local.
7112 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7113 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7114 created by the linker nor !SHF_ALLOC.
7116 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7117 DT_PLTGOT to the start of the .got.plt section instead of the
7118 .got output section. Set sh_entsize for .got section in addition
7120 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7121 is at sgot->output_section->vma.
7122 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7123 DT_PLTGOT to the start of the .got.plt section instead of the
7124 .got output section.
7125 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7126 is at sgot->output_section->vma. Set sh_entsize for .got section
7127 in addition to .got.plt.
7128 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7129 (bfd_section_from_phdr): Likewise.
7130 (map_sections_to_segments): Likewise.
7131 (assign_file_positions_for_segments): Likewise.
7132 (get_program_header_size): Likewise.
7133 * elflink.c (bfd_elf_size_dynamic_sections): Set
7134 elf_tdata (output_bfd)->relro from info->relro.
7135 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7137 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
7139 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7140 a zero symndx for which we hadn't accounted a dynamic relocation.
7141 (_frvfdpic_add_rofixup): Likewise.
7143 2004-05-07 Brian Ford <ford@vss.fsi.com>
7144 DJ Delorie <dj@redhat.com>
7146 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7147 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7148 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7149 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7151 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
7153 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7154 immediately if there's no link info.
7155 (elf32_frvfdpic_copy_private_bfd_data): New.
7156 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7158 2004-05-06 Zack Weinberg <zack@codesourcery.com>
7160 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7161 filename argument is null; do not call strlen on a null pointer.
7163 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
7165 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7168 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
7170 * configure.in (bfd_elf32_frvfdpic_vec): New.
7171 * configure: Rebuilt.
7172 * targets.c (bfd_elf32_frvfdpic_vec): New.
7173 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7175 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7176 frvfdpic instead of frv. Rearrange elf-target macros such that
7177 the FDPIC-specific ones are only defined for this new target
7179 (bfd_elf32_frvfdpic_vec): Declare.
7181 (elf32_frv_relocate_section): Use it to enable segment checking
7182 and to control rofixup emission. Add output section vma to
7183 applied relocation in non-LOAD non-ALLOC sections. Use
7184 _bfd_error_handler for errors.
7185 (_frv_create_got_section): Create .rel.got and .rofixup only in
7186 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7188 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7189 (elf32_frvfdpic_modify_segment_map): Likewise.
7190 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7191 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7192 error message if we miscompute the rofixup size.
7193 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7194 (frvfdpic_elf_encode_eh_address): Likewise.
7195 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7196 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7197 relocs. Reject unknown relocation types.
7198 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7199 (frv_elf_merge_private_bfd_data): Likewise.
7200 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7201 0x4000 for newly-added elf32-frvfdpic.
7203 2004-05-05 Nick Clifton <nickc@redhat.com>
7206 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7207 returning NULL as most users of this function do not check its
7209 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7210 of bfd_cache_lookup().
7211 * sco5-core.c (sco5_core_file_p): Likewise.
7212 * trad-core.c (trad_unix_core_file_p): Likewise.
7214 2004-05-05 Nick Clifton <nickc@redhat.com>
7216 * cache.c (bfd_cache_lookup): Improve formatting.
7217 * archive.c: Fix formatting.
7219 2004-05-05 Peter Barada <peter@the-baradas.com>
7221 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7222 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7223 * bfd-in2.h(bfd_architecture): Regenerate.
7225 2004-05-03 Alan Modra <amodra@bigpond.net.au>
7227 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7229 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7230 those against discarded link-once and SEC_MERGE section symbols.
7232 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7234 * section.c (bfd_get_section_by_name_if): New.
7235 * bfd-in2.h: Regenerated.
7237 2004-05-02 Alan Modra <amodra@bigpond.net.au>
7239 * som.c (som_bfd_is_group_section): Define.
7241 2004-05-01 Alan Modra <amodra@bigpond.net.au>
7243 * section.c (bfd_make_section_anyway): Copy the whole
7244 bfd_hash_entry, not just "next" from existing entry.
7246 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7248 * elf.c (bfd_section_from_shdr): Maintain the section order in
7250 (special_sections): Add ".note.GNU-stack".
7251 (elf_fake_sections): Handle section group for relocatable
7254 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7256 * section.c (bfd_sections_find_if): New.
7257 * bfd-in2.h: Regenerated.
7259 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7261 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7263 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7264 * elf.c (bfd_elf_is_group_section): New function.
7265 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7266 * section.c (bfd_generic_is_group_section): New function.
7267 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7268 (BFD_JUMP_TABLE_LINK): Adjust.
7269 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7270 * aout-target.h (MY_bfd_is_group_section): Define.
7271 * aout-tic30.c (MY_bfd_is_group_section): Define.
7272 * bfd.c (bfd_is_group_section): Define.
7273 * binary.c (binary_bfd_is_group_section): Define.
7274 * bout.c (b_out_bfd_is_group_section): Define.
7275 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7276 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7277 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7278 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7279 * coffcode.h (coff_bfd_is_group_section): Define.
7280 * i386msdos.c (msdos_bfd_is_group_section): Define.
7281 * i386os9k.c (os9k_bfd_is_group_section): Define.
7282 * ieee.c (ieee_bfd_is_group_section): Define.
7283 * ihex.c (ihex_bfd_is_group_section): Define.
7284 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7285 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7286 * mmo.c (mmo_bfd_is_group_section): Define.
7287 * nlm-target.h (nlm_bfd_is_group_section): Define.
7288 * oasys.c (oasys_bfd_is_group_section): Define.
7289 * pef.c (bfd_pef_bfd_is_group_section): Define.
7290 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7291 * srec.c (srec_bfd_is_group_section): Define.
7292 * tekhex.c (tekhex_bfd_is_group_section): Define.
7293 * versados.c (versados_bfd_is_group_section): Define.
7294 * vms.c (vms_bfd_is_group_section): Define.
7295 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7296 * bfd-in2.h: Regenerate.
7297 * libbfd.h: Regenerate.
7299 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7301 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7303 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
7305 * configure.in: Update version to 2.15.91.
7306 * configure: Regenerate.
7308 2004-04-29 Brian Ford <ford@vss.fsi.com>
7310 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7311 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7312 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7313 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7314 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7315 .gnu.linkonce.wi. sections.
7316 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7317 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7319 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7320 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7322 2004-04-28 Chris Demetriou <cgd@broadcom.com>
7324 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7325 * bfd-in2.h: Regenerate.
7326 * libbfd.h: Likewise.
7328 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7330 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7332 (setup_sections): Use som_subspace_dictionary_record struct instead
7333 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7334 is_comdat, is_common or dup_common.
7335 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7336 is_comdat, is_common and dup_common in section subspace_dict from
7338 (som_begin_writing): Use som_subspace_dictionary_record struct.
7339 (som_finish_writing): Likewise.
7340 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7341 is_common and dup_common flags in info for symbol. Add comment
7342 regarding linker support for these fields. Slightly reorganize
7344 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7345 dup_common fields in symbol table from symbol info.
7346 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7347 arguments. Set corresponding fields in copy_data. Change all callers.
7348 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7350 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7351 * som.h (som_subspace_dictionary_record): Define.
7352 (som_copyable_section_data_struct): Add is_comdat, is_common and
7354 (som_section_data_struct): Use som_subspace_dictionary_record struct
7355 instead of subspace_dictionary_record.
7356 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7358 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7360 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7361 if set. Check reloc_done flag before applying relocations. Use
7362 output addresses, both when applying relocations and when comparing
7363 against the specified section.
7364 (elf_xtensa_relocate_section): Use output address to check if dynamic
7365 reloc is in a literal pool. Set section's reloc_done flag.
7367 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7369 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7370 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7372 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7375 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7377 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7378 structure field removed in 2004-04-24 patch.
7379 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7381 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7383 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7384 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7385 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7386 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7387 field before calling elf_backend_section_flags.
7389 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7391 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7392 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7393 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7394 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7395 and BFD_RELOC_32_PCREL.
7396 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7397 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7398 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7399 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7400 (mips_elf_next_relocation): Move comment about matching HI/LO
7402 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7403 R_MIPS_GNU_REL_HI16.
7405 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7407 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7408 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7409 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7410 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7411 and update comments to reflect current usage.
7412 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7413 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7415 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7416 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7417 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7418 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7419 type number to be MIPS_R_PCREL16.
7420 (mips_relocate_section): Remove support for link-time relaxation
7421 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7422 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7423 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7424 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7425 relaxation of branches used by embedded-PIC.
7426 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7427 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7428 related members, update comment.
7429 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7430 code related to embedded-PIC.
7431 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7432 initialization of now-removed 'adjust' member of
7433 'struct ecoff_debug_info'.
7435 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7437 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7439 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7441 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7442 relocs for locally defined symbols during -shared final link.
7443 (elf32_arm_final_link_relocate): Likewise.
7445 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7447 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7448 ELF_LINK_POINTER_EQUALITY_NEEDED.
7449 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7450 if r_type is not R_X86_64_PC32.
7451 (elf64_x86_64_finish_dynamic_symbol): If
7452 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7455 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7457 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7458 (elf_backend_plt_sym_val): Define.
7460 2004-04-22 Andrew Cagney <cagney@redhat.com>
7462 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7464 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7466 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7468 * som.c (som_set_section_contents): Constantify second argument.
7469 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7470 (som_object_setup): Rework to avoid warning.
7471 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7474 2004-04-22 Andrew Cagney <cagney@redhat.com>
7476 * cache.c (bfd_cache_close): Check for a previously closed file.
7478 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7480 * bfd.c (bfd_get_synthetic_symtab): Define.
7481 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7482 NAME##_get_synthetic_symtab.
7483 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7484 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7485 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7487 (_bfd_elf_get_synthetic_symtab): New prototype.
7488 * elfcode.h (elf_get_synthetic_symtab): Define.
7489 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7490 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7491 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7492 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7493 * bfd-in2.h: Rebuilt.
7494 * libbfd.h: Rebuilt.
7495 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7496 (elf_backend_plt_sym_val): Define.
7497 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7498 (elf_backend_plt_sym_val): Define.
7499 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7500 (elf_backend_plt_sym_val): Define.
7501 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7502 (elf_backend_plt_sym_val): Define.
7503 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7504 (elf_backend_plt_sym_val): Define.
7505 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7506 (elf_backend_plt_sym_val): Define.
7507 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7508 (elf_backend_plt_sym_val): Define.
7509 * aout-target.h (MY_get_synthetic_symtab): Define.
7510 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7511 * coff-rs6000.c (rs6000coff_vec): Add
7512 _bfd_nodynamic_get_synthetic_symtab.
7513 (pmac_xcoff_vec): Likewise.
7514 * coff64-rs6000.c (rs6000coff64_vec): Add
7515 _bfd_nodynamic_get_synthetic_symtab.
7516 (aix5coff64_vec): Likewise.
7517 * sunos.c (MY_get_synthetic_symtab): Define.
7518 * vms.c (vms_get_synthetic_symtab): Define.
7520 2004-04-22 Nick Clifton <nickc@redhat.com>
7522 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7524 2004-04-22 Peter Barada <peter@the-baradas.com>
7526 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7527 * bfd2-in.h: Regenerate.
7528 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7530 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7532 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7533 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7534 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7535 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7536 * bfd-in2.h: Regenerate.
7538 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7540 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7541 require relocations against a weak symbol to reference the same
7542 symbol hash entry if not a final, static link.
7543 (get_cached_value, add_value_map): Add final_static_link argument.
7544 (remove_literals): Pass final_static_link argument as needed.
7546 2004-04-21 Andrew Cagney <cagney@redhat.com>
7548 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7549 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7550 (opncls_bwrite, opncls_bclose, opncls_bflush)
7551 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7552 bfd iovec that uses function callbacks.
7553 (bfd_close): Use the iovec's bclose.
7554 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7555 (cache_bclose, cache_bflush, cache_bstat)
7556 (cache_iovec): New functions and global variable, implement a
7557 cache "iovec", where applicable set bfd_error.
7558 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7559 * bfdio.c (struct bfd_iovec): Define.
7560 (real_read): Delete function.
7561 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7562 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7563 assume that bread and bwrite set bfd_error.
7564 * bfd.c (struct bfd): Add "iovec", update comments.
7565 * bfd-in2.h, libbfd.h: Re-generate.
7567 2004-04-21 Andrew Cagney <cagney@redhat.com>
7569 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7571 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7573 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7574 (bfd_elf_gc_sections): Fail if a shared object is being created.
7575 Do not fail if dynamic sections have been created. Instead call
7576 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7577 dynamically referenced symbols. Do not mark the whole graph
7578 rooted at .eh_frame, only the section proper.
7580 2004-04-20 DJ Delorie <dj@redhat.com>
7582 * reloc.c: Add BFD_RELOC_32_SECREL.
7583 * bfd-in2.h: Regenerate.
7584 * libbfd.h: Likewise.
7585 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7586 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7587 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7589 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7591 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7592 relocs against hidden/protected undefweak symbols properly.
7593 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7595 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7597 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7598 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7601 2004-04-17 Brian Ford <ford@vss.fsi.com>
7603 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7604 filepos for the SizeOfHeaders field.
7605 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7607 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7609 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7611 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7612 change reloc_done. Set and restore _cooked_size.
7615 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7617 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7620 2004-04-15 Nick Clifton <nickc@redhat.com>
7622 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7624 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7626 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7628 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7630 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7631 when it is a definition.
7633 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7635 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7636 when statically linking PIC code.
7637 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7639 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7641 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7642 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7643 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7644 * configure: Regenerate.
7646 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7648 * elflink.c: Include libiberty.h.
7649 * Makefile.am (elflink.lo): Depend on libiberty.h.
7650 * Makefile.in: Regenerate.
7652 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7654 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7657 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7659 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7660 reserve the memory for dynamic linker
7662 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7664 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7665 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7667 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7669 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7670 RELOC_FOR_GLOBAL_SYMBOL.
7671 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7673 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7675 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7676 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7678 2004-04-01 Paul Brook <paul@codesourcery.com>
7680 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7681 * elf32-arm.h (struct elf32_elf_section_map): New.
7682 (struct _arm_elf_section_data): New.
7683 (elf32_arm_section_data): Define.
7684 (struct elf32_arm_link_hash_table): Add byteswap_code.
7685 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7686 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7687 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7688 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7689 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7690 (bfd_elf32_new_section_hook, elf_backend_write_section,
7691 elf_backend_link_output_symbol_hook): Define.
7693 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7695 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7696 that keeps the characters in a B_INCL..B_EINCL range.
7697 (_bfd_link_section_stabs): When computing the sum of the
7698 characters in a B_INCL..B_EINCL range also keep a copy of those
7699 characters. Use this information to distinguish between
7700 include sections that have the same sum and the same length
7701 but which are nevertheless unique.
7703 2004-03-31 Paul Brook <paul@codesourcery.com>
7705 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7706 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7708 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7710 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7711 to 'sum_chars' and add field 'num_chars'.
7712 (_bfd_link_section_stabs): When computing the sum of the
7713 characters in a B_INCL..B_EINCL range also keep a count of the
7714 number of characters. Use this information to help distinguish
7715 between include sections when have the same sum but which
7716 nevertheless are still unique.
7718 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7720 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7722 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7723 Tomer Levi <Tomer.Levi@nsc.com>
7725 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7726 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7727 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7728 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7729 (cpu-cr16c.lo): New target.
7730 (elf32-cr16c.lo): Likewise.
7731 * Makefile.in: Regenerate.
7732 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7733 (bfd_archures_list): Add bfd_cr16c_arch.
7734 * config.bfd: Handle cr16c-*-elf*.
7735 * configure.in: Handle bfd_elf32_cr16c_vec.
7736 * configure: Regenerate.
7737 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7738 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7739 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7740 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7741 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7742 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7743 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7744 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7745 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7746 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7747 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7748 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7749 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7750 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7751 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7752 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7753 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7754 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7755 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7756 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7757 * targets.c (bfd_elf32_cr16c_vec): Declare.
7758 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7759 * cpu-cr16c.c: New file.
7760 * elf32-cr16c.c: Likewise.
7761 * libbfd.h: Regenerate.
7762 * bfd-in2.h: Likewise.
7764 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7766 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7768 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7770 * Makefile.am: Remove all mention of elflink.h.
7771 * Makefile.in: Regenerate.
7772 * bfd-in.h (bfd_elf_discard_info): Declare.
7773 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7774 * bfd-in2.h: Regenerate.
7775 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7776 bfd_elf32_link_record_dynamic_symbol,
7777 bfd_elf64_link_record_dynamic_symbol,
7778 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7779 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7780 _bfd_elf32_link_record_local_dynamic_symbol,
7781 _bfd_elf64_link_record_local_dynamic_symbol,
7782 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7783 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7784 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7785 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7786 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7787 _bfd_elf32_reloc_symbol_deleted_p,
7788 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7789 (bfd_elf_link_record_dynamic_symbol,
7790 bfd_elf_link_record_local_dynamic_symbol,
7791 bfd_elf_final_link, bfd_elf_gc_sections,
7792 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7793 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7794 bfd_elf_reloc_symbol_deleted_p): Declare.
7795 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7796 * elf32-arm.h: Update for changed function names. Remove local
7797 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7798 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7799 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7800 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7801 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7802 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7803 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7804 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7805 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7806 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7807 (bfd_elfNN_print_symbol): Define.
7808 * elfcode.h: Don't include elflink.h.
7809 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7810 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7811 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7812 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7813 elf_link_record_local_dynamic_symbol): Don't define.
7814 * elflink.c: Update for changed function names. Move elflink.h
7816 * elflink.h: Delete file.
7817 * po/SRC-POTFILES.in: Regenerate.
7818 * po/bfd.pot: Regenerate.
7820 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7822 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7823 "name" for global syms accidentally removed in 2004-03-20 change.
7825 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7827 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7828 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7829 where Elf_External_* is different for 64 and 32 bit, with
7830 corresponding elf_size_info field.
7831 (struct elf_final_link_info): Use "bfd_byte *" instead
7832 of "Elf_External_Sym *" for external_syms and symbuf.
7833 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7834 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7835 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7836 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7837 (elf_link_sort_cmp2): Adjust.
7838 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7839 using ELF_R_SYM macro. Set u.sym_mask.
7840 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7841 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7842 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7843 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7844 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7845 swap_syn_out functions. Rearrange dyn swap in/out switch.
7846 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7847 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7848 (elf_link_flush_output_syms): Add elf_backend_data arg.
7849 (elf_link_check_versioned_symbol): Likewise.
7850 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7851 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7852 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7853 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7854 ELF_R_TYPE and ELF_R_INFO macros.
7855 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7856 based on size rather than using ELF_R_INFO.
7857 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7859 (struct alloc_got_off_arg): New.
7860 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7861 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7862 (elf_gc_allocate_got_offsets): Adjust.
7863 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7864 ELF_R_SYM. Use bfd_section_from_elf_index.
7865 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7866 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7867 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7869 2004-03-26 Stan Shebs <shebs@apple.com>
7871 Remove MPW support, no longer used.
7872 * config.bfd (powerpc-*-mpw*): Remove configuration.
7873 * mpw-config.in, mpw-make.sed: Remove files.
7874 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7876 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7878 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7879 (ppc64_elf_add_symbol_hook): New function.
7880 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7881 const from Elf_Internal_Sym param.
7882 * elflink.c (elf_link_add_object_symbols): Adjust.
7883 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7884 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7885 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7886 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7887 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7888 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7889 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7890 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7891 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7892 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7893 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7894 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7895 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7896 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7897 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7898 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7900 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7902 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7903 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7904 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7905 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7906 (bfd_elf64_bfd_link_add_symbols): Delete.
7907 (bfd_elf_link_add_symbols): Declare.
7908 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7909 * elflink.c: Include safe-ctype.h.
7910 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7912 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7913 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7915 (elf_link_add_archive_symbols): Rename from
7916 _bfd_elf_link_add_archive_symbols, make static.
7917 (elf_link_add_object_symbols): New function. Corresponding
7918 elflink.h function converted to use elf_size_info.
7919 (bfd_elf_link_add_symbols): Likewise.
7920 (bfd_elf_size_dynamic_sections): Adjust.
7921 * elflink.h (elf_bfd_link_add_symbols): Delete.
7922 (elf_link_add_object_symbols): Delete.
7923 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7924 bfd_elf_link_add_symbols.
7925 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7927 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7929 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7930 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7932 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7933 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7934 (_bfd_elf_add_dt_needed_tag): Declare.
7935 (_bfd_elf_sort_symbol): Declare.
7936 (_bfd_elf_finalize_dynstr): Declare.
7937 (RELOC_FOR_GLOBAL_SYM): Formatting.
7938 * elfcode.h (elf_add_dynamic_entry): Delete.
7939 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7940 elflink.h function converted to use elf_size_info.
7941 (_bfd_elf_add_dt_needed_tag): Likewise.
7942 (_bfd_elf_sort_symbol): Likewise.
7943 (_bfd_elf_finalize_dynstr): Likewise.
7944 (compute_bucket_count): Likewise.
7945 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7946 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7947 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7948 * elflink.h: ..here.
7949 (sort_symbol, add_dt_needed_tag): Delete.
7950 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7951 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7953 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7954 * elf32-cris.c (add_dynamic_entry): Likewise.
7955 * elf32-hppa.c (add_dynamic_entry): Likewise.
7956 * elf32-i370.c (add_dynamic_entry): Likewise.
7957 * elf32-i386.c (add_dynamic_entry): Likewise.
7958 * elf32-m32r.c (add_dynamic_entry): Likewise.
7959 * elf32-m68k.c (add_dynamic_entry): Likewise.
7960 * elf32-ppc.c (add_dynamic_entry): Likewise.
7961 * elf32-s390.c (add_dynamic_entry): Likewise.
7962 * elf32-sh.c (add_dynamic_entry): Likewise.
7963 * elf32-sparc.c (add_dynamic_entry): Likewise.
7964 * elf32-vax.c (add_dynamic_entry): Likewise.
7965 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7966 * elf64-alpha.c (add_dynamic_entry): Likewise.
7967 * elf64-hppa.c (add_dynamic_entry): Likewise.
7968 * elf64-ppc.c (add_dynamic_entry): Likewise.
7969 * elf64-s390.c (add_dynamic_entry): Likewise.
7970 * elf64-sparc.c (add_dynamic_entry): Likewise.
7971 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7972 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7973 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7974 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7975 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7976 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7978 2004-03-23 Paul Brook <paul@codesourcery.com>
7980 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7982 2004-03-22 Bob Wilson <bob.wilson@acm.org>
7984 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7985 literal tables and check for relocs outside of literal pools.
7986 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7987 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7989 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7990 (elf_xtensa_relocate_section): Read literal tables and check for
7991 dynamic relocations in read-only sections and not in literal pools.
7993 2004-03-23 Alan Modra <amodra@bigpond.net.au>
7996 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7998 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
8000 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8001 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8002 not defined by the executable, or defined in a DSO.
8003 <eliding run-time relocation of .got>: Initialize GOT entry for a
8004 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8006 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8007 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8008 a PLT reloc to GOT for an executable.
8009 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8010 .got for a DSO and explain why.
8011 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8012 and unreferenced symbols for which a PLT is defined. Adjust
8013 dynamic-symbol pruning correspondingly, to make sure we don't lose
8014 a dynamic symbol also defined by a DSO.
8016 2004-03-22 Alan Modra <amodra@bigpond.net.au>
8018 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8019 and rel args. Group input and output args. Wrap to 80 columns.
8020 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8021 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8022 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8023 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8024 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8025 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8026 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8027 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8028 RELOC_FOR_GLOBAL_SYMBOL invocation.
8030 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8032 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8033 unresolved symbols in objects aren't allowed.
8035 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8037 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8038 (elf_hppa_unmark_useless_dynamic_symbols):
8039 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8040 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8041 (elf32_hppa_relocate_section): Likewise.
8042 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8043 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8044 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8045 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8046 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8048 * elf-m10200.c (mn10200_elf_relocate_section): Use
8049 RELOC_FOR_GLOBAL_SYMBOL.
8050 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8051 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8052 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8053 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8054 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8055 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8056 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8057 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8058 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8059 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8060 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8061 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8063 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8065 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8066 (final_link_relocate): Likewise.
8067 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8068 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8070 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8072 * Makefile.am: Run "make dep-am".
8073 * Makefile.in: Regenerate.
8074 * aclocal.m4: Regenerate.
8075 * config.in: Regenerate.
8076 * po/bfd.pot: Regenerate.
8078 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8079 H.J. Lu <hongjiu.lu@intel.com>
8081 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8082 type and size change code to where it was previously. Remove
8083 dt_needed param. Treat old weak syms as strong if new sym is
8084 from a shared lib, even when old sym is from another shared
8085 lib. Remove unnecessary tests of oldweak and newweak. Correct
8087 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8088 _bfd_elf_merge_symbol calls.
8089 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8090 dt_needed local var. Update comments.
8091 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8092 (_bfd_elf_add_default_symbol): Likewise.
8094 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8095 strong syms in one shared object overriding weak syms in another.
8097 2004-03-18 Alan Modra <amodra@bigpond.net.au>
8099 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8100 dyn_lib_class field. Rearrange for better packing.
8101 (elf_dt_soname): Delete.
8102 (elf_dyn_lib_class): Define.
8103 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8104 (bfd_elf_set_dt_needed_soname): Delete.
8105 (bfd_elf_set_dyn_lib_class): New function.
8106 * elflink.h (add_dt_needed_tag): New function. Split out from..
8107 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8108 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8109 initialization of soname.
8110 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8112 * bfd-in.h (enum dynamic_lib_link_class): New.
8113 (bfd_elf_set_dt_needed_soname): Delete.
8114 (bfd_elf_set_dyn_lib_class): Declare.
8115 * bfd-in2.h: Regenerate.
8117 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8118 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8119 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8120 symbol loop. Instead use add_needed to flag tag as written.
8122 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8124 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8125 logic for null_input_bfd detection.
8127 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8129 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8131 2004-03-16 Mark Kettenis <kettenis@gnu.org>
8133 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8136 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8138 * elflink.c (elf_link_read_relocs_from_section): Don't use
8139 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8140 (_bfd_elf_link_read_relocs): ..to here.
8141 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8143 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8145 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8146 values selected in configure.host. Require both to be defined
8147 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8148 corresponding BFD_HOST vars with quotes.
8149 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8150 Always require BFD_HOST_64_BIT_DEFINED.
8151 <file_ptr type>: Find off_t size before emitting message. Combine
8152 off_t and ftello64 conditional.
8153 * configure: Regenerate.
8155 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8157 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8158 aliasing warning. Remove trailing whitespace throughout file.
8160 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8162 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8163 input_section in calls to get_dyn_name.
8164 * 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
8166 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8168 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8170 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8171 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8172 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8173 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8174 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8175 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8176 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8178 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8179 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8180 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8181 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8182 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8183 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8184 (read_8_bytes, read_indirect_string, read_address): Likewise.
8185 (read_abbrevs, parse_comp_unit): Likewise.
8186 * targets.c (struct bfd_target): Likewise.
8187 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8188 * hppabsd-core.c: Likewise. Formatting.
8189 * hpux-core.c: Likewise.
8190 * irix-core.c: Likewise.
8191 * netbsd-core.c: Likewise.
8192 * osf-core.c: Likewise.
8193 * ptrace-core.c: Likewise.
8194 * sco5-core.c: Likewise.
8195 * trad-core.c: Likewise.
8196 * configure: Regenerate.
8197 * bfd-in2.h: Regenerate.
8199 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8201 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8202 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8203 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8204 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8205 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8206 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8207 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8208 * libbfd.c: Likewise in function definitions.
8209 (bfd_put_8): Mask with 0xff rather than casting to char.
8210 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8211 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8212 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8213 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8214 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8215 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8216 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8217 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8218 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8219 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8220 * archive.c (do_slurp_coff_armap): Update swap prototype.
8221 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8222 (tic54x_getl_signed_32): Likewise.
8223 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8224 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8225 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8226 (bfd_getp_signed_32, bfd_putp32): Likewise.
8227 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8228 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8229 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8230 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8231 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8232 bfd_h_getx_signed_16, bfd_h_putx16.
8233 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8234 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8235 * hpux-core.c: Likewise.
8236 * irix-core.c: Likewise.
8237 * netbsd-core.c: Likewise.
8238 * osf-core.c: Likewise.
8239 * ptrace-core.c: Likewise.
8240 * sco5-core.c: Likewise.
8241 * trad-core.c: Likewise.
8242 * bfd-in2.h: Regenerate.
8244 2004-03-15 Matt Thomas <matt@3am-software.com>
8246 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8249 2004-03-13 Mark Kettenis <kettenis@gnu.org>
8251 * config.bfd: Add x86_64-*-openbsd*.
8252 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8254 * configure: Regenerate.
8256 2004-03-12 Nick Clifton <nickc@redhat.com>
8257 Dave Murphy <wintermute2k4@ntlworld.com>
8259 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8260 if the input bfd does not contain any code.
8262 2004-03-09 Steve Ellcey <sje@cup.hp.com>
8264 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8266 2004-03-05 Fred Fish <fnf@redhat.com>
8268 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8269 mips16 symbols to be even rather than testing first for even/odd.
8270 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8272 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8274 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8277 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
8279 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8280 undefined symbols as hash_new.
8282 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8284 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8286 * elf32-sh.c: Ditto.
8287 * bfd-in2.h: Regenerate.
8289 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
8291 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8293 (_frv_count_got_plt_entries): Initialize them.
8294 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8296 (frv_pic_relocs_info_for_global): Likewise.
8297 (frv_pic_relocs_info_for_local): Likewise.
8298 (frv_pic_merge_early_relocs_info): New.
8299 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8301 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8302 Check that we don't exceed the allocated count for entry.
8303 (_frv_add_rofixup): Likewise.
8304 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8305 (elf32_frv_finish_dynamic_sections): Improve error message in case
8306 we emit too few rofixup entries.
8308 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
8310 * archures.c (bfd_mach_fr450): New.
8311 * bfd-in2.h: Regenerate.
8312 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8313 (arch_info_500): Link to it.
8314 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8315 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8316 (frv_elf_arch_extension_p): New function.
8317 (frv_elf_merge_private_bfd_data): Use it.
8319 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8321 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8323 * elflink.h (is_global_data_symbol_definition): Moved to
8325 (elf_link_is_defined_archive_symbol): Likewise.
8326 (elf_link_add_archive_symbols): Likewise. Renamed to
8327 _bfd_elf_link_add_archive_symbols.
8329 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8330 of ELF symbol table entry from backend.
8331 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8332 instead of elf_link_add_object_symbols.
8334 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8336 * elf-bfd.h (struct elf_backend_data): Added
8337 elf_backend_can_make_relative_eh_frame,
8338 elf_backend_can_make_lsda_relative_eh_frame and
8339 elf_backend_encode_eh_address.
8340 (_bfd_elf_encode_eh_address): Declare.
8341 (_bfd_elf_can_make_relative): Declare.
8342 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8343 hooks to decide whether to attempt to make_relative and
8345 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8346 (_bfd_elf_can_make_relative): New.
8347 (_bfd_elf_encode_eh_address): New.
8348 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8349 (frv_elf_encode_eh_address): New.
8350 (elf_backend_can_make_relative_eh_frame): Define.
8351 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8352 (elf_backend_encode_eh_address): Define.
8354 (elf_backend_can_make_relative_eh_frame): Define.
8355 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8356 (elf_backend_encode_eh_address): Define.
8357 (elfNN_bed): Add them.
8359 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8361 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8362 complain_on_overflow to signed.
8364 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8366 * elflink.h (sort_symbol): New.
8367 (elf_link_add_object_symbols): Use a sorted symbol array for
8370 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8372 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8373 for pc relative relocs.
8374 (elf_s390_relocate_section): Likewise.
8375 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8376 for pc relative relocs.
8377 (elf_s390_relocate_section): Likewise.
8379 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8381 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8384 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8386 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8387 field to track if a relocation is against readonly section.
8388 (count_dyn_reloc): Take a new argument for rent->reltext.
8389 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8390 (get_reloc_section): Don't set ia64_info->reltext here.
8391 (allocate_dynrel_entries): Set ia64_info->reltext here.
8393 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8395 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8396 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8397 function's descriptor to symbol+offset, and map local undefweak
8398 symbol to NULL function descriptor.
8399 (elf32_frv_relocate_section): Likewise.
8401 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8403 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8405 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8406 (netbsd_core_file_p): Set architecture from machine ID for
8409 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8411 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8412 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8414 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8416 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8417 symbols with non-default visibility.
8419 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8421 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8422 IMAGE_SCN_MEM_WRITE on known sections only.
8424 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8426 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8427 symbols used in PIE relocs.
8429 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8431 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8434 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8436 * configure.in: Update version to 2.15.90.
8437 * configure: Regenerate.
8439 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8440 Richard Sandiford <rsandifo@redhat.com>
8442 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8443 _bfd_elf_symbol_refs_local_p to decide whether to decay
8444 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8445 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8446 relocs if the symbol wasn't defined by a regular object file.
8447 Don't check the symbol's dynindx.
8449 2004-02-16 Andrew Cagney <cagney@redhat.com>
8451 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8453 * bfd-in2.h: Re-generate.
8455 2004-02-14 Andrew Cagney <cagney@redhat.com>
8457 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8458 _LARGEFILE64_SOURCE.
8460 2004-02-13 Andrew Cagney <cagney@redhat.com>
8462 * elf.c (vma_page_aligned_bias): New function.
8463 (assign_file_positions_except_relocs)
8464 (assign_file_positions_for_segments): Replace broken modulo
8465 arithmetic with call to vma_page_aligned_bias.
8467 2004-02-11 Andrew Cagney <cagney@redhat.com>
8469 * bfd-in.h: Update copyright.
8470 (bfd_tell): Change return type to file_ptr.
8471 * bfd-in2.h: Re-generate.
8472 * cache.c: Update copyright.
8473 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8475 (close_one): Use real_ftell.
8476 * bfdio.c: Update copyright.
8477 (real_ftell, real_fseek): New functions.
8478 (bfd_tell): Use real_fseek and real_ftell, change return type to
8480 (bfd_seek): Use real_ftell and real_fseek, change type of
8481 file_position to a file_ptr.
8482 * libbfd-in.h: Update copyright.
8483 (real_ftell, real_fseek): Declare.
8484 * libbfd.h: Re-generate.
8486 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8487 fseeko and fseeko64. Determine bfd_file_ptr.
8488 * configure: Re-generate.
8489 * config.in: Re-generate.
8491 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8493 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8494 * elf32-h8300.c: Likewise.
8496 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8497 Nick Clifton <nickc@redhat.com>
8499 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8500 GOT entries with no associated GOT subsection.
8502 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8504 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8505 * elf.c (swap_out_syms): Use it to decide whether local section
8506 symbols should be named.
8507 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8508 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8509 (elf_backend_name_local_section_symbols): Define.
8510 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8512 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8514 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8515 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8518 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8520 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8521 to bfd_link_hash_entry passed by reference to
8522 _bfd_generic_link_add_one_symbol.
8524 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8526 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8527 relocations against dynamic symbols.
8529 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8531 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8534 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8536 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8537 * bfd-in2.h, libbfd.h: Rebuilt.
8539 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8541 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8542 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8543 flag has been cleared.
8545 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8547 * coff-h8300.c: Add and adjust comments about relaxation.
8548 * elf32-h8300.c: Likewise.
8550 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8552 * coff-h8300.c: Fix comment typos.
8553 * elf32-h8300.c: Likewise.
8555 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8557 * coff-h8300.c: Add comments about relaxation.
8558 * elf32-h8300.c: Likewise.
8560 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8562 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8564 * aclocal.m4: Regenerate.
8565 * configure: Regenerate.
8567 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8569 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8570 mips_elf64_rtype_to_howto instead of using howto_table.
8572 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8574 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8576 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8577 relocs which would not use the PLT.
8579 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8581 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8582 (ppc64_elf_gc_sweep_hook): Likewise.
8583 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8585 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8587 Adds linker relaxation support for bit manipulation insns like
8588 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8590 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8591 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8592 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8593 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8595 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8597 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8599 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8601 * elf32-h8300.c: Fix formatting.
8603 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8605 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8606 dynamic object is present. Declare r_symndx and h in an inner
8608 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8610 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8612 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8613 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8614 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8615 identically. Do not emit PC24 relocations for shared libraries.
8616 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8617 identically. Don't adjust pc_count.
8618 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8619 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8620 adjust count for branch relocations.
8621 (allocate_dynrelocs): Correct typo in call to
8622 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8623 PC24 or PLT32 relocs when linking.
8625 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8627 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8628 relocation howto with ARM_26 one for consistency.
8629 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8630 that will be converted to ARM_26D ones, since we always want 'done'
8631 relocations to be reflected in section's data.
8632 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8634 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8637 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8639 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8640 are not partial_inplace during a relocatable link.
8642 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8644 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8645 if no dynamic object is present. Declare r_symndx and h in an
8648 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8650 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8651 trampoline if it is known out of range.
8653 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8655 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8656 * elf32-frv.c (_frv_osec_readonly_p): New.
8657 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8659 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8660 (elf32_frv_relocate_section): Likewise. Error out if attempting
8661 to emit rofixups or dynamic relocs in read-only segments. Use
8662 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8663 dynamic relocations.
8664 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8665 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8666 relocations or fixups involving merged sections correctly. Avoid
8667 crash when undefined symbol is referenced by R_FRV_32 or
8668 R_FRV_FUNCDESC_VALUE.
8669 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8670 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8671 input section holding local symbol to addend of R_FRV_32 or
8672 R_FRV_FUNCDESC_VALUE dynamic relocation.
8673 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8674 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8675 (elf32_frv_always_size_sections): Don't store pointer to
8676 __stacksize symbol in sec_info.
8677 (elf32_frv_modify_segment_map): Look it up here.
8678 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8679 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8680 of the lazy PLT entry, not only its offset, as the low word of a
8681 function descriptor.
8682 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8683 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8684 if a hash table entry already exists but is not a definition.
8685 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8686 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8687 (_frv_add_rofixup): Don't inline.
8688 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8689 for undefweak symbols.
8690 (elf32_frv_relocate_section): Avoid crash while computing
8691 relocation when linking with shared library. Only emit rofixups
8692 and dynamic relocations for alloc&load sections. Mark binaries
8693 with inter-segment relocations for relocation as a unit.
8694 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8695 (DEFAULT_STACK_SIZE): New.
8696 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8697 emit rofixups or dynamic relocs when linking dynamic non-PIE
8699 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8700 shared libs too. Reserve the last entry for the GOT pointer.
8701 (elf32_frv_finish_dynamic_sections): Emit it.
8702 (elf32_frv_always_size_sections): New.
8703 (elf32_frv_modify_segment_map): New.
8704 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8706 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8707 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8708 (elf_backend_always_size_sections): New.
8709 (elf_backend_modify_segment_map): New.
8710 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8711 * config.bfd: Added frv-*-*linux*.
8712 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8713 ABS section, instead of crashing.
8714 (elf32_frv_relocate_section): Don't crash before warning about
8715 different segments in non-PIC relocation.
8716 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8717 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8718 relocs to undefweak symbols.
8719 (elf32_frv_relocate_section): Ditto for undefined symbols.
8720 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8721 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8722 gotfixup section was created.
8723 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8724 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8725 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8726 complain_overflow_signed.
8727 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8728 have not been allocated.
8729 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8730 privfd only if dynamic sections were created.
8731 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8732 for GPREL relocs. When linking relocatable FDPIC executables,
8733 emit warnings for relocations that would be illegal on PIE or
8734 shared libraries. Emit rofixup for R_FRV_32 only if input object
8736 (_frv_create_got_section): Define _gp symbol in the rofixup
8738 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8739 dynamic sections missing, error out requesting -melf32frvfd.
8740 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8741 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8742 computation of addends from section and global or local symbol
8743 value. Change return type to bfd_boolean, and return a failure if
8744 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8745 nonzero addend is required.
8746 (elf32_frv_relocate_section): Likewise. Print error for
8747 unsupported nonzero addends.
8748 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8749 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8750 force everything local.
8751 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8752 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8753 (frv_gotfixup_section): New.
8754 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8755 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8757 (_frv_add_rofixup): New.
8758 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8759 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8760 improve some ugly conditions.
8761 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8762 relocations in fdpic.
8763 (_frv_create_got_section): Create .rofixup.got section.
8764 (struct _frv_dynamic_got_info): Added fixups.
8765 (_frv_count_got_plt_entries): Account in-GOT relocations into
8766 relocs32, relocsfd and relocsfdv. Account them into relocs or
8767 fixups, as appropriate.
8768 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8770 (elf32_frv_finish_dynamic_sections): Verify that the right number
8771 of relocations and fixups was generated.
8772 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8774 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8775 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8776 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8777 descriptor of a (formerly-)global symbol is local.
8778 (struct frv_pic_relocs_info): Adjust comments.
8779 (_frv_emit_got_relocs_plt_entries): Adjust.
8780 (elf32_frv_relocate_section): Likewise.
8781 (_frv_count_got_plt_entries): Likewise.
8782 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8783 symbol's value to addend in the common preamble. Decay dynamic
8784 symbols to section+offset if they bind or call locally, for GOT
8785 and FUNCDESC_VALUE, respectively.
8786 (elf32_frv_relocate_section): Likewise.
8787 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8788 internal or hidden visibility.
8789 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8790 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8791 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8792 (elf32_frv_relocate_section): Pass relocation addend in. Use
8793 original relocation addend to look up the got relocs/plt entries
8794 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8795 processing relocations that reference .scommon symbols.
8796 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8797 Introduce support for dynamic linking.
8798 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8799 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8800 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8801 (frv_reloc_type_lookup): Return REL howtos for executables and
8803 (frv_info_to_howto_rel): New.
8804 (struct frv_elf_link_hash_table): New.
8805 (frv_hash_table, frv_got_section, frv_gotrel_section,
8806 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8807 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8808 (frv_elf_link_hash_table_create): New.
8809 (struct frv_pic_relocs_info): New.
8810 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8811 (frv_pic_relocs_info_find): New.
8812 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8814 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8815 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8816 (_frv_emit_got_relocs_plt_entries): New.
8817 (elf32_frv_relocate_section): Add support for dynamic linking.
8818 Handle new relocations.
8819 (_frv_create_got_section): New.
8820 (elf32_frv_create_dynamic_sections): New.
8821 (ELF_DYNAMIC_INTERPRETER): New.
8822 (struct _frv_dynamic_got_info): New.
8823 (_frv_count_got_plt_entries): New.
8824 (struct _frv_dynamic_got_plt_info): New.
8825 (_frv_compute_got_alloc_data): New.
8826 (_frv_get_got_entry, _frv_get_fd_entry): New.
8827 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8828 (_frv_resolve_final_relocs_info): New.
8829 (elf32_frv_size_dynamic_sections): New.
8830 (elf32_frv_finish_dynamic_sections): New.
8831 (elf32_frv_adjust_dynamic_symbol): New.
8832 (elf32_frv_finish_dynamic_symbol): New.
8833 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8835 (elf_info_to_howto_rel): Define.
8836 (bfd_elf32_bfd_link_hash_table_create): Define.
8837 (elf_backend_create_dynamic_sections): Define.
8838 (elf_backend_adjust_dynamic_symbol): Define.
8839 (elf_backend_size_dynamic_sections): Define.
8840 (elf_backend_finish_dynamic_symbol): Define.
8841 (elf_backend_finish_dynamic_sections): Define.
8842 (elf_backend_want_got_sym): Define.
8843 (elf_backend_got_header_size): Define.
8844 (elf_backend_want_got_plt): Define.
8845 (elf_backend_plt_readonly): Define.
8846 (elf_backend_want_plt_sym): Define.
8847 (elf_backend_plt_header_size): Define.
8848 (elf_backend_may_use_rel_p): Define.
8849 (elf_backend_may_use_rela_p): Define.
8850 (elf_backend_default_use_rela_p): Define.
8851 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8852 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8853 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8854 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8855 (frv_reloc_map): Map the corresponding BFD relocs to them.
8856 (frv_reloc_type_lookup): ... and back to BFD relocs.
8857 * reloc.c: New relocs.
8858 * bfd-in2.h, libbfd.h: Rebuilt.
8859 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8860 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8861 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8862 R_FRV_FUNCDESC_GOTLO): New.
8863 (frv_reloc_map): Map the corresponding BFD relocs to them.
8864 (frv_reloc_type_lookup): ... and back to BFD relocs.
8865 * reloc.c: New relocs.
8866 * bfd-in2.h, libbfd.h: Rebuilt.
8868 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8870 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8871 targets to support pages of up to 64kB.
8872 (elf32_bed): Redefine to get a separate backend data structure for
8873 traditional targets.
8874 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8875 targets to support pages of up to 64kB.
8876 (elf64_bed): Redefine to get a separate backend data structure for
8877 traditional targets.
8878 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8879 targets to support pages of up to 64kB.
8880 (elf32_bed): Redefine to get a separate backend data structure for
8881 traditional targets.
8883 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8885 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8887 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8889 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8890 (elf_i386_grok_psinfo): Likewise.
8892 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8894 * config.bfd: Add m68k-uClinux target.
8896 2004-01-01 Grant Edwards <grante@visi.com>
8898 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8899 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8900 (elf32_h8_gc_sweep_hook): New function.
8901 (elf_backend_gc_mark_hook): Define.
8902 (elf_backend_gc_sweep_hook): Define.
8903 (elf_backend_can_gc_sections): Define.
8905 For older changes see ChangeLog-0203
8911 version-control: never