1 2005-07-18 Nick Clifton <nickc@redhat.com>
3 * reloc.c: Add M32C and MS1 relocs.
4 * bfd-in2.h: Regenerate.
5 * libbfd.h: Regenerate.
7 2005-07-18 Nick Clifton <nickc@redhat.com>
9 * config.bfd: Move m32c entry to correct location.
10 * archures.c: Likewise.
11 * configure.in: Likewise.
12 * configure: Regenerate.
13 * targets.c: Move ms1 vector to correct location.
15 2005-07-18 Jan Beulich <jbeulich@novell.com>
17 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
19 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
20 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
22 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
26 * elflink.c (elf_link_add_object_symbols): Also append the version
27 name to non-hidden absolute symbols that are functions.
29 2005-07-16 Alan Modra <amodra@bigpond.net.au>
31 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
32 for zero size sections. Don't set .sbss syms here.
33 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
35 2005-07-16 Alan Modra <amodra@bigpond.net.au>
37 * Makefile.am: Run "make dep-am".
38 * Makefile.in: Regenerate.
40 2005-07-15 Bob Wilson <bob.wilson@acm.org>
42 * elf32-xtensa.c (vsprint_msg): Add prototype.
43 (build_encoding_error_message): Delete. Code moved into....
44 (elf_xtensa_do_reloc): ....here, and changed to give better
45 error messages for out of range literals.
47 2005-07-15 Alan Modra <amodra@bigpond.net.au>
49 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
50 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
51 defined in output sections. Call bfd_elf_record_link_assignment.
52 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
53 * bfd-in2.h: Regenerate.
55 2005-07-14 Jim Blandy <jimb@redhat.com>
57 Add support for m32c-*-elf (Renesas m32c and m16c).
58 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
59 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
60 (BFD32_BACKENDS): Add elf32-m32c.lo.
61 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
62 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
63 * Makefile.in: Regenerated.
64 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
66 (bfd_m32c_arch): New arch info object.
67 (bfd_archures_list): List bfd_m32c_arch.
68 * bfd-in2.h: Regenerated.
69 * config.bfd: Add case for the m32c.
70 * configure.in: Add case for the m32c.
71 * configure: Regenerated.
72 * cpu-m32c.c, elf32-m32c.c: New files.
73 * libbfd.h: Regenerated.
74 * targets.c (bfd_elf32_m32c_vec): Declare.
75 (_bfd_target_vector): List bfd_elf32_m32c_vec.
77 2005-07-14 Alan Modra <amodra@bigpond.net.au>
79 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
80 (_bfd_elf_provide_section_bound_symbols): Remove param name.
82 * bfd-in2.h: Regenerate.
83 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
84 (_bfd_elf_provide_symbol): Formatting.
85 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
86 create section relative syms.
87 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
88 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
89 _bfd_elf_provide_section_bound_symbols.
90 * reloc.c (bfd_mark_used_section): Delete.
91 (bfd_generic_gc_sections): Don't call the above.
93 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
96 * cache.c (bfd_last_cache): Initialise to NULL.
98 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
99 Nick Clifton <nickc@redhat.com>
101 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
102 Alpha binaries and issue a helpful error message.
103 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
104 symbol index to 15 to allow for binaries produced by DEC
107 2005-07-13 Steve Ellcey <sje@cup.hp.com>
109 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
111 2005-07-12 Alan Modra <amodra@bigpond.net.au>
113 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
116 2005-07-12 Alan Modra <amodra@bigpond.net.au>
118 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
120 2005-07-12 Alan Modra <amodra@bigpond.net.au>
122 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
124 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
126 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
129 2005-07-08 Paul Koning <pkoning@equallogic.com>
131 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
132 where addresses are sign extended.
134 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
136 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
137 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
138 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
139 sparc*-*-rtemsaout* as removed
141 2005-07-08 Alan Modra <amodra@bigpond.net.au>
143 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
144 of the usual sections are found.
145 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
146 Strip .dynbss if it is zero size.
147 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
148 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
149 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
150 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
152 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
153 when it is zero size.
154 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
155 of .dynbss and zero size sections.
156 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
158 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
159 .dynbss if zero size.
160 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
162 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
163 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
164 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
165 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
166 .plt.* and .got.plt.* if zero size.
167 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
168 .got* and .dynbss if zero size.
169 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
170 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
171 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
173 (create_got_section): Always create new .got and .rela.got sections.
174 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
175 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
176 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
177 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
178 dynamic bss sections correctly.
179 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
180 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
181 .dynbss if zero size.
183 2005-07-08 Ben Elliston <bje@au.ibm.com>
185 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
186 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
188 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
190 * elf-bfd.h (elf_backend_data): Add special_sections.
192 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
195 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
196 (elf_backend_special_sections): New. Defined.
197 * elf32-m32r.c: Likewise.
198 * elf32-m68hc11.c: Likewise.
199 * elf32-m68hc12.c: Likewise.
200 * elf32-mcore.c: Likewise.
201 * elf32-sh64.c: Likewise.
202 * elf32-v850.c: Likewise.
203 * elf32-xtensa.c: Likewise.
204 * elf64-alpha.c: Likewise.
205 * elf64-hppa.c: Likewise.
206 * elf64-ppc.c: Likewise.
207 * elf64-sh64.c: Likewise.
208 * elfxx-ia64.c: Likewise.
209 * elfxx-mips.c: Likewise.
210 * elfxx-mips.h: Likewise.
212 * elfxx-target.h (elf_backend_special_sections): New.
213 (elfNN_bed): Initialize special_sections.
215 2005-07-07 Bob Wilson <bob.wilson@acm.org>
217 * xtensa-modules.c: Update tables with Xtensa MMU features.
219 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
221 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
223 * vms.h (_bfd_vms_debug): Add format attribute.
224 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
226 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
229 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
230 symbol with default visibility is local.
232 2005-07-07 Ben Elliston <bje@gnu.org>
234 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
236 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
238 * dwarf2.c (varinfo): Add addr.
239 (lookup_symbol_in_variable_table): Also check addr.
240 (scan_unit_for_symbols): Set addr for variable.
241 (comp_unit_find_line): Updated.
243 2005-07-06 Nick Clifton <nickc@redhat.com>
245 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
246 message if an unknown reloc is encountered.
247 (alpha_relocate_section): Likewise.
249 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
250 with a missing howto field.
252 2005-07-06 Alan Modra <amodra@bigpond.net.au>
254 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
257 2005-07-05 Paul Brook <paul@codesourcery.com>
259 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
260 (ppc_elf_vxworks_get_sec_type_attr): New function.
261 (elf_backend_special_sections): Remove vxwords definition.
262 (elf_backend_get_sec_type_attr): Define for vxworks.
264 2005-07-05 Nick Clifton <nickc@redhat.com>
266 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
268 2005-07-05 Paul Brook <paul@codesourcery.com>
270 * config.bfd: Add separate case for ppc-vxworks.
271 * configure: Regenerate.
272 * configure.in: Include elf-vxworks.lo on ppc targets.
273 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
275 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
276 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
277 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
278 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
279 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
280 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
281 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
282 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
283 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
284 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
285 (ppc_elf_create_got): Create .got.plt for VxWorks.
286 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
288 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
289 (allocate_got): VxWorks does not need a got header.
290 (allocate_dynrelocs): Handle VxWorks plt format.
291 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
292 VxWorks. Handle VxWorks plt/got.
293 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
294 (ppc_elf_vxworks_special_sections): New.
295 (ppc_elf_vxworks_link_hash_table_create,
296 ppc_elf_vxworks_add_symbol_hook,
297 elf_i386_vxworks_link_output_symbol_hook,
298 ppc_elf_vxworks_final_write_processing): New functions.
299 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
300 (_bfd_target_vector): Use it.
302 2005-07-05 Jakub Jelinek <jakub@redhat.com>
304 * libbfd-in.h (struct artdata): Add extended_names_size field.
306 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
307 allocated object by bfd_zalloc.
308 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
309 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
310 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
311 (get_extended_arelt_filename): Fail if index is bigger or equal to
313 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
314 get_extended_arelt_filename already did that.
315 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
316 Allocate one extra byte and clear it, in case extended names table
319 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
320 bfd_zalloc2): New prototypes.
321 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
322 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
323 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
324 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
325 elf_map_symbols, map_sections_to_segments,
326 assign_file_positions_for_segments, copy_private_bfd_data,
327 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
329 * bfd-in2.h: Rebuilt.
332 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
333 verdef or verneed section.
334 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
335 verneed sections gracefully.
336 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
337 bogus relocation values.
338 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
339 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
340 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
341 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
342 * elfxx-ia64.c (lookup_howto): Likewise.
344 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
345 the end of strtab and clear it.
348 2005-07-05 Nick Clifton <nickc@redhat.com>
350 * po/vi.po: New Vietnamese translation.
351 * configure.in (ALL_LINGUAS): Add vi.
352 * configure: Regenerate.
354 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
356 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
357 touchup logic like i386/ppc.
359 2005-07-05 Alan Modra <amodra@bigpond.net.au>
361 * elf.c (special_sections): Move const qualifier.
362 (special_sections_b..special_sections_t): Likewise.
363 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
365 (elf32_arm_symbian_special_sections): Move const qualifier.
366 * elf32-m32r.c: Similarly.
367 * elf32-m68hc11.c: Similarly.
368 * elf32-m68hc12.c: Similarly.
369 * elf32-mcore.c: Similarly.
370 * elf32-ppc.c: Similarly.
371 * elf32-sh64.c: Similarly.
372 * elf32-v850.c: Similarly.
373 * elf32-xtensa.c: Similarly.
374 * elf64-alpha.c: Similarly.
375 * elf64-hppa.c: Similarly.
376 * elf64-ppc.c: Similarly.
377 * elf64-sh64.c: Similarly.
378 * elfxx-ia64.c: Similarly.
379 * elfxx-mips.c: Similarly.
381 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
383 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
384 info->executable instead of !info->shared where appropriate.
386 2005-07-04 Alan Modra <amodra@bigpond.net.au>
389 * elf.c (assign_file_positions_for_segments): Remove excluded
390 sections from the segment map.
392 2005-07-04 Alan Modra <amodra@bigpond.net.au>
395 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
397 (_bfd_elf_get_special_section): Declare.
398 (bfd_elf_special_section): Update prototype.
399 * elf.c (special_sections): Remove unused outer entries.
400 (get_special_section): Delete.
401 (_bfd_elf_get_special_section): New function.
402 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
403 special_sections indexing.
404 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
405 * elf32-arm.c (symbian_special_sections_d): Delete.
406 (symbian_special_sections_g, symbian_special_sections_h): Delete.
407 (symbian_special_sections_i, symbian_special_sections_f): Delete.
408 (symbian_special_sections_p): Delete.
409 (elf32_arm_symbian_special_sections): Merge above to here.
410 (elf32_arm_symbian_get_sec_type_attr): New function.
411 (elf_backend_special_sections): Don't define.
412 (elf_backend_get_sec_type_attr): Define.
413 * elf32-m32r.c: Similarly to elf32-arm.c.
414 * elf32-m68hc11.c: Likewise.
415 * elf32-m68hc12.c: Likewise.
416 * elf32-mcore.c: Likewise.
417 * elf32-sh64.c: Likewise.
418 * elf32-v850.c: Likewise.
419 * elf32-xtensa.c: Likewise.
420 * elf64-alpha.c: Likewise.
421 * elf64-hppa.c: Likewise.
422 * elf64-ppc.c: Likewise.
423 * elf64-sh64.c: Likewise.
424 * elfxx-ia64.c: Likewise.
425 * elfxx-mips.c: Likewise.
426 * elf32-ppc.c: Likewise.
427 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
428 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
429 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
430 (elf_backend_get_sec_type_attr): Define.
431 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
432 (elf_backend_special_sections): Don't define.
435 2005-07-01 Nick Clifton <nickc@redhat.com>
437 * cpu-d10v.c: Update to ISO C90 style function declarations and
439 * cpu-d30v.c: Likewsie.
440 * cpu-i370.c: Likewsie.
441 * cpu-xstormy16.c: Likewsie.
442 * elf32-arc.c: Likewsie.
443 * elf32-d10v.c: Likewsie.
444 * elf32-d30v.c: Likewsie.
445 * elf32-dlx.c: Likewsie.
446 * elf32-i370.c: Likewsie.
447 * elf32-i960.c: Likewsie.
448 * elf32-ip2k.c: Likewsie.
449 * elf32-m32r.c: Likewsie.
450 * elf32-mcore.c: Likewsie.
451 * elf32-openrisc.c: Likewsie.
452 * elf32-or32.c: Likewsie.
453 * elf32-pj.c: Likewsie.
454 * elf32-v850.c: Likewsie.
455 * elf32-xstormy16.c: Likewsie.
457 2005-07-01 Alan Modra <amodra@bigpond.net.au>
459 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
461 (elf64_alpha_create_dynamic_sections): Always make new sections
462 by using bfd_make_section_anyway_with_flags. Check that .got not
464 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
467 2005-06-30 Alan Modra <amodra@bigpond.net.au>
469 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
470 _SDA_BASE_ and _SDA2_BASE_ symbols.
471 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
472 sym if not def_regular.
473 (_bfd_elf_provide_section_bound_symbols): Similarly.
475 2005-06-30 Ben Elliston <bje@gnu.org>
477 * config.bfd: Mark as obsolete:
482 2005-06-29 Alan Modra <amodra@bigpond.net.au>
484 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
485 .eh_frame specially..
486 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
487 Don't recheck sections we have already marked.
488 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
489 * section.c (struct bfd_section): Add gc_mark_from_eh.
490 (STD_SECTION): Adjust.
491 * ecoff.c (bfd_debug_section): Adjust.
492 * bfd-in2.h: Regenerate.
494 2005-06-29 Alan Modra <amodra@bigpond.net.au>
496 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
497 not been processed by check_relocs.
499 2005-06-29 Paul Brook <paul@codesourcery.com>
501 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
502 * bfd-in2.h: Regenerate.
503 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
505 * elflink.c (bfd_elf_set_symbol): Add section argument.
506 (_bfd_elf_provide_symbol): Ditto.
507 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
509 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
511 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
513 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
514 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
515 (struct elf32_hppa_link_hash_table): Use etab and bstab.
516 (stub_hash_newfunc): Use hh.
517 (hppa_link_hash_newfunc): Use hsh_cache.
518 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
519 (elf32_hppa_link_hash_table_free): Use bstab.
520 (hppa_stub_name): Use eh.
521 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
522 (hppa_add_stub): Use bstab.
523 (hppa_type_of_stub): Use eh.
524 (hppa_build_one_stub): Use hh and bh_root.
525 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
526 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
527 (elf32_hppa_gc_sweep_hook): Use hdh_next.
528 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
529 (allocate_plt_static): Use etab.
530 (allocate_dynrelocs): Use etab, and hdh_next.
531 (readonly_dynrelocs): Use hdh_next.
532 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
533 (get_local_syms): Use eh, bstab, and hh.
534 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
535 (elf32_hppa_set_gp): Use etab.
536 (elf32_hppa_build_stubs): Use bstab.
537 (final_link_relocate): Use eh, bh_root.
538 (elf32_hppa_relocate_section): Use elf, etab.
539 (elf32_hppa_finish_dynamic_sections): Use etab.
541 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
543 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
546 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
548 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
549 (hppa_stub_hash_entry): Define.
550 (stub_hash_newfunc): Rename variables.
551 (hppa_link_hash_newfunc): Likewise.
552 (elf32_hppa_link_hash_table_free): Likewise.
553 (hppa_stub_name): Likewise.
554 (hppa_get_stub_entry): Likewise.
555 (hppa_add_stub): Likewise.
556 (hppa_type_of_stub): Likewise.
557 (hppa_build_one_stub): Likewise.
558 (hppa_size_one_stub): Likewise.
559 (elf32_hppa_create_dynamic_sections): Likewise.
560 (elf32_hppa_copy_indirect_symbol): Likewise.
561 (elf32_hppa_check_relocs): Likewise.
562 (elf32_hppa_gc_mark_hook): Likewise.
563 (elf32_hppa_gc_sweep_hook): Likewise.
564 (elf32_hppa_grok_psinfo): Likewise.
565 (elf32_hppa_hide_symbol): Likewise.
566 (elf32_hppa_adjust_dynamic_symbol): Likewise.
567 (allocate_dynrelocs): Likewise.
568 (clobber_millicode_symbols): Likewise.
569 (readonly_dynrelocs): Likewise.
570 (elf32_hppa_size_dynamic_sections): Likewise.
571 (get_local_syms): Likewise.
572 (elf32_hppa_size_stubs): Likewise.
573 (hppa_record_segment_addr): Likewise.
574 (final_link_relocate): Likewise.
575 (elf32_hppa_relocate_section): Likewise.
576 (elf32_hppa_finish_dynamic_symbol): Likewise.
578 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
581 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
583 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
584 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
585 * elf32-cris.c (cris_elf_check_relocs): Likewise.
586 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
587 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
588 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
589 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
590 * elf32-i370.c (i370_elf_check_relocs): Likewise.
591 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
592 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
593 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
594 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
595 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
596 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
597 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
598 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
599 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
600 * elf32-s390.c (elf_s390_check_relocs): Likewise.
601 * elf32-sh.c (sh_elf_check_relocs): Likewise.
602 * elf32-v850.c (v850_elf_check_relocs): Likewise.
603 * elf32-vax.c (elf_vax_check_relocs): Likewise.
604 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
605 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
606 * elf64-s390.c (elf_s390_check_relocs): Likewise.
607 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
608 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
609 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
611 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
614 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
617 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
621 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
623 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
625 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
626 BFD_RELOC_X86_64_GOTPC32.
627 * bfd-in2.h: Regenerated.
629 2005-06-17 Jakub Jelinek <jakub@redhat.com>
631 * elf.c (bfd_section_from_shdr): Kill bogus warning.
633 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
634 symbol, relocation, group or versym sections.
636 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
638 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
639 doesn't point into the section.
641 2005-06-17 Jan Beulich <jbeulich@novell.com>
643 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
644 and BFD_RELOC_X86_64_GOTPC32.
645 * libbfd.h (bfd_reloc_code_real_names): Likewise.
646 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
647 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
648 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
649 and R_X86_64_GOTPC32.
650 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
651 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
652 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
653 (elf64_x86_64_relocate_section): Likewise.
654 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
656 2005-06-15 Mark Kettenis <kettenis@gnu.org>
658 * archive.c: Include "libiberty.h".
660 2005-06-15 Nick Clifton <nickc@redhat.com>
662 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
663 produced by the GreenHills toolchain can be assimilated.
665 2005-06-14 Steve Ellcey <sje@cup.hp.com>
667 * som.c (som_find_inliner_info): New.
669 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
671 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
673 2005-06-14 Jakub Jelinek <jakub@redhat.com>
675 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
676 Prevent endless recursion on broken objects.
678 * archive.c (do_slurp_coff_armap): Check for overflows.
680 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
682 * elfcode.h (elf_write_relocs): Do nothing if there are no
685 2005-06-10 Alan Modra <amodra@bigpond.net.au>
687 * dwarf2.c (decode_line_info): Revert last change. Instead set
688 initial low_pc to -1 to avoid need to test whether loc_pc has
691 2005-06-09 Christopher Faylor <cgf@timesys.com>
693 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
694 either SEC_ALLOC OR SEC_LOAD.
696 2005-06-09 Christopher Faylor <cgf@timesys.com>
698 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
699 section header. Do not add STYP_NOLOAD since it does not appear to be
702 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
705 * dwarf2.c (lookup_address_in_line_info_table): Restore code
706 handling NULL function info, removed with 2005-04-03 change.
708 2005-06-08 Mark Mitchell <mark@codesourcery.com>
710 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
712 2005-06-09 Alan Modra <amodra@bigpond.net.au>
714 * elflink.c (elf_mark_used_section): Delete.
715 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
716 * reloc.c (bfd_mark_used_section): New function.
717 (bfd_generic_gc_sections): Call bfd_mark_used_section.
719 2005-06-08 Alan Modra <amodra@bigpond.net.au>
721 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
724 2005-06-07 Mark Mitchell <mark@codesourcery.com>
726 * opncls.c (bfd_fdopenr): Add missing break statements.
728 2005-06-07 Mark Mitchell <mark@codesourcery.com>
730 * opncls.c (bfd_fopen): New API.
732 (bfd_fdopenr): Likewise.
733 * bfd-in2.h: Regenerated.
735 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
736 Michael Snyder <msnyder@redhat.com>
737 Stan Cox <scox@redhat.com>
739 * Makefile.am (ALL_MACHINES): Add ms1 support.
740 (ALL_MACHINES_CFILES): Same.
741 (BFD32_BACKENDS): Same.
742 (BFD32_BACKENDS_CFILES): Same.
744 * Makefile.in: Regenerate.
746 * archures.c (bfd_architecture): Add ms1 entries.
747 Externalize bfd_ms1_arch.
748 (bfd_archures_list): Add bfd_ms1_arch.
750 * bfd-in2.h: Regenerate.
752 * cpu-ms1.c: New file.
754 * elf32-ms1.c: New file.
756 * targets.c: Define extern of bfd_elf32_ms1_vec.
757 Add bfd_elf32_ms1_vec to _bfd_target_vector.
759 * configure.in: Add bfd_elf32_ms1_vec case.
761 * configure: Regenerate.
763 * config.bfd: Add ms1-*-elf to table.
765 2005-06-07 Zack Weinberg <zack@codesourcery.com>
767 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
769 2005-06-07 Alan Modra <amodra@bigpond.net.au>
771 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
772 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
774 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
777 * bfd.c (bfd_find_line): New.
779 * dwarf2.c (comp_unit): Add variable_table.
780 (funcinfo): Add file, line, and sec.
782 (lookup_symbol_in_function_table): New.
783 (lookup_symbol_in_variable_table): New.
784 (scan_unit_for_functions): Renamed to ...
785 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
787 (comp_unit_find_nearest_line): Updated.
788 (comp_unit_find_line): New.
789 (_bfd_dwarf2_find_line): New.
791 * elf-bfd.h (_bfd_elf_find_line): New.
792 (_bfd_generic_find_line): New. Defined.
794 * elf.c (_bfd_elf_find_line): New.
796 * libbfd-in.h (_bfd_dwarf2_find_line): New.
797 (_bfd_generic_find_line): New.
799 * bfd-in2.h: Regenerated.
800 * libbfd.h: Likewise.
802 * libbfd.c (_bfd_generic_find_line): New.
804 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
805 with _bfd_generic_find_line.
806 (bfd_target): Add _bfd_find_line.
808 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
810 * dwarf2.c (decode_line_info): Properly set low_pc.
812 2005-06-06 Alan Modra <amodra@bigpond.net.au>
814 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
815 case, include addend when indexing .opd section map.
816 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
817 clear opd_adjust array if no_opd_opt set. Tidy code.
818 Ignore zero size .opd. Check bfd_alloc return value.
819 (ppc_stub_name): Return immediately on bfd_malloc fail.
820 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
822 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
824 * dwarf2.c (comp_unit): Fix a typo in comment.
826 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
828 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
829 (reloc_type_lookup): Dito.
830 (elf_vax_discard_copies): Dito.
831 (elf_vax_instantiate_got_entries): Dito.
832 (elf_vax_link_hash_traverse): Dito.
833 (elf_vax_link_hash_newfunc): Dito.
834 (elf_vax_link_hash_table_create): Dito.
835 (elf32_vax_set_private_flags): Dito.
836 (elf32_vax_merge_private_bfd_data): Dito.
837 (elf32_vax_print_private_bfd_data): Dito.
838 (elf_vax_check_relocs): Dito.
839 (elf_vax_gc_mark_hook): Dito.
840 (elf_vax_gc_sweep_hook): Dito.
841 (elf_vax_size_dynamic_sections): Dito.
842 (elf_vax_discard_copies): Dito.
843 (elf_vax_instantiate_got_entries): Dito.
844 (elf_vax_relocate_section): Dito.
845 (elf_vax_finish_dynamic_symbol): Dito.
846 (elf_vax_finish_dynamic_sections): Dito.
847 (elf_vax_hash_table): Break-up of line isn't needed.
848 (elf_vax_check_relocs): Remove leading whitespace
849 (elf_vax_relocate_section): Remove redundant whitespace
850 (elf_vax_link_hash_newfunc): Don't cast NULL.
851 (elf_vax_link_hash_table_create): Dito.
852 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
854 2005-06-03 Alan Modra <amodra@bigpond.net.au>
857 * configure.in: Bump version
858 * configure: Regenerate.
859 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
860 discarded section sym refs and kill linker output.
861 * simple.c (simple_dummy_einfo): New function.
862 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
864 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
867 2005-06-02 Alan Modra <amodra@bigpond.net.au>
869 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
870 restrictive of func code and func descr for undefined syms as well
873 2005-05-31 Jim Blandy <jimb@redhat.com>
875 * Makefile.am: Regenerate dependencies with 'make dep-am'.
876 * Makefile.in: Regenerate.
878 2005-05-31 Richard Henderson <rth@redhat.com>
880 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
881 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
882 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
883 (elf64_alpha_want_plt): Update to match.
884 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
885 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
887 2005-05-31 Zack Weinberg <zack@codesourcery.com>
889 * elf32-arm.c (elf32_arm_reloc_type_lookup)
890 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
891 Use ISO C90 function declaration style.
893 2005-05-31 James E Wilson <wilson@specifixinc.com>
895 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
896 header PF_R flag on PT_LOAD segments.
898 2005-05-30 Richard Henderson <rth@redhat.com>
900 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
901 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
903 2005-05-29 Richard Henderson <rth@redhat.com>
905 * configure.in (--enable-secureplt): New.
906 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
907 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
908 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
909 (elf64_alpha_use_secureplt): New.
910 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
911 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
912 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
913 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
914 (struct alpha_elf_link_hash_entry): Add plt_offset.
915 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
916 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
917 (PLT_ENTRY_WORD3): Remove.
918 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
919 on .plt and create .got.plt.
920 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
921 (get_got_entry): Initialize plt_offset.
922 (elf64_alpha_want_plt): New.
923 (elf64_alpha_check_relocs): Use it.
924 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
926 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
928 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
930 (elf64_alpha_size_plt_section): Size .got.plt section.
931 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
933 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
934 Add PLTRO DYNAMIC entry.
935 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
936 (elf64_alpha_finish_dynamic_sections): Likewise.
938 2005-05-28 David Daney <ddaney@avtrex.com>
940 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
941 calculation of DT_RELSZ to occur after all dynamic relocations
944 2005-05-28 Eli Zaretskii <eliz@gnu.org>
946 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
947 * config.in, configure: Regenerate.
949 2005-05-26 Mark Kettenis <kettenis@gnu.org>
950 Maciej W. Rozycki <macro@linux-mips.org>
952 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
953 stop processing of options if one of invalid size is
955 (_bfd_mips_elf_section_from_shdr): Likewise.
956 (_bfd_mips_elf_fake_sections): Reset the type of empty special
959 2005-05-26 Richard Henderson <rth@redhat.com>
961 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
962 plt_old_section, plt_old_value.
963 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
964 (elf64_alpha_size_plt_section_1): Don't use it.
966 2005-05-26 Jakub Jelinek <jakub@redhat.com>
968 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
969 first shdr has sh_size == 0. Fail if e_shnum is large to cause
970 arithmetic overflow when allocating the i_shdr array.
971 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
973 2005-05-25 Richard Henderson <rth@redhat.com>
975 * elf64-alpha.c: Update all function definitions to ISO C. Remove
976 all function prototypes; rearrange functions into def-use order.
978 2005-05-25 Richard Henderson <rth@redhat.com>
980 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
981 in the presence of deleting elements.
982 (elf64_alpha_size_got_sections): Zero dead got section size.
984 2005-05-23 Fred Fish <fnf@specifixinc.com>
986 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
987 (struct funcinfo): Add caller_func, caller_file, caller_line.
988 tag, and nesting_level members.
989 (lookup_address_in_function_table): Change first passed parameter
990 from "struct funcinfo *" to "struct comp_unit *".
991 (lookup_address_in_function_table): Dereference unit to find function
993 (lookup_address_in_function_table): Traverse the function list to
994 create a chain of inlined functions back to the first non inlined
996 (scan_unit_for_functions): Remember tag and nesting level. Handle
997 DW_AT_call_file and DW_AT_call_line.
998 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
999 call to pass unit pointer instead of function table pointer. For
1000 inlined functions, save pointer to the inliner chain.
1001 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1002 (_bfd_dwarf2_find_inliner_info): New function that returns information
1003 from the inliner chain after a call to bfd_find_nearest_line.
1005 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1006 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1007 NAME##_find_inliner_info.
1008 (bfd_target): Add _bfd_find_inliner_info.
1009 * bfd-in2.h: Regenerate.
1011 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1012 macro that always returns bfd_false.
1013 (_bfd_dwarf2_find_inliner_info): Declare.
1014 * libbfd.h: Regenerate.
1016 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1017 that calls _bfd_dwarf2_find_inliner_info.
1018 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1020 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1021 that calls _bfd_dwarf2_find_inliner_info.
1022 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1023 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1024 _bfd_mips_elf_find_inliner_info.
1025 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1026 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1028 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1029 _bfd_dwarf2_find_inliner_info.
1030 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1031 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1032 _bfd_elf_find_inliner_info.
1034 * coffgen.c (coff_find_inliner_info): New function that
1035 calls _bfd_dwarf2_find_inliner_info.
1036 * libcoff-in.h (coff_find_inliner_info): Declare.
1037 * libcoff.h: Regenerate.
1038 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1039 (pmac_xcoff_vec) Ditto.
1040 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1041 (aix5coff64_vec): Ditto.
1043 * aout-target.h (MY_find_inliner_info): Define as
1044 _bfd_nosymbols_find_inliner_info.
1045 * aout-tic30.c (MY_find_inliner_info): Ditto.
1046 * binary.c (binary_find_inliner_info): Ditto.
1047 * i386msdos.c (msdos_find_inliner_info): Ditto.
1048 * ihex.c (ihex_find_inliner_info): Ditto.
1049 * libaout.h (aout_32_find_inliner_info): Ditto.
1050 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1051 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1052 * mmo.c (mmo_find_inliner_info): Ditto.
1053 * nlm-target.h (nlm_find_inliner_info): Ditto.
1054 * pef.c (bfd_pef_find_inliner_info): Ditto.
1055 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1056 * srec.c (srec_find_inliner_info): Ditto.
1057 * tekhex.c (tekhex_find_inliner_info): Ditto.
1058 * versados.c (versados_find_inliner_info): Ditto.
1059 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1061 * ieee.c (ieee_find_inliner_info): New function that always
1063 * oasys.c (oasys_find_inliner_info): Ditto.
1064 * vms.c (vms_find_inliner_info): Ditto.
1066 2005-05-24 Alan Modra <amodra@bigpond.net.au>
1068 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1069 force old plt layout.
1071 2005-05-22 Richard Henderson <rth@redhat.com>
1073 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1075 (elf64_alpha_check_relocs): Likewise.
1076 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1077 non-allocated sections.
1079 2005-05-22 Richard Henderson <rth@redhat.com>
1081 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1082 undefweak to use zero register. Call elf64_alpha_relax_got_load
1083 if not all uses removed.
1084 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1085 (elf64_alpha_relax_section): Handle undefweak symbols.
1086 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1087 (elf64_alpha_size_rela_got_1): Likewise.
1088 (elf64_alpha_relocate_section): Likewise.
1090 2005-05-22 Richard Henderson <rth@redhat.com>
1092 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1093 on SEC_CODE sections.
1095 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1097 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1099 (som_write_space_strings): Change type of tmp_space and p to char *.
1100 (som_write_symbol_strings): Likewise. Also change type of comp to
1102 (som_begin_writing): Change type of strings_size to unsigned int.
1103 (som_finish_writing): Likewise.
1104 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1106 * som.h (struct som_section_data_struct): Change type of reloc_stream
1107 field to unsigned char *.
1109 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1111 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1112 copy relocations for VxWorks.
1114 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1116 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1118 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1119 (ppc_elf_check_relocs): Set has_sda_refs.
1120 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1121 copy relocations. Use has_sda_refs to place variables in .sbss.
1122 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1125 2005-05-20 Bob Wilson <bob.wilson@acm.org>
1127 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1128 xtensa_default_isa is initialized.
1130 2005-05-20 Alan Modra <amodra@bigpond.net.au>
1132 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1133 for second and subsequent list entries. Only allocate multiple
1134 glink stubs when shared or pie.
1135 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1136 glink stub is needed.
1138 2005-05-19 Zack Weinberg <zack@codesourcery.com>
1140 * Makefile.am: Have 'all' depend on 'info'.
1141 * Makefile.in: Regenerate.
1143 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1145 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1146 init_offset. Add init_got_refcount, init_plt_refcount,
1147 init_got_offset and init_plt_offset.
1148 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1149 (_bfd_elf_link_hash_hide_symbol): Likewise.
1150 (_bfd_elf_link_hash_table_init): Likewise.
1151 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1152 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1153 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1154 (bfd_elf_size_dynamic_sections): Likewise.
1155 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1156 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1157 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1158 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1159 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1160 (struct plt_entry): New.
1161 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1162 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1163 use _bfd_elf_link_hash_copy_indirect.
1164 (update_plt_info, find_plt_ent): New functions.
1165 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1166 and adjust for use of plt list rather than refcount.
1167 (ppc_elf_gc_sweep_hook): Likewise.
1168 (ppc_elf_tls_optimize): Likewise.
1169 (ppc_elf_adjust_dynamic_symbol): Likewise.
1170 (allocate_dynrelocs): Likewise.
1171 (ppc_elf_relax_section): Likewise.
1172 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1173 when performing a relocatable link.
1174 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1175 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1178 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1180 * elf.c (assign_file_positions_for_segments): Use maximum of
1181 maxpagesize and section alignment when adjusting initial
1182 segment offset and section offsets.
1184 2005-05-18 Zack Weinberg <zack@codesourcery.com>
1186 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1189 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1191 * elf.c (group_signature): Undo the last change. Check if the
1192 symbol table section is correct.
1194 2005-05-17 Zack Weinberg <zack@codesourcery.com>
1196 * elf32-arm.c: Wherever possible, use official reloc names
1198 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1199 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1200 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1201 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1202 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1203 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1204 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1205 Add many new relocations from AAELF.
1206 (elf32_arm_howto_from_type): Update to match.
1207 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1208 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1209 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1210 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1211 (elf32_arm_final_link_relocate): Add support for
1212 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1213 case entries redundant with default.
1215 * reloc.c: Reorganize ARM relocations. Add Thumb
1216 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1217 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1218 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1219 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1220 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1221 * bfd-in2.h, libbfd.h: Regenerate.
1223 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1225 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1227 * format.c (bfd_check_format_matches): Set output_has_begun
1229 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1230 special case for both_direction.
1232 2005-05-17 Nick Clifton <nickc@redhat.com>
1234 * elf.c (group_signature): Check for a group section which is
1235 actually a (corrupt) symbol table section in disguise and prevent
1236 an infinite loop from occurring.
1238 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1240 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1243 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1245 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1246 predicate on slot 0 only if slot 0 isn't br.
1248 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1251 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1252 empty sdynbss section.
1253 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1255 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
1257 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1260 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1262 * elf32-ppc.c (LIS_11. LIS_12): Define.
1263 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1264 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1265 for --data-plt when building non-pie executables.
1267 2005-05-17 Nick Clifton <nickc@redhat.com>
1269 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1270 the situation where a symbols's section is not known but a section
1271 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1274 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1275 the presence of a symbol table to just before the symbol table is
1278 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1281 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1282 (elfNN_ia64_relax_section): Use it.
1284 2005-05-14 Mark Kettenis <kettenis@gnu.org>
1286 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1289 2005-05-14 Alan Modra <amodra@bigpond.net.au>
1291 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1293 (ppc_elf_finish_dynamic_sections): Likewise.
1295 2005-05-13 Fred Fish <fnf@specifixinc.com>
1297 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1298 * libbfd.h: Rebuilt.
1300 2005-05-13 Bob Wilson <bob.wilson@acm.org>
1302 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1303 periods in linkonce_kind values.
1305 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1307 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1308 against protected function when building executable.
1310 2005-05-12 Alan Modra <amodra@bigpond.net.au>
1312 * elf32-ppc.c (LWZU_0_X_11): Delete.
1313 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1314 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1315 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1317 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1319 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1320 Generate .glink branch table and updated stubs.
1322 2005-05-11 Alan Modra <amodra@bigpond.net.au>
1324 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1325 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1326 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1327 (CROR_151515, CROR_313131): Delete.
1328 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1329 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1330 LWZU_0_X_11): Define.
1331 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1332 and R_PPC_REL16_HA entries.
1333 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1334 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1335 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1336 new_plt, and old_plt.
1337 (ppc_elf_create_dynamic_sections): Create .glink section.
1338 (ppc_elf_check_relocs): Set new_plt and old_plt.
1339 (ppc_elf_select_plt_layout): New function.
1340 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1341 (allocate_got): Handle differences between old and new got layout.
1342 (allocate_dynrelocs): Likewise for plt.
1343 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1344 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1345 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1346 destination of R_PPC_PLTREL24 relocs.
1347 (ppc_elf_relocate_section): Handle new relocs and changed destination
1349 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1350 differences in layout.
1351 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1352 put a blrl in new got. Write glink contents.
1353 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1354 * libbfd.h: Regenerate.
1355 * bfd-in2.h: Regenerate.
1357 2005-05-11 Andreas Schwab <schwab@suse.de>
1359 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1362 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1364 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1365 section if SEC_ALLOC isn't set.
1367 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1369 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1370 * acinclude.m4: Don't sinclude accross.m4.
1371 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1373 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1375 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1376 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1377 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1378 (func_desc_adjust): Hide fake function descriptors when function
1379 code entry is defined.
1380 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1382 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1384 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1386 2005-05-08 Dave Korn <dave.korn@artimi.com>
1388 * coff-tic80.c: Undefine _CONST after system headers to prevent
1389 clash with tic80-specific definition in include/coff/tic80.h
1391 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1394 * elflink.c (elf_link_output_extsym): Use output_bfd if
1395 h->root.u.def.section is bfd_abs_section_ptr when reporting
1398 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1400 * elf-bfd.h (elf_backend_data): Update special_sections to
1401 array of pointer to bfd_elf_special_section.
1402 * elf.c (special_sections): Likewise.
1403 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1404 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1405 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1406 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1407 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1408 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1409 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1410 * elf32-v850.c (v850_elf_special_sections): Likewise.
1411 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1412 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1413 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1414 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1415 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1416 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1417 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1418 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1420 * elf.c (get_special_section): Updated.
1422 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1424 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1425 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1426 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1428 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1429 * elf32-frv.c (_frv_create_got_section): Likewise.
1430 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1431 (elf_backend_got_symbol_offset): Don't define.
1432 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1433 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1435 (ppc_elf_create_got): Tidy.
1436 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1437 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1438 (ppc_elf_gc_sweep_hook): Likewise.
1439 (ppc_elf_relocate_section): Likewise.
1440 (ppc_elf_finish_dynamic_symbol): Likewise.
1441 (allocate_got): New function.
1442 (allocate_dynrelocs): Use allocate_got.
1443 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1444 so that local got can refcount it. Set got_header_size.
1445 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1447 (ppc_elf_finish_dynamic_sections): Likewise.
1448 (elf_backend_got_symbol_offset): Don't define.
1449 (elf_backend_got_header_size): Ditto.
1451 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1453 * configure.in (ACX_HEADER_STRING): New.
1454 * configure: Regenerate.
1455 * config.in: Regenerate.
1456 * sysdep.h (STRING_WITH_STRINGS): Use.
1458 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1460 * elf.c (_bfd_elf_close_and_cleanup): Only call
1461 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1463 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1465 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1466 "__bss_start" instead of "_edata" as fallback.
1468 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1470 * bfd-in2.h: Regenerated.
1472 2005-05-05 Paul Brook <paul@codesourcery.com>
1474 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1475 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1477 * configure: Regenerate.
1478 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1479 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1480 (elf32-i386.lo): Depend on elf-vxworks.h.
1481 (elf-vxworks.lo): New rule.
1482 * Makefile.in: Regenerate.
1483 * elf-bfd.h (elf_backend_data): Update type of
1484 elf_backend_emit_relocs.
1485 (_bfd_elf_link_output_relocs): Update prototype.
1486 * elflink.c (_bfd_elf_link_output_relocs): Always use
1487 bed->elf_backend_emit_relocs when outputting relocations.
1488 * elfxx-target.h (elf_backend_emit_relocs): Default to
1489 _bfd_elf_link_output_relocs.
1490 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1491 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1492 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1493 (elf_i386_plt0_entry): Remove padding.
1494 (elf_i386_pic_plt0_entry): Ditto.
1495 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1496 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1497 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1498 plt0_pad_byte fields.
1499 (elf_i386_link_hash_table_create): Zero them.
1500 (elf_i386_create_dynamic_sections): Create static relocation section.
1501 (allocate_dynrelocs): Allocate space for static PLT relocations.
1502 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1503 symbols. Give PLT symbols function type. Don't strip PLT sections
1504 if we have exported symbols from them.
1505 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1506 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1508 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1509 Add relocation for GOT location. Fill in PLT static relocations.
1510 (elf_i386_vxworks_link_hash_table_create): New function.
1511 (elf_i386_vxworks_link_output_symbol_hook): New function.
1512 * elf-vxworks.h: New file.
1514 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1516 * section.c (bfd_make_section_anyway_with_flags): New.
1517 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1518 (bfd_make_section_with_flags): New.
1519 (bfd_make_section): Call bfd_make_section_with_flags.
1521 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1522 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1523 instead of bfd_make_section/bfd_make_section and don't call
1524 bfd_set_section_flags.
1525 (mn10300_elf_check_relocs): Likewise.
1526 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1527 * elf32-arm.c (create_got_section): Likewise.
1528 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1529 (elf32_arm_check_relocs): Likewise.
1530 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1531 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1532 (_frv_create_got_section): Likewise.
1533 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1534 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1535 (elf32_hppa_check_relocs): Likewise.
1536 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1537 (i370_elf_check_relocs): Likewise.
1538 * elf32-i386.c (create_got_section): Likewise.
1539 (elf_i386_check_relocs): Likewise.
1540 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1541 (create_got_section): Likewise.
1542 (m32r_elf_create_dynamic_sections): Likewise.
1543 (m32r_elf_check_relocs): Likewise.
1544 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1545 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1546 (ppc_elf_create_dynamic_sections): Likewise.
1547 (ppc_elf_add_symbol_hook): Likewise.
1548 (ppc_elf_check_relocs): Likewise.
1549 * elf32-s390.c (create_got_section): Likewise.
1550 (elf_s390_check_relocs): Likewise.
1551 * elf32-sh.c (create_got_section): Likewise.
1552 (sh_elf_create_dynamic_sections): Likewise.
1553 (sh_elf_check_relocs): Likewise.
1554 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1555 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1556 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1557 (add_extra_plt_sections): Likewise.
1558 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1559 (elf64_alpha_create_got_section): Likewise.
1560 (elf64_alpha_create_dynamic_sections): Likewise.
1561 (elf64_alpha_check_relocs): Likewise.
1562 * elf64-hppa.c (get_reloc_section): Likewise.
1563 (get_opd): Likewise.
1564 (get_plt): Likewise.
1565 (get_dlt): Likewise.
1566 (get_stub): Likewise.
1567 (elf64_hppa_create_dynamic_sectionso): Likewise.
1568 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1569 * elf64-ppc.c (create_linkage_sections): Likewise.
1570 (ppc64_elf_check_relocs): Likewise.
1571 * elf64-s390.c (create_got_section): Likewise.
1572 (elf_s390_check_relocs): Likewise.
1573 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1574 (sh64_elf64_create_dynamic_sections): Likewise.
1575 * elf64-x86-64.c (create_got_section): Likewise.
1576 (elf64_x86_64_check_relocs): Likewise.
1577 * elflink.c (_bfd_elf_create_got_section): Likewise.
1578 (_bfd_elf_link_create_dynamic_sections): Likewise.
1579 (elf_link_add_object_symbols): Likewise.
1580 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1581 (elfNN_ia64_create_dynamic_sections): Likewise.
1582 (get_fptr): Likewise.
1583 (get_pltoff): Likewise.
1584 (get_reloc_section): Likewise.
1585 (elfNN_ia64_object_p): Likewise.
1586 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1587 (mips_elf_create_compact_rel_section): Likewise.
1588 (mips_elf_create_got_section): Likewise.
1589 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1590 * elfxx-sparc.c (create_got_section): Likewise.
1591 (_bfd_sparc_elf_check_relocs): Likewise.
1593 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1594 on linker created sections.
1596 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1599 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1600 script on executable.
1602 2005-05-05 John Levon <levon@movementarian.org>
1604 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1605 allocated memory before returning.
1606 (decode_line_info): Likewise.
1607 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1608 allocated by functions in this file.
1609 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1610 * elf.c (_bfd_elf_close_and_cleanup): Call
1611 _bfd_dwarf2_cleanup_debug_info.
1613 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1615 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1616 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1617 * configure, config.in, Makefile.in: Regenerate.
1618 * sysdep.h (stpcpy): Revert last change.
1620 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1622 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1624 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1626 * elfxx-ia64.c (ARCH_SIZE): New.
1627 (LOG_SECTION_ALIGN): Likewise.
1628 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1629 align relocation sections.
1630 (get_fptr): Likewise.
1631 (get_reloc_section): Likewise.
1632 (elfNN_ia64_tprel_base): Likewise.
1633 (elfNN_ia64_check_relocs): Support 32bit relocations.
1634 (allocate_global_fptr_got): Likewise.
1635 (allocate_dynrel_entries): Likewise.
1636 (set_got_entry): Likewise.
1637 (set_pltoff_entry): Likewise.
1638 (elfNN_ia64_relocate_section): Likewise.
1640 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1642 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1643 * configure: Regenerate.
1644 * config.in: Likewise.
1646 * sysdep.h (stpcpy): New.
1648 2005-05-04 Nick Clifton <nickc@redhat.com>
1650 * Update the address and phone number of the FSF organization in
1651 the GPL notices in the following files:
1652 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1653 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1654 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1655 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1656 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1657 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1658 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1659 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1660 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1661 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1662 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1663 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1664 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1665 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1666 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1667 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1668 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1669 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1670 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1671 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1672 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1673 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1674 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1675 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1676 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1677 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1678 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1679 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1680 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1681 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1682 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1683 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1684 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1685 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1686 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1687 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1688 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1689 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1690 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1691 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1692 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1693 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1694 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1695 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1696 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1697 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1698 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1699 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1700 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1701 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1702 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1703 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1704 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1705 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1706 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1707 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1708 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1709 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1710 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1711 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1712 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1713 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1714 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1715 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1716 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1717 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1718 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1719 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1720 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1721 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1724 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1726 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1727 * bfd-in2.h: Regenerated.
1729 * elflink.c (bfd_elf_set_symbol): New.
1730 (_bfd_elf_provide_symbol): Call it.
1731 (_bfd_elf_provide_section_bound_symbols): New.
1733 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1735 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1736 at the end, if a strong definition has already been seen.
1738 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1740 * section.c (struct bfd_section): Replace link_order_head and
1741 link_order_tail with map_head and map_tail union.
1742 (STD_SECTION): Update.
1743 (_bfd_strip_section_from_output): Delete.
1744 * aoutx.h: Update throughout for above changes.
1745 * coff-ppc.c: Likewise.
1746 * cofflink.c: Likewise.
1747 * ecoff.c: Likewise.
1748 * elf-eh-frame.c: Likewise.
1749 * elf-m10300.c: Likewise.
1751 * elf32-arm.c: Likewise.
1752 * elf32-cris.c: Likewise.
1753 * elf32-hppa.c: Likewise.
1754 * elf32-i386.c: Likewise.
1755 * elf32-m32r.c: Likewise.
1756 * elf32-m68hc1x.c: Likewise.
1757 * elf32-m68k.c: Likewise.
1758 * elf32-ppc.c: Likewise.
1759 * elf32-s390.c: Likewise.
1760 * elf32-sh.c: Likewise.
1761 * elf32-vax.c: Likewise.
1762 * elf32-xtensa.c: Likewise.
1763 * elf64-alpha.c: Likewise.
1764 * elf64-hppa.c: Likewise.
1765 * elf64-ppc.c: Likewise.
1766 * elf64-s390.c: Likewise.
1767 * elf64-sh64.c: Likewise.
1768 * elf64-x86-64.c: Likewise.
1769 * elflink.c: Likewise.
1770 * elfxx-ia64.c: Likewise.
1771 * elfxx-mips.c: Likewise.
1772 * elfxx-sparc.c: Likewise.
1773 * linker.c: Likewise.
1774 * merge.c: Likewise.
1775 * pdp11.c: Likewise.
1776 * xcofflink.c: Likewise.
1777 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1778 out from bfd_elf_size_dynamic_sections.
1779 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1780 * bfd-in2.h: Regenerate.
1782 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1784 * section.c (bfd_section_list_remove): Don't clear s->next.
1785 (bfd_section_list_append): Always init s->prev.
1786 (bfd_section_list_prepend): Define.
1787 (bfd_section_list_insert_after): Minor optimization.
1788 (bfd_section_removed_from_list): Rewrite.
1789 * elf.c (assign_section_numbers): Simplify list traversal now that
1790 bfd_section_list_remove doesn't destroy removed section next ptr.
1791 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1792 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1793 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1794 * bfd-in2.h: Regenerate.
1796 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1798 * bfd.c (bfd): Remove section_tail and add section_last.
1799 (bfd_preserve): Likewise.
1800 (bfd_preserve_save): Likewise.
1801 (bfd_preserve_restore): Likewise.
1802 * opncls.c (_bfd_new_bfd): Likewise.
1804 * coffcode.h (coff_compute_section_file_positions): Updated.
1805 (coff_compute_section_file_positions): Likewise.
1806 * elf.c (assign_section_numbers): Likewise.
1807 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1808 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1809 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1810 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1811 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1812 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1814 * ecoff.c (bfd_debug_section): Initialize prev.
1816 * section.c (bfd_section): Add prev.
1817 (bfd_section_list_remove): Updated.
1818 (bfd_section_list_append): New.
1819 (bfd_section_list_insert_after): New.
1820 (bfd_section_list_insert_before): New.
1821 (bfd_section_list_insert): Removed.
1822 (bfd_section_removed_from_list): Updated.
1823 (STD_SECTION): Initialize prev.
1824 (bfd_section_init): Updated.
1825 (bfd_section_list_clear): Updated.
1827 * bfd-in2.h: Regenerated.
1829 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1831 * elf.c (_bfd_elf_new_section_hook): Don't call
1832 _bfd_elf_get_sec_type_attr on sections from input files.
1834 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1836 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1837 hash table size 16699 instead of bfd_hash_table_init.
1839 2005-05-01 Paul Brook <paul@codesourcery.com>
1841 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1842 definition has already been seen.
1844 2005-05-01 Paul Brook <paul@codesourcery.com>
1846 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1847 R_ARM_PLT32 the same as R_ARM_PC24.
1848 (arm_add_to_rel): Ditto.
1850 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1852 * config.bfd: Add h8300*-*-rtemscoff.
1853 Switch h8300*-*-rtems* to elf.
1855 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1857 * aclocal.m4, Makefile.in: Regnerated.
1859 2005-04-28 Paul Brook <paul@codesourcery.com>
1861 Merge changes only applied to Makefile.in.
1862 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1863 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1864 (elfxx-sparc.lo): New rule.
1865 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1866 (elf64-sparc.lo): Likewise.
1868 2005-04-28 Julian Brown <julian@codesourcery.com>
1870 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1873 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1875 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1877 * elf.c (bfd_elf_sym_name): Updated.
1878 (group_signature): Likewise.
1879 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1880 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1881 (ppc64_elf_edit_toc): Likewise.
1882 (ppc64_elf_relocate_section): Likewise.
1883 * elfcode.h (elf_slurp_symbol_table): Likewise.
1884 * elflink.c (elf_link_input_bfd): Likewise.
1886 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1887 bfd_elf_sym_name to get local symbol name when reporting errors.
1889 2005-04-27 Nick Clifton <nickc@redhat.com>
1891 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1892 formatted input file results in a reloc which has no associated
1895 2005-04-26 Jerome Guitton <guitton@gnat.com>
1897 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1899 2005-04-25 David S. Miller <davem@davemloft.net>
1901 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1902 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1903 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1906 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1909 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1910 to discarded section an error.
1912 2005-04-21 Jerome Guitton <guitton@gnat.com>
1914 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1915 corresponding AC_CHECK_DECLS.
1916 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1918 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1919 * configure: Regenerate.
1922 2005-04-21 Andreas Schwab <schwab@suse.de>
1924 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1925 unsigned from type of dynamic_interpreter.
1926 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1929 * elf.c (assign_section_numbers): Fix comment.
1931 2005-04-21 Jerome Guitton <guitton@gnat.com>
1933 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1934 for struct som_exec_auxhdr fields.
1936 2005-04-21 Nick Clifton <nickc@redhat.com>
1938 * aout-adobe.c: Convert to ISO C and fix formatting.
1939 * aout-arm.c: Convert to ISO C and fix formatting.
1940 * aout-cris.c: Convert to ISO C and fix formatting.
1941 * aout-ns32k.c: Convert to ISO C and fix formatting.
1942 * aout-tic30.c: Convert to ISO C and fix formatting.
1943 * coffcode.h: Convert to ISO C and fix formatting.
1944 * coffswap.h: Convert to ISO C and fix formatting.
1945 * i386aout.c: Convert to ISO C and fix formatting.
1946 * libaout.h: Convert to ISO C and fix formatting.
1947 * libcoff-in.h: Convert to ISO C and fix formatting.
1948 * libcoff.h: Convert to ISO C and fix formatting.
1949 * libecoff.h: Convert to ISO C and fix formatting.
1950 * libnlm.h: Convert to ISO C and fix formatting.
1951 * libpei.h: Convert to ISO C and fix formatting.
1952 * libxcoff.h: Convert to ISO C and fix formatting.
1953 * nlm-target.h: Convert to ISO C and fix formatting.
1954 * nlm.c: Convert to ISO C and fix formatting.
1955 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1956 * nlm32-i386.c: Convert to ISO C and fix formatting.
1957 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1958 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1959 * nlmcode.h: Convert to ISO C and fix formatting.
1960 * nlmswap.h: Convert to ISO C and fix formatting.
1961 * pe-mips.c: Convert to ISO C and fix formatting.
1962 * peXXigen.c: Convert to ISO C and fix formatting.
1963 * peicode.h: Convert to ISO C and fix formatting.
1964 * vms-gsd.c: Convert to ISO C and fix formatting.
1965 * vms-hdr.c: Convert to ISO C and fix formatting.
1966 * vms-misc.c: Convert to ISO C and fix formatting.
1967 * vms-tir.c: Convert to ISO C and fix formatting.
1968 * vms.c: Convert to ISO C and fix formatting.
1969 * vms.h: Convert to ISO C and fix formatting.
1971 * coffgen.c (coff_print_symbol): Restore correct formatting of
1974 2005-04-20 David S. Miller <davem@davemloft.net>
1976 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1977 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1978 (allocate_dynrelocs): Likewise.
1980 2005-04-20 Jerome Guitton <guitton@gnat.com>
1982 * configure.in: Fix the check for basename declaration. Add check
1983 for declarations of ftello, ftello64, fseeko, fseeko64.
1984 * configure: Regenerate.
1986 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1988 2005-04-19 David S. Miller <davem@davemloft.net>
1990 * elfxx-sparc.c: New file.
1991 * elfxx-sparc.h: New file.
1992 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1993 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1994 (elfxx-sparc.lo): New rule.
1995 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1996 (elf64-sparc.lo): Likewise.
1997 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1998 (bfd_elf64_sparc_vec): Likewise.
1999 * configure: Regenerate.
2000 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2001 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2002 which is more consistent with elf32-sparc.c
2004 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2006 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2007 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2009 2005-04-19 Alan Modra <amodra@bigpond.net.au>
2011 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2012 dynamic relocs in non-SEC_ALLOC sections.
2013 (ppc_elf_gc_sweep_hook): Likewise.
2014 (ppc_elf_relax_section): Likewise.
2015 (ppc_elf_relocate_section): Likewise.
2017 2005-04-18 Nick Clifton <nickc@redhat.com>
2019 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2020 assigning a value to return_value.
2022 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2025 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2028 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2031 * elf.c (setup_group): Properly handle zero group count.
2033 2005-04-17 Mark Kettenis <kettenis@gnu.org>
2035 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2036 (som_is_subspace, compare_subspaces, som_compute_checksum)
2037 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2039 (hppa_som_reloc, compare_syms, compare_subspaces)
2040 (som_print_symbol, som_get_section_contents)
2041 (som_set_section_contents): Remove space after 'void *'.
2042 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2043 (som_bfd_merge_private_bfd_data)
2044 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2047 2004-04-15 Julian Brown <julian@codesourcery.com>
2049 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2050 * bfd-in2.h: Regenerate.
2051 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2052 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2053 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2054 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2055 relocations if requested to.
2056 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2057 use_blx rather than symbian_p.
2058 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2059 use_blx is in effect.
2060 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2063 2005-04-15 Nick Clifton <nickc@redhat.com>
2065 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2068 2005-04-15 Alan Modra <amodra@bigpond.net.au>
2071 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2072 used as a list pointer.
2074 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2076 * Makefile.am (NO_WERROR): Define.
2077 * warning.m4: New file
2078 * acinclude.m4: Include warning.m4.
2079 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2080 * Makefile.in: Regenerate.
2081 * configure: Regenerate.
2083 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2085 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2086 Write trailing padding.
2088 * merge.c (merge_strings): Round up section size for alignment.
2090 2005-04-14 David S. Miller <davem@davemloft.net>
2092 Add TLS support for 64-bit Sparc ELF.
2093 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2094 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2095 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2096 sparc64_elf_hash_entry, sparc64_elf_tdata,
2097 sparc64_elf_local_got_tls_type): New defines.
2098 (sparc64_elf_mkobject): New function.
2099 (sparc64_elf_link_hash_table): Add members for dynamic linker
2100 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2101 uion to track TLS GOT references. Add sym_sec to cache
2102 mappings from local sym to section.
2103 (link_hash_newfunc): New function.
2104 (sparc64_elf_bfd_link_hash_table_create): Rename to
2105 sparc64_elf_link_hash_table_create for consistency.
2106 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2107 (sparc64_elf_create_dynamic_sections): Initialize new section
2108 members of sparc64_elf_link_hash_table. Only init srelbss
2110 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2112 (SPARC_NOP): Define.
2113 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2114 sparc64_elf_plt_ptr_offset): Delete.
2115 (sparc64_plt_entry_build): New function to build PLT entries
2116 gradually instread of all at once at the end of linking.
2117 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2118 local vars. Get them from sparc64_elf_hash_table instead.
2119 Check early on if r_symndx is in bounds. Handle TLS transitions.
2120 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2121 For TLS relocs, record the tls_type in either
2122 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2123 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2124 to the __tls_get_addr symbol. For PLT relocs, track references
2125 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2126 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2127 symbol references, count the number of relocations needed for
2128 that symbol. For default switch case, don't error, this lets
2129 the TLS relocs not explicitly handled by this function get
2131 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2132 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2133 it from sparc64_elf_hash_table. Store the real PLT offset
2134 in h->plt.offset, and build PLT entries one at a time. Also
2135 get .dynbss section pointer from htab.
2136 (allocate_dynrelocs, readonly_dynrelocs,
2137 sparc64_omit_section_dynsym): New functions.
2138 (sparc64_elf_omit_section_dynsym): Use these new functions as
2140 (dtpoff_base, tpoff): New functions.
2141 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2142 locals, get them from sparc64_elf_hash_table. Handle TLS
2143 relocations and refcounting in main relocation loop.
2144 (sparc64_elf_finish_dynamic_symbol): Use
2145 sparc64_elf_link_hash_table. Build PLT entries as we see
2146 them. Handle TLS GOT relocations.
2147 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2148 from sparc64_elf_hash_table. Initialize only PLT header
2149 not all entries since we not build PLT entries one by one.
2150 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2151 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2152 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2154 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2156 * elflink.c (elf_link_input_bfd): Update check for removed
2159 2005-04-12 Alan Modra <amodra@bigpond.net.au>
2161 * Makefile.am: Run "make dep-am".
2162 * Makefile.in: Regenerate.
2163 * aclocal.m4: Regenerate.
2164 * libcoff.h: Regenerate.
2166 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2168 * linker.c (_bfd_generic_link_output_symbols): Also check if
2169 the output section of an input section has been removed from
2172 * section.c (bfd_section_list_remove): Clear the next field
2173 of the removed section.
2174 (bfd_section_removed_from_list): New.
2175 * bfd-in2.h: Regenerated.
2177 2005-04-11 David S. Miller <davem@davemloft.net>
2179 * elf32-sparc.c (elf32_sparc_relocate_section,
2180 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2181 R_SPARC_TLS_LE_{HIX22,LOX10}.
2182 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2183 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2184 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2185 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2187 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2189 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2191 2005-04-11 Nick Clifton <nickc@redhat.com>
2193 * aout-target.h: Convert to ISO C.
2194 * aoutf1.h: Convert to ISO C.
2195 * aoutx.h: Convert to ISO C.
2196 * bout.c: Convert to ISO C.
2197 * dwarf1.c: Convert to ISO C.
2198 * ecoffswap.h: Convert to ISO C.
2199 * freebsd.h: Convert to ISO C.
2200 * genlink.h: Convert to ISO C.
2201 * ieee.c: Convert to ISO C.
2202 * ihex.c: Convert to ISO C.
2203 * libcoff-in.h: Convert to ISO C.
2204 * mach-o.c: Convert to ISO C.
2205 * mach-o.h: Convert to ISO C.
2206 * netbsd.h: Convert to ISO C.
2207 * ns32k.h: Convert to ISO C.
2208 * ns32knetbsd.c: Convert to ISO C.
2209 * oasys.c: Convert to ISO C.
2210 * pdp11.c: Convert to ISO C.
2211 * pef-traceback.h: Convert to ISO C.
2212 * pef.c: Convert to ISO C.
2213 * pef.h: Convert to ISO C.
2214 * riscix.c: Convert to ISO C.
2215 * som.c: Convert to ISO C.
2216 * som.h: Convert to ISO C.
2217 * srec.c: Convert to ISO C.
2218 * stabs.c: Convert to ISO C.
2219 * sunos.c: Convert to ISO C.
2220 * tekhex.c: Convert to ISO C.
2221 * versados.c: Convert to ISO C.
2222 * version.h: Convert to ISO C.
2223 * xcoff-target.h: Convert to ISO C.
2224 * xcofflink.c: Convert to ISO C.
2225 * xsym.c: Convert to ISO C.
2226 * xsym.h: Convert to ISO C.
2228 2005-04-08 Paul Brook <paul@codesourcery.com>
2230 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2231 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2232 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2233 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2234 (elf32_arm_to_thumb_stub): Create PIC stubs.
2235 (record_arm_to_thumb_glue): Use different stub size for relocatable
2238 2005-04-05 Alan Modra <amodra@bigpond.net.au>
2240 * elf64-ppc.c (dec_dynrel_count): New function split out from
2241 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2242 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2243 (ppc64_elf_tls_optimize): Likewise.
2245 2005-04-05 Mark Kettenis <kettenis@gnu.org>
2247 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2248 CORE_WCOOKIE_OFFSET.
2249 (SPARC64_WCOOKIE_OFFSET): New.
2250 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2252 2005-04-05 Nick Clifton <nickc@redhat.com>
2254 * po/rw.po: New translation: Kinyarwanda
2255 * configure.in (ALL_LINGUAS): Add rw
2256 * configure: Regenerate.
2258 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
2260 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2261 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2262 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2264 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2265 to check for SHT_MIPS_OPTIONS sections.
2266 (_bfd_mips_elf_set_section_contents): Likewise.
2268 2005-04-04 Eric Christopher <echristo@redhat.com>
2270 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2271 Clean up gp handling code.
2273 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2275 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2277 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2278 sections for relocatable files only. Remove the linker created
2280 (_bfd_elf_compute_section_file_positions): Pass link_info to
2281 assign_section_numbers.
2283 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2284 (elf_backend_object_p): Defined.
2286 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2288 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2290 2005-04-03 Fred Fish <fnf@specifixinc.com>
2292 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2293 dwarf_ranges_size members.
2294 (struct comp_unit): Add base_address member.
2295 (struct funcinfo): Replace low/high members with an arange.
2296 (arange_add): Replace incoming "unit" parameter with "abfd" and
2297 "first_arange" pointers. Reorganize/rewrite function body.
2298 (decode_line_info): Change arange_add call to pass bfd and arange
2300 (lookup_address_in_line_info_table): Use arange list instead of
2301 individual low/high members. Walk function's arange list to find
2302 lowest PC in list, to test for overlapping functions.
2303 (read_debug_ranges): New function, reads the debug_ranges section.
2304 (lookup_address_in_function_table): Use arange list instead of
2305 individual low/high members. Rewrite to find smallest range that
2307 (read_rangelist): Read a given rangelist from debug_ranges.
2308 (scan_unit_for_functions): Use arange list instead of individual
2309 low/high members. Handle a DW_AT_ranges attribute.
2310 (parse_comp_unit): Use arange list instead of individual low/high
2311 members. Save comp unit base address. Handle a DW_AT_ranges
2314 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2316 * elf.c (assign_section_numbers): Really use the kept section.
2318 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2320 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2322 * elf.c (assign_section_numbers): When sh_link points to a
2323 discarded section, call _bfd_elf_check_kept_section to see if
2324 the kept section can be used. Otherwise reject sh_link
2325 pointing to discarded section.
2327 * elflink.c (_bfd_elf_check_kept_section): New.
2328 (elf_link_input_bfd): Use it.
2330 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2332 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2333 that we no longer need.
2335 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2337 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2339 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2341 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2343 * elf.c (assign_section_numbers): Fix a typo.
2345 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2347 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2349 (_bfd_elf_section_already_linked): Likewise.
2351 2005-03-31 Jerome Guitton <guitton@gnat.com>
2353 * config.in: Regenerate.
2355 2005-03-31 Jerome Guitton <guitton@gnat.com>
2357 * config.in (HAVE_DECL_BASENAME): New configure macro.
2358 * configure.in: Check for basename.
2359 * configure: Regenerate.
2361 2005-03-30 Julian Brown <julian@codesourcery.com>
2363 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2364 bfd_elf32_is_arm_mapping_symbol_name.
2365 * bfd-in2.h: Regenerate.
2366 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2367 bfd_elf32_is_arm_mapping_symbol_name.
2368 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2369 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2370 (arm_elf_find_function): Likewise.
2371 (elf32_arm_output_symbol_hook): Likewise.
2373 2005-03-30 Julian Brown <julian@codesourcery.com>
2375 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2376 * bfd-in2.h: Regenerate.
2377 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2378 bfd_elf32_is_arm_mapping_symbol_name.
2379 (elf32_arm_output_symbol_hook): Likewise.
2380 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2382 (is_arm_mapping_symbol_name): Function moved from here...
2383 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2386 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2388 * configure.in: Check for ffs decl and alphabetize.
2389 * config.in: Regenerate.
2390 * configure: Regenerate.
2391 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2393 2005-03-29 Fred Fish <fnf@specifixinc.com>
2395 * dwarf2.c (struct comp_unit): Fix typo.
2396 (scan_unit_for_functions): Remove unused local variable "name"
2397 and dead code that set it.
2399 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2400 Phil Blundell <philb@gnu.org>
2402 * bfd-in2.h, libbfd.h: Regenerated.
2403 * reloc.c: Add ARM TLS relocations.
2404 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2406 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2407 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2408 (elf32_arm_tls_ie32_howto): New.
2409 (elf32_arm_howto_from_type): Support TLS relocations.
2410 (elf32_arm_reloc_map): Likewise.
2411 (elf32_arm_reloc_type_lookup): Likewise.
2413 (struct elf32_arm_obj_tdata): New.
2414 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2415 (elf32_arm_mkobject): New function.
2416 (struct elf32_arm_relocs_copied): Add pc_count.
2417 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2418 (GOT_TLS_IE): Define.
2419 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2420 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2421 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2422 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2423 (dtpoff_base, tpoff): New functions.
2424 (elf32_arm_final_link_relocate): Handle TLS relocations.
2425 (IS_ARM_TLS_RELOC): Define.
2426 (elf32_arm_relocate_section): Warn about TLS mismatches.
2427 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2428 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2429 TLS relocations and pc_count.
2430 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2431 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2433 (elf32_arm_size_dynamic_sections): Handle TLS.
2434 (elf32_arm_finish_dynamic_symbol): Likewise.
2435 (bfd_elf32_mkobject): Define.
2437 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2439 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2440 relocation types. Don't count relocations which will use a PLT.
2442 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2444 * elf.c (elfcore_grok_nto_status): Print tid as long.
2445 (elfcore_grok_nto_regs): Likewise.
2447 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2449 * irix-core.c: Remove some unnecessary prototypes.
2451 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2453 * irix-core.c: Convert to ISO C.
2455 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2457 * irix-core.c (do_sections): Replace + by | in expression.
2458 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2459 to unused parameters to avoid a compiler warning.
2461 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2463 * netbsd-core.c: Convert to ISO C. Fix formatting.
2465 2005-03-24 Eric Christopher <echristo@redhat.com>
2467 * elfxx-mips.c: Revert previous patch.
2469 2005-03-24 Nick Clifton <nickc@redhat.com>
2471 * targets.c (_bfd_target_vector): Only include the
2472 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2473 all targets enabled.
2475 2005-03-24 James E Wilson <wilson@specifixinc.com>
2477 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2478 (BFD64_BACKENDS): Add elf32-ia64.lo.
2479 * Makefile.in: Regenerate.
2481 2005-03-23 Eric Christopher <echristo@redhat.com>
2483 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2484 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2485 after emitting relocation.
2486 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2487 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2490 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2491 Nick Clifton <nickc@redhat.com>
2493 * config.bfd: Accept any C library to accompany a GNU Linux
2494 implementation, not just the GNU C library.
2495 * configure.in: Likewise.
2496 * configure: Regenerate.
2498 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2500 * bfd-in.h (_bfd_elf_provide_symbol): New.
2501 * bfd-in2.h: Regenerated.
2503 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2504 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2507 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2510 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2512 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2514 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2516 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2517 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2518 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2519 (xtensa_opcode_decode): Rearrange code.
2521 2005-03-22 Nick Clifton <nickc@redhat.com>
2523 * binary.c: Convert to ISO C90 formatting.
2524 * coff-arm.c: Convert to ISO C90 formatting.
2525 * coffgen.c: Convert to ISO C90 formatting.
2526 * elf32-gen.c: Convert to ISO C90 formatting.
2527 * elf64-gen.c: Convert to ISO C90 formatting.
2528 * hash.c: Convert to ISO C90 formatting.
2529 * ieee.c: Convert to ISO C90 formatting.
2531 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2533 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2534 unresolved symbols in R_ARM_NONE relocations.
2536 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2538 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2539 UNRESOLVED_RELOC_P argument. Set it appropriately.
2540 (elf32_arm_relocate_section): Update call to
2541 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2542 unresolved_reloc instead.
2544 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2546 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2547 .gnu.warning.* sections.
2549 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2551 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2553 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2554 (elf_create_pointer_linker_section): Delete info parm. Don't make
2555 h dynamic. Don't set written_address_p.
2556 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2557 (bfd_put_ptr): Delete.
2558 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2559 Always write section contents. Assert global sym is def_regular.
2560 Use offset bottom bit as a written flag.
2561 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2564 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2566 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2567 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2570 2005-03-21 Nick Clifton <nickc@redhat.com>
2572 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2574 (t2a1_bx_pc_insn): Likewise.
2575 (t2a2_noop_insn): Likewise.
2576 (t2a3_b_insn): Likewise.
2577 (t2a1_push_insn): Likewise.
2578 (t2a2_ldr_insn): Likewise.
2579 (t2a3_mov_insn): Likewise.
2580 (t2a4_bx_insn): Likewise.
2581 (t2a5_pop_insn): Likewise.
2582 (t2a6_bx_insn): Likewise.
2583 (coff_arm_relocate_section): Only declare the high_address
2584 variable for non WINCE targets.
2586 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2588 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2589 SEC_LINKER_CREATED. Attach to dynobj.
2590 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2592 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2594 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2595 sym_offset. Add name, bss_name, sym_name, sym_val.
2596 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2597 Add sdata array of elf_linker_section_t.
2598 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2599 (enum elf_linker_section_enum): Delete.
2600 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2601 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2602 the special sections are needed. Adjust htab->sdata refs.
2603 Ensure dynobj is set in sreloc code.
2604 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2605 (ppc_elf_set_sdata_syms): New function.
2606 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2607 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2608 sym_val instead of sym_hash.
2609 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2611 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2613 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2614 (ppc_elf_merge_private_bfd_data): Likewise.
2616 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2618 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2619 (ppc_elf_create_linker_section): Don't create rel_section.
2620 (elf_create_pointer_linker_section): Don't size relocs.
2621 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2622 Don't generate relocs.
2623 (ppc_elf_relocate_section): Adjust calls to
2624 elf_finish_pointer_linker_section.
2626 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2628 * elf32-ppc.c (is_ppc_elf_target): New function.
2629 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2630 for bfd_target_elf_flavour. Do this test before endian check.
2631 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2632 (ppc_elf_size_dynamic_sections): Likewise.
2634 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2636 * elf-bfd.h (elf_backend_data): Add int to
2637 elf_backend_section_from_shdr.
2638 (bfd_elf_section_data): Update comment for this_idx.
2639 (_bfd_elf_make_section_from_shdr): Add int.
2640 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2642 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2643 and use it to set this_idx in bfd_elf_section_data.
2644 (bfd_section_from_shdr): Pass shindex to
2645 _bfd_elf_make_section_from_shdr.
2646 (_bfd_elf_section_from_bfd_section): Use this_idx in
2647 bfd_elf_section_data to find section index.
2649 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2650 index and pass it to _bfd_elf_make_section_from_shdr.
2651 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2652 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2653 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2654 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2655 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2656 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2657 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2658 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2659 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2661 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2662 Ross Ridge <rridge@csclub.uwaterloo.ca>
2664 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2665 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2668 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2670 * elflink.c (elf_mark_used_section): Remove check for special
2673 2005-03-18 Andreas Schwab <schwab@suse.de>
2675 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2676 from bfd_vma to ia64_insn, remove broken cast.
2678 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2680 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2681 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2682 elf_m68k_finish_dynamic_sections): Use it.
2684 2005-03-17 Paul Brook <paul@codesourcery.com>
2685 Dan Jacobowitz <dan@codesourcery.com>
2686 Mark Mitchell <mark@codesourcery.com>
2688 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2689 (elf32_arm_additional_program_headers): Likewise.
2690 (elf_backend_modify_segment_map): Define.
2691 (elf_backend_additional_program_headers): Likewise.
2692 (elf32_arm_symbian_modify_segment_map): Use
2693 elf32_arm_modify_segment_map.
2695 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2697 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2698 for special sections.
2700 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2702 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2703 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2704 section_sym_count param, and return number of section symbols.
2705 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2706 .dynsym contents. Don't bother calling swap_symbol_out on the
2707 first all-zero dynsym.
2708 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2709 special sections like bfd_abs_section.
2710 (bfd_elf_gc_sections): Spelling fix.
2712 2005-03-16 Fred Fish <fnf@specifixinc.com>
2715 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2716 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2718 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2720 * elflink.c (elf_mark_used_section): New.
2721 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2722 non-relocatable link if we don't do GC.
2724 2005-03-16 Nick Clifton <nickc@redhat.com>
2725 Ben Elliston <bje@au.ibm.com>
2727 * configure.in (werror): New switch: Add -Werror to the
2728 compiler command line. Enabled by default. Disable via
2730 * configure: Regenerate.
2732 2005-03-16 Nick Clifton <nickc@redhat.com>
2734 * ecoff.c: Convert to ISO C90 formatting.
2736 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2738 * elf32-ppc.c: Divide file into general and linker specific
2739 functions. Sort linker functions into roughly the order in which
2740 they are called by the ELF linker code.
2742 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2744 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2745 on section. Correct comment, and add FIXME.
2746 (ppc_elf_additional_program_headers): Don't bump header count for
2747 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2748 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2749 do allocate memory if they need it.
2751 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2753 * config.bfd (x86_64-elf): Add target.
2755 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2757 * po/es.po: Commit new Spanish translation.
2759 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2761 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2762 for global symbol when reporting overflow.
2764 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2766 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2767 * libbfd.h: Rebuilt.
2768 * archive.c (_bfd_ar_spacepad): New function.
2769 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2770 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2771 coff_write_armap): Use it.
2772 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2774 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2776 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2778 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2779 has_table to the start of the function.
2781 2005-03-10 Ben Elliston <bje@au.ibm.com>
2783 * archive.c: Include hashtab.h.
2784 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2785 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2786 (hash_file_ptr): New function.
2787 (eq_file_ptr): Likewise.
2788 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2789 * libbfd-in.h: Include hashtab.h.
2790 (struct artdata): Change `cache' member type to htab_t.
2791 * libbfd.h: Rebuild.
2793 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2795 * configure.in: Bump version to 2.16.90.
2796 * configure: Regenerated.
2798 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2800 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2801 close is a function like macro in system headers.
2803 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2806 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2807 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2809 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2811 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2813 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2815 * po/bfd.pot: Regenerate.
2817 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2819 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2821 (func_desc_adjust): Force dot-syms local in executables as well
2824 2005-03-04 David Daney <ddaney@avtrex.com>
2826 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2827 '__gnu_local_gp' symbol used by gas -mno-shared.
2829 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2831 * elf-bfd.h (elf_backend_data): Add "const char *" to
2832 elf_backend_section_from_phdr.
2834 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2835 elf_backend_section_from_phdr hook.
2837 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2838 Joseph Myers <joseph@codesourcery.com>
2840 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2841 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2843 (struct mips_elf_got_per_bfd_arg): Add global_count.
2844 (struct mips_elf_count_tls_arg): New.
2845 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2846 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2847 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2848 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2849 (TLS_RELOC_P): Define.
2850 (TP_OFFSET, DTP_OFFSET): Define.
2851 (dtprel_base, tprel_base): New functions.
2852 (mips_elf_link_hash_newfunc): Initialize tls_type.
2853 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2854 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2856 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2857 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2858 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2859 (mips_tls_got_index): New functions.
2860 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2861 arguments. Pass them to mips_elf_create_local_got_entry. Use
2863 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2865 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2866 mips_elf_create_local_got_entry.
2867 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2868 arguments. Handle TLS entries.
2869 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2870 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2872 (mips_elf_record_global_got_symbol): Likewise.
2873 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2875 (mips_elf_merge_gots): Handle TLS entries when merging.
2876 (mips_elf_initialize_tls_index): New function.
2877 (mips_elf_set_global_got_offset): Handle TLS entries.
2878 (mips_elf_adjust_gp): Handle TLS.
2879 (mips_elf_multi_got): Remove redundant call to
2880 mips_elf_resolve_final_got_entries. Initialize global_count.
2881 Correct a comment. Initialize new TLS members of mips_got_info.
2882 Assign TLS GOT indexes for new GOTs.
2883 (mips_elf_create_got_section): Initialize new TLS members of
2885 (mips_elf_calculate_relocation): Handle TLS relocs.
2886 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2888 (_bfd_mips_elf_always_size_sections): Handle TLS.
2889 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2890 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2892 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2893 (_bfd_mips_elf_hide_symbol): Handle TLS.
2894 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2895 (mips_reloc_map): Add TLS relocs.
2896 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2897 * elf64-mips.c (mips_elf64_howto_table_rel)
2898 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2899 * reloc.c: Define new MIPS TLS relocations.
2900 * libbfd.h, bfd-in2.h: Regenerated.
2902 2005-03-02 Jan Beulich <jbeulich@novell.com>
2904 * Makefile.am: Add dependency of cache.o on libiberty.h.
2905 * cache.c: Include libiberty.h.
2906 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2908 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2910 * elf.c (bfd_section_from_shdr <default case>): Call
2911 elf_backend_section_from_shdr hook unconditionally, and return
2913 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2914 * elfxx-target.h (elf_backend_section_from_shdr)
2915 (elf_backend_section_from_phdr): Default to
2916 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2919 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2921 * targets.h: Typo fix.
2922 * bfd-in2.h: Regenerate.
2924 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2925 structs to size on-disk structures.
2926 (b_out_set_section_contents): Size the external struct, not the
2927 internal one for on-disk size.
2928 (b_out_sizeof_headers): Likewise.
2930 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2932 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2933 entry points with the func descriptor as well as undefweak.
2935 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2937 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2938 present when IMPORT_NAME_UNDOECRATE is used.
2940 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2943 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2946 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2947 to _bfd_elf_merge_symbol.
2949 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2950 unsigned int to return the alignment of the old common symbol
2951 in the dynamic object.
2952 (_bfd_elf_add_default_symbol): Pass NULL to
2953 _bfd_elf_merge_symbol.
2954 (elf_link_add_object_symbols): Pass &old_alignment to
2955 _bfd_elf_merge_symbol. Get the alignment of the new common
2956 symbol in the dynamic object.
2958 2005-02-24 Ben Elliston <bje@au.ibm.com>
2960 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2961 * format.c (bfd_check_format_matches): Likewise.
2962 * archive.c (BFD_GNU960_ARMAG): Likewise.
2963 (bfd_generic_archive_p): Likewise.
2964 (_bfd_write_archive_contents): Likewise.
2966 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2968 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2969 * configure: Regenerate.
2971 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2973 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2974 COMDAT group sections to have default visibility.
2976 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2978 * coffcode.h (coff_print_aux): Warning fix.
2979 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2980 instead of section pointer to identify.
2981 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2982 the correct size buffer for local sym mangling too.
2983 (h8300_bfd_link_add_symbols): Likewise.
2984 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2986 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2987 * elf32-xtensa.c (literal_value_hash): Warning fix.
2988 * versados.c (process_otr): Warning fix.
2989 (versados_canonicalize_reloc): Likewise.
2990 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2991 * vms.c (fill_section_ptr): Warning fix.
2993 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2995 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2996 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2998 2005-02-23 Nick Clifton <nickc@redhat.com>
3000 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3001 the relvaddr field of the Elf32_crinfo structure.
3003 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3004 variables that are passed by reference to
3005 m68hc11_get_relocation_value in case that function does not
3008 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3009 return statements and replace with a single return at the end of
3010 the function. This helps pacify the flow analysis code in gcc 4.0.
3012 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3013 strtab to avoid compile time warning.
3015 2005-02-23 Ben Elliston <bje@au.ibm.com>
3017 * opncls.c (bfd_zalloc): Document this function.
3019 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3021 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3022 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3023 Replace SEC_SHARED with SEC_COFF_SHARED.
3024 (styp_to_sec_flags): Likewise.
3026 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3027 (TARGET_LITTLE_SYM): Likewise.
3029 * section.c (SEC_ARCH_BIT_0): Removed.
3030 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3031 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3032 (SEC_SHARED): Renamed to ...
3033 (SEC_COFF_SHARED): This.
3034 (SEC_BLOCK): Renamed to ...
3035 (SEC_TIC54X_BLOCK): This.
3036 (SEC_CLINK): Renamed to ...
3037 (SEC_TIC54X_CLINK): This.
3038 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3039 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3041 * bfd-in2.h: Regenerated.
3043 2005-02-21 Fred Fish <fnf@specifixinc.com>
3045 * dwarf2.c (find_abstract_instance_name): Call recursively
3046 to handle a DW_AT_specification.
3048 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3050 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3051 mips_elf_create_dynamic_relocation,
3052 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3053 Remove #if 0'd code.
3055 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3057 * Makefile.am: Run "make dep-am"
3058 * Makefile.in: Regenerate.
3060 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3062 * coffgen.c (bfd_coff_get_comdat_section): Check that
3063 coff_section_data isn't NULL.
3065 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3067 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3068 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3069 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3070 useless assignments.
3071 (xcoff_write_archive_contents_big): Likewise.
3072 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3073 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3074 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3075 * cofflink.c (process_embedded_commands): Warning fixes.
3076 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3078 * dwarf2.c: Warning fixes.
3079 * elf-bfd.h: Likewise.
3080 * elf-eh-frame.c: Likewise.
3081 * elf-strtab.c: Likewise.
3083 * elf32-m68k.c: Likewise.
3084 * elf32-ppc.c: Likewise.
3085 * elf32-sh-symbian.c: Likewise.
3086 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3087 * elf64-sh64.c: Likewise.
3088 * peicode.h: Likewise.
3089 * elf64-mmix.c: Warning fixes.
3090 * elfcode.h: Likewise.
3091 * elfxx-mips.c: Likewise.
3092 * libbfd-in.h: Likewise.
3093 * libbfd.c: Likewise.
3094 * mach-o.c: Likewise.
3095 * merge.c: Likewise.
3097 * opncls.c: Likewise.
3100 * vms-hdr.c: Likewise.
3101 * vms-tir.c: Likewise.
3102 * xtensa-isa.c: Likewise.
3103 * xtensa-modules.c: Likewise.
3105 (pstrcmp): Use correct choice of string lengths. Fix return value.
3106 (bfd_sym_module_name): Correct string length.
3107 * bfd-in2.h: Regenerate.
3108 * libbfd.h: Regenerate.
3110 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3112 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3113 uninitialized check_segment[1] in TLSMOFF case.
3114 Reported by Alan Modra.
3115 (elf32_frv_relocate_section): Improve errors and warnings.
3117 2005-02-17 Alan Modra <amodra@bigpond.net.au>
3119 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3121 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3123 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3124 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3125 * pef.c (bfd_pef_scan): Don't ignore return value of
3126 bfd_pef_scan_start_address.
3127 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3128 bfd_mach_o_scan_start_address.
3129 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3130 * elfxx-mips.c: Remove unnecessary prototypes.
3131 (sort_dynamic_relocs_64): Abort if not BFD64.
3133 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3135 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3136 Skip toc reloc adjust if reloc_count is zero.
3138 2005-02-15 Nigel Stephens <nigel@mips.com>
3139 Maciej W. Rozycki <macro@mips.com>
3141 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3142 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3143 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3144 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3145 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3147 (mips16_gprel_reloc): Remove bit shuffling; call
3148 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3149 and _bfd_mips16_elf_reloc_shuffle() instead.
3150 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3151 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3153 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3154 elf_mips16_howto_table_rel.
3155 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3156 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3157 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3158 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3159 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3161 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3162 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3163 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3165 (mips16_gprel_reloc): Remove bit shuffling; call
3166 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3167 and _bfd_mips16_elf_reloc_shuffle() instead.
3168 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3169 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3171 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3172 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3173 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3174 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3175 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3176 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3177 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3179 (mips16_gprel_reloc): Remove bit shuffling; call
3180 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3181 and _bfd_mips16_elf_reloc_shuffle() instead.
3182 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3183 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3185 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3186 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3187 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3188 handle bit shuffling for MIPS16 relocs.
3189 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3190 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3191 and _bfd_mips16_elf_reloc_shuffle().
3192 (_bfd_mips_elf_generic_reloc): Likewise.
3193 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3195 (mips_elf_obtain_contents): Remove bit shuffling.
3196 (mips_elf_perform_relocation): Likewise; call
3197 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3199 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3201 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3202 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3203 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3204 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3205 (BFD_RELOC_MIPS16_LO16): Likewise.
3206 * bfd-in2.h: Regenerate.
3207 * libbfd.h: Regenerate.
3209 2005-02-15 Jan Beulich <jbeulich@novell.com>
3211 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3212 R_IA64_DTPMOD64[LM]SB.
3214 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3216 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3217 backward branch in the same section.
3218 (elfNN_ia64_relocate_section): Inform users that the input
3219 section is too big to relax br instruction when overflow
3220 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3221 and R_IA64_PCREL21F.
3223 2005-02-14 Orjan Friberg <orjanf@axis.com>
3225 * elfcore.h (elf_core_file_p): Move the call to
3226 elf_backend_object_p to allow the correct machine to be set before
3227 processing the program headers.
3229 2005-02-14 Nick Clifton <nickc@redhat.com>
3232 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3233 aware flag from the input bfd to the output bfd.
3235 2005-02-11 Maciej W. Rozycki <macro@mips.com>
3237 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3238 R_MIPS_LITERAL relocations for external symbols.
3239 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3240 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3242 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3244 * bfd-in2.h: Rebuilt.
3246 2005-02-11 Paul Brook <paul@codesourcery.com>
3248 * elf-bfd.h (struct elf_link_hash_table): Add
3249 is_relocatable_executable.
3250 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3251 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3252 symbols in relocatable executables.
3253 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3254 relocatable executables.
3255 (_bfd_elf_link_renumber_dynsyms): Ditto.
3256 (bfd_elf_final_link): Ditto.
3257 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3258 relocations into relocatable executables.
3259 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3260 executables. Also copy absolute relocations.
3261 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3262 in relocatable executables.
3263 (allocate_dynrelocs): Copy relocations for relocatable executables.
3264 Output dynamic symbols for symbols defined in linker scripts.
3266 2005-02-11 Nick Clifton <nickc@redhat.com>
3268 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3269 to avoid a compile time warning.
3271 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3274 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3275 inclusion of coffcode.h so that it is actually picked up.
3277 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3278 case it is not used.
3280 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3281 structure and macro.
3283 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3286 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3287 to protect the declaration of this array.
3289 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3290 Avoid call to memcpy with a size of 0.
3292 2005-02-12 Alan Modra <amodra@bigpond.net.au>
3294 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3295 old-style branches to undefined dot-symbols which will be
3296 satisfied by a plt call.
3298 2005-02-11 Alan Modra <amodra@bigpond.net.au>
3300 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3301 (ppc64_elf_copy_indirect_symbol): ..here.
3302 (func_desc_adjust): Use move_plt_plist.
3304 2005-02-10 Paul Brook <paul@codesourcery.com>
3306 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3308 2005-02-10 Paul Brook <paul@codesourcery.com>
3310 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3312 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3313 (elf_link_renumber_local_hash_table_dynsyms): New function.
3314 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3316 2005-02-10 Jakub Jelinek <jakub@redhat.com>
3318 * bfd-in.h (BFD_LINKER_CREATED): Define.
3319 * bfd-in2.h: Rebuilt.
3320 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3321 BFD_LINKER_CREATED bfds when determining input bfds without
3322 .note.GNU-stack section.
3324 2005-02-10 Maciej W. Rozycki <macro@mips.com>
3326 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3327 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3328 relocations against external symbols unchanged.
3330 2005-02-08 Paul Brook <paul@codesourcery.com>
3332 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3335 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
3337 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3340 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3342 * elf64-mips.c: Fix formatting throughout.
3344 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3346 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3348 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
3350 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3351 *ABS*/*UND* sections.
3352 (elf32_frv_relocate_section): Move zero-addend-required error...
3353 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3354 missing needed TLS section.
3356 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
3358 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3359 being the last symbol.
3360 (aout_link_add_symbols): Just return TRUE if a warning
3363 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3365 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3366 R_MIPS_GPREL32 relocations against external symbols.
3367 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3370 2005-02-07 Alan Modra <amodra@bigpond.net.au>
3372 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3373 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3374 elf_string_from_elf_strtab.
3375 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3376 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3377 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3378 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3379 looking at cached symtab info first, before iterating over headers.
3380 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3381 * elfcode.h (elf_object_p): Don't load section header stringtab
3384 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3386 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3387 against protected function when building shared library.
3390 * elf64-x86-64.c (is_32bit_relative_branch): New.
3391 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3392 protected function symbol when building shared library for
3393 32bit relative branch instruction.
3395 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3397 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3398 syms when doing a relocatable link.
3399 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3401 (ppc64_elf_tls_setup): Likewise.
3402 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3404 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3406 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3407 (link_hash_newfunc): Clear all locals using memset.
3408 (make_fdh): Remove flags param. Always create fake func desc
3409 weak. Link the descriptor with the code entry sym.
3410 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3411 (add_symbol_adjust): Adjust make_fdh call.
3412 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3413 descriptor to strong undefined if code entry is strong.
3415 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3417 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3418 lookup here. Set to new before calling bfd_link_repair_undef_list.
3419 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3421 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3423 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3425 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3427 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3428 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3429 before the as-needed lib was loaded. Abort on unexpected refs.
3431 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3433 * elflink.c (elf_smash_syms): Expand comments.
3434 (elf_link_add_object_symbols): Only call elf_smash_syms for
3435 as-needed dynamic objects.
3437 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3438 everything, just the field specific to ia64.
3439 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3441 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3443 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3444 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3446 (struct add_symbol_adjust_data): New.
3447 (add_symbol_adjust): Make an undefweak func desc for old ABI
3448 objects to link with --as-needed shared libs. Return fail status.
3449 Don't adjust old ABI func entry sym to weak if func desc syms
3451 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3454 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3456 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3459 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3461 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3462 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3463 remove anything but new and undefweak.
3464 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3466 (_bfd_elf_create_dynamic_sections): Formatting.
3467 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3468 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3469 (struct elf_smash_data): New.
3470 (elf_smash_syms): New function.
3471 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3472 unneeded dynamic objects to loaded list.
3473 (elf_link_output_extsym): Don't handle as-needed here. Strip
3474 bfd_link_hash_new symbols.
3475 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3476 delref when dynindx is already -1.
3477 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3479 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3481 2005-02-01 Ben Elliston <bje@au.ibm.com>
3483 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3485 2005-02-01 Ben Elliston <bje@au.ibm.com>
3487 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3488 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3489 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3490 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3491 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3492 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3493 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3494 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3495 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3496 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3497 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3498 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3499 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3500 throughout. Similarly, collapse #if 1'd code.
3502 2005-02-01 Ben Elliston <bje@au.ibm.com>
3504 * elf-bfd.h (bfd_elf_discard_group): Remove.
3505 * elf.c (bfd_elf_discard_group): Likewise.
3506 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3508 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3510 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3511 (_bfd_elf_eh_frame_address_size): Declare.
3512 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3513 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3514 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3515 (elf_backend_eh_frame_address_size): Define.
3516 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3517 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3518 size from the new backend hook.
3519 (_bfd_elf_write_section_eh_frame): Likewise.
3520 (_bfd_elf_eh_frame_address_size): New function.
3522 2005-01-31 Andrew Cagney <cagney@gnu.org>
3524 * configure: Regenerate to track ../gettext.m4.
3526 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3528 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3529 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3531 2005-01-31 Nick Clifton <nickc@redhat.com>
3533 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3534 sparc-lynxos, vax-vms) be obsolete.
3536 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3538 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3539 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3540 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3541 * elfcode.h (elf_object_p): Use minpagesize instead of
3543 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3544 (elfNN_bed): Include ELF_MINPAGESIZE.
3546 2005-01-28 Julian Brown <julian@codesourcery.com>
3548 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3549 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3550 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3551 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3552 passing flag value from ld. Set flag value in global hash table entry.
3553 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3556 2005-01-27 Andrew Cagney <cagney@gnu.org>
3558 * configure: Regenerate to track ../gettext.m4 change.
3560 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3562 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3565 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3567 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3568 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3570 * reloc.c: Add R_FRV_TLSMOFF.
3571 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3572 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3573 (elf32_frv_relocate_section): Handle it.
3574 (elf32_frv_check_relocs): Likewise.
3575 * libbfd.h, bfd-in2.h: Rebuilt.
3576 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3577 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3578 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3579 such that they return the constant in gr9.
3580 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3582 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3583 too, such that they shrink on relaxation.
3584 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3585 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3586 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3587 if we can guarantee the use of 16-bit constants.
3588 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3589 Introduce TLS support for FR-V FDPIC.
3590 * reloc.c: Add TLS relocations.
3591 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3592 (elf32_frv_rel_tlsdesc_value_howto): New.
3593 (elf32_frv_rel_tlsoff_howto): New.
3594 (frv_reloc_map): Add new mappings.
3595 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3597 (frvfdpic_dynamic_got_plt_info): New.
3598 (frvfdpic_plt_tls_ret_offset): New.
3599 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3600 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3601 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3602 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3604 (struct frvfdpic_relocs_info): Add TLS fields.
3605 (frvfdpic_relocs_info_hash): Warning clean up.
3606 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3607 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3608 (FRVFDPIC_TLS_BIAS): Define.
3609 (tls_biased_base): New.
3610 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3612 (frv_reloc_type_lookup): Likewise.
3613 (frvfdpic_info_to_howto_rel): Likewise.
3614 (elf32_frv_relocate_section): Likewise.
3615 (_frv_create_got_section): Create the PLT section here.
3616 (elf32_frvfdpic_create_dynamic_sections): Not here.
3617 (_frvfdpic_count_nontls_entries): Move out of...
3618 (_frvfdpic_count_got_plt_entries): ... here.
3619 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3620 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3622 (_frvfdpic_relax_tls_entries): New.
3623 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3624 (_frvfdpic_get_tlsdesc_entry): New.
3625 (_frvfdpic_assign_got_entries): Add TLS support.
3626 (_frvfdpic_assign_plt_entries): Likewise.
3627 (_frvfdpic_reset_got_plt_entries): New.
3628 (_frvfdpic_size_got_plt): Move out of...
3629 (elf32_frvfdpic_size_dynamic_sections): ... here.
3630 (_frvfdpic_relax_got_plt_entries): New.
3631 (elf32_frvfdpic_relax_section): New.
3632 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3633 (elf32_frv_check_relocs): Add TLS support.
3634 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3635 * libbfd.h, bfd-in2.h: Rebuilt.
3637 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3639 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3640 loadable reloc sections.
3641 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3642 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3644 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3646 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3647 sections immediately when linking shared libs. Instead, wait until
3648 we know a lib is needed.
3649 (_bfd_elf_link_create_dynstrtab): Extract from..
3650 (_bfd_elf_link_create_dynamic_sections_): ..here.
3651 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3652 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3653 for non-existent .dynamic.
3654 (elf_link_output_extsym): Don't complain about undefined symbols
3655 in as-needed dynamic libs that aren't actually linked.
3657 2005-01-24 Andrew Cagney <cagney@gnu.org>
3659 * configure: Regenerate, ../gettext.m4 was updated.
3661 2005-01-21 Ben Elliston <bje@au.ibm.com>
3663 * aout-encap.c: Remove unused file.
3665 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3668 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3669 non-function symbols are local.
3670 (_bfd_elf_symbol_refs_local_p): Likewise.
3672 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3674 * bfd.c (bfd_link_just_syms): Add abfd param.
3675 * bfd-in2.h: Regenerate.
3677 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3679 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3680 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3681 instructions. If the amount of padding is known, reduce the size
3682 of the CIE or FDE by that amount.
3684 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3686 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3687 augmentation_size. Use bfd_signed_vmas for data_align.
3688 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3689 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3690 functions. Don't read past the end of the enclosing CIE or FDE.
3691 (skip_bytes): New utility function.
3692 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3694 (_bfd_elf_write_section_eh_frame): Use new functions.
3696 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3698 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3699 assert-style REQUIRE() macro to handle sanity checks.
3701 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3703 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3705 (read_unsigned_leb128): Removed.
3706 (read_signed_leb128): Removed.
3707 (find_abstract_instance_name): Updated.
3708 (parse_comp_unit): Accept info_ptr_unit.
3709 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3710 comp unit and pass it to parse_comp_unit.
3712 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3713 (read_signed_leb128): Moved to ...
3716 * libbfd-in.h (read_unsigned_leb128): New prototype.
3717 (read_signed_leb128): Likewise.
3718 * libbfd.h: Regenerated.
3720 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3721 Nick Clifton <nickc@redhat.com>
3723 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3724 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3725 arch_sh4a_nofpu_up in order to match the external names and make the
3726 testsuite's job easier.
3727 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3729 * bfd-in2.h: Regenerate.
3731 2005-01-15 Andrew Cagney <cagney@gnu.org>
3734 * acinclude.m4: Move BFD_NEED_DECLARATION,
3735 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3736 the new file bfd.m4. Include ../bfd/bfd.m4.
3737 * configure: Re-generate.
3739 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3741 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3742 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3744 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3745 R_PPC_RELAX32PC_PLT.
3747 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3749 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3751 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3752 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3753 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3754 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3755 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3756 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3757 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3758 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3759 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3760 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3761 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3762 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3763 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3764 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3766 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3768 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3771 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3773 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3774 * bfd-in2.h: Regenerate.
3775 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3776 to support these new machine values.
3777 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3779 (bfd_maxq_arch): Update values for the maxq20.
3781 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3783 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3784 non-shared object, do not reserve space in .plt and .rela.plt for
3785 regular symbols neither defined nor referenced in shared objects.
3787 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3789 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3790 to zero the structure.
3791 (create_got_section): Use BFD_ASSERT instead of abort.
3792 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3794 (create_got_section): New function.
3795 (sparc64_elf_create_dynamic_sections): Likewise.
3796 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3797 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3798 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3799 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3800 (sparc64_elf_finish_dynamic_symbol): Likewise.
3801 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3802 (elf_backend_create_dynamic_sections): Define to
3803 sparc64_elf_create_dynamic_sections.
3805 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3807 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3808 (elf_backend_omit_section_dynsym): Define to it.
3809 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3810 (elf_backend_omit_section_dynsym): Define to it.
3812 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3814 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3815 PT_DYNAMIC segment, unless .dynamic.
3817 2005-01-06 Paul Brook <paul@codesourcery.com>
3819 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3820 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3821 * configure: Regenerate.
3822 * elf32-arm.c: Add VxWorks target bfd.
3824 (elf32_arm_link_hash_table): Add use_rel.
3825 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3826 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3827 Correct offset calculation for RELA case.
3828 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3829 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3830 (elf32_arm_vxworks_link_hash_table_create): New function.
3831 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3832 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3833 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3835 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3837 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3839 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3840 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3841 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3842 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3843 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3844 (toc_adjusting_stub_needed): Rewrite.
3845 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3846 toc tests. Adjust for toc_adjusting_stub_needed changes.
3847 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3848 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3849 * section.c: Expand comment on backend bits.
3850 * bfd-in2.h: Regenerate.
3851 * libbfd.h: Regenerate.
3853 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3855 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3856 toc adjusting stub, do not test source section flags.
3858 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3860 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3861 from STABS debugging sections again.
3863 2005-01-05 Fred Fish <fnf@specifixinc.com>
3865 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3866 (find_abstract_instance_name): New function.
3867 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3868 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3869 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3871 2004-12-31 Paul Brook <paul@copdesourcery.com>
3873 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3875 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3877 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3878 Commit missing changes from 2004-12-22.
3879 * bfd-in2.h: Regenerate.
3881 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3883 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3885 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3887 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3888 Add 'base' argument for constructing register sections. Reformat.
3889 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3890 gp and fp regs. Reformat.
3892 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3894 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3895 * bfd-in2.h: Regenerate.
3896 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3897 (avr_reloc_map): Likewise.
3898 (avr_final_link_relocate): Likewise.
3900 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3902 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3903 as-needed dynamic libs as undefined.
3904 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3905 libs when finding they are needed.
3907 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3909 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3910 (opd_entry_value): Use opd_relocs if available.
3911 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3912 copy .opd relocations to opd_relocs.
3913 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3915 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3917 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3918 * elf32-v850.c (v850_elf_howto_table): Add entry for
3919 R_V850_LO16_SPLIT_OFFSET.
3920 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3921 (v850_elf_perform_lo16_relocation): New function, extracted from...
3922 (v850_elf_perform_relocation): ...here. Use it to handle
3923 R_V850_LO16_SPLIT_OFFSET.
3924 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3925 R_V850_LO16_SPLIT_OFFSET.
3926 * libbfd.h, bfd-in2.h: Regenerate.
3928 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3930 * config.bfd: Add s390x-ibm-tpf support.
3932 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3934 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3935 to prototype, to make hash info available.
3936 Prevent wrapped symbols from being adjusted twice.
3938 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3940 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3941 overflow for calls to undefined weak symbols.
3943 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3945 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3946 canonical sections syms have a name.
3948 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3950 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3951 have been adjusted for output.
3952 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3954 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3956 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3957 add symtab_hdr param.
3958 (group_signature): Update calls.
3959 * elf-bfd.h (bfd_elf_sym_name): Update.
3960 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3961 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3962 (ppc64_elf_relocate_section): Update.
3963 * elflink.c (elf_link_input_bfd): Update.
3965 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3967 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3968 st_shndx on STT_SECTION sections.
3970 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3972 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3973 ELF section symbols.
3975 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3977 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3978 return a real value, unless it is a PLT symbol.
3979 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3982 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3983 R_MIPS_JALR entry to 0.
3985 * archures.c: Define bfd_mach_mips9000.
3986 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3987 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3988 * cpu-mips.c (I_mips9000): Define.
3989 (arch_info_struct): Add case for bfd_mach_mips9000.
3990 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3991 * bfd-in2.h: Regenerate.
3993 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3995 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3998 2004-12-07 Ben Elliston <bje@gnu.org>
4000 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4002 2004-12-06 Daniel Jacobowitz <dan@debian.org>
4004 Suggested by Fergal Daly <fergal@esatclear.ie>:
4005 * simple.c (simple_dummy_multiple_definition): New function.
4006 (bfd_simple_get_relocated_section_contents): Use it.
4008 2004-12-03 Jan Beulich <jbeulich@novell.com>
4010 * elf.c (elf_find_function): Don't use the last file symbol ever,
4011 seen, but the last one seen prior to the symbol being reported.
4012 Don't report a filename at all for global symbols when that might
4015 2004-12-01 Paul Brook <paul@codesourcery.com>
4017 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4018 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4021 2004-12-01 Paul Brook <paul@codesourcery.com>
4023 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4026 2004-11-30 Paul Brook <paul@codesourcery.com>
4028 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4029 no_pipeline_knowledge
4030 (elf32_arm_link_hash_table_create): Ditto.
4031 (bfd_elf32_arm_process_before_allocation): Ditto.
4032 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4034 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4036 * bfd-in2.h: Regenerate.
4038 2004-11-30 Randolph Chung <tausq@debian.org>
4040 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4041 (elf32_hppa_grok_psinfo): New function.
4042 (elf_backend_grok_prstatus): Define.
4043 (elf_backend_grok_psinfo): Define.
4045 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4048 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4050 2004-11-24 Paul Brook <paul@codesourcery.com>
4052 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4054 2004-11-24 Paul Brook <paul@codesourcery.com>
4056 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4057 (elf32_arm_swap_symbol_out): New function.
4058 (elf32_arm_size_info): Add.
4059 (elf_backend_size_info): Define.
4061 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4063 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4066 2004-11-19 Alan Modra <amodra@bigpond.net.au>
4068 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4069 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4070 * nlmcode.h (nlm_write_object_contents): Warning fix.
4072 2004-11-18 Bob Wilson <bob.wilson@acm.org>
4074 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4076 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4078 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4079 (elf32_arm_plt_thumb_stub): New.
4080 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4082 (elf32_arm_link_hash_traverse): Fix typo.
4083 (elf32_arm_link_hash_table): Add obfd.
4084 (elf32_arm_link_hash_newfunc): Initialize new fields.
4085 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4086 (elf32_arm_link_hash_table_create): Initialize obfd.
4087 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4088 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4089 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4090 interworking BFD is not dynamic.
4091 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4092 not emit glue for PLT references.
4093 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4094 emit glue for PLT references. Support the Thumb PLT prefix.
4095 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4097 (elf32_arm_check_relocs): Likewise.
4098 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4100 (allocate_dynrelocs): Handle Thumb PLT references.
4101 (elf32_arm_finish_dynamic_symbol): Likewise.
4102 (elf32_arm_symbol_processing): New function.
4103 (elf_backend_symbol_processing): Define.
4105 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4107 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4108 add_fde_encoding. Remove need_relative.
4109 * elf-eh-frame.c (extra_augmentation_string_bytes)
4110 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4111 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4112 in cases where the CIE has no existing 'R' augmentation. Use
4113 size_of_output_cie_fde when assigning offsets. Use the final offset
4114 as the new section size.
4115 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4116 Account for any extra augmentation bytes in the returned offset.
4117 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4118 moved before being modified. Pad growing entries with DW_CFA_nops.
4119 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4120 and add_fde_encoding.
4122 2004-11-15 Mark Mitchell <mark@codesourcery.com>
4124 * elf32-arm.c (elf32_arm_relocate_section): Use
4125 arm_real_reloc_type.
4127 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4129 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4130 for discard relocations; don't add an R_MIPS_NONE to the main body
4133 2004-11-04 Paul Brook <paul@codesourcery.com>
4135 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4136 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4137 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4138 default version definition for unversioned symbols.
4139 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4140 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4141 _bfd_elf_slurp_version_tables. Set default version for unversioned
4144 2004-11-15 Paul Brook <paul@codesourcery.com>
4146 * elflink.c (elf_link_add_object_symbols): Don't assume version
4147 indices are consecutive.
4149 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
4151 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4152 composite relocations against the personality data.
4154 2004-11-13 Paul Brook <paul@codesourcery.com>
4156 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4157 R_ARM_PREL31 relocations to PLT entries.
4158 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4159 (elf32_arm_check_relocs): Ditto.
4161 2004-11-12 Bob Wilson <bob.wilson@acm.org>
4163 * xtensa-isa.c (xtensa_interface_class_id): New.
4165 2004-11-11 Bob Wilson <bob.wilson@acm.org>
4167 * elf32-xtensa.c (property_table_compare): Remove assertion about
4168 entries with the same address and non-zero size.
4169 (xtensa_read_table_entries): Report such entries as errors.
4171 2004-11-11 Mark Mitchell <mark@codesourcery.com>
4173 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4174 R_ARM_RELATIVE on Symbian OS.
4176 2004-11-09 Mark Mitchell <mark@codesourcery.com>
4178 * som.c (som_bfd_print_private_bfd_data): New function.
4179 (som_object_setup): Save the auxiliary header. Don't assume that
4180 zero is an invalid entry point for a shared library.
4181 (som_object_p): Allocate the auxiliary header on the heap.
4183 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4185 (elf32_arm_symbian_modify_segment_map): Likewise.
4187 2004-11-09 Daniel Jacobowitz <dan@debian.org>
4189 From David Poole <daveml@mbuf.com>:
4190 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4191 (elf32_arm_size_dynamic_sections): Call it.
4193 2004-11-09 Alan Modra <amodra@bigpond.net.au>
4195 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4196 (ALL_MACHINES_CFILES): Fix typo.
4197 * Makefile.in: Regenerate.
4198 * po/SRC-POTFILES.in: Regenerate.
4200 2004-11-08 Mark Mitchell <mark@codesourcery.com>
4202 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4203 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4204 symbol in the relocation.
4206 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4207 Vineet Sharma <vineets@noida.hcltech.com>
4209 * coff-maxq.c: New File.
4210 * cpu-maxq.c: New File.
4211 * coffcode.h: Likewise.
4212 * config.bfd: Likewise.
4213 * configure.in (maxqcoff_vec): New target vector.
4214 * Makefile.am: Add support for maxq target.
4215 * configure.in: Likewise.
4216 * archures.c:. Likewise.
4217 * targets.c: Likewise.
4218 * bfd_in2.h : Regenerated.
4219 * Makefile.in: Regenerated.
4220 * configure: Regenerated.
4221 * doc/Makefile.in: Regenerated.
4223 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4225 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4226 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4227 C_NT_WEAK aux entries.
4228 (_bfd_coff_generic_relocate_section): Handle undefined
4231 2004-11-07 Andreas Schwab <schwab@suse.de>
4233 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4234 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4235 non-default visibility.
4237 2004-11-01 Mark Mitchell <mark@codesourcery.com>
4239 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4241 (elf32_arm_symbian_modify_segment_map): Don't
4242 reset includes_filehdr and includes_phdrs here.
4244 2004-11-04 Daniel Jacobowitz <dan@debian.org>
4246 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4247 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4248 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4250 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4251 to a new removed list. Remove normal configuration stanzas.
4252 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4253 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4254 elfarm-nabi.lo with elf32-arm.lo.
4255 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4256 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4257 * elf32-arm.h: Remove.
4258 * elfarm-oabi.c: Remove.
4259 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4260 and bfd_elf32_littlearm_oabi_vec.
4261 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4263 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
4265 * config.bfd: Support crisv32-*-* like cris-*-*.
4266 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4267 (bfd_mach_cris_v10_v32): New macros.
4268 * cpu-cris.c: Tweak formatting.
4269 (get_compatible): New function.
4271 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4272 bfd_arch_info_type:s.
4273 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4274 get_compatible for member compatible and link bfd_cris_arch_v32 as
4276 * elf32-cris.c (cris_elf_pcrel_reloc)
4277 (cris_elf_set_mach_from_flags): New functions.
4278 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4279 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4280 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4281 numbers for bfd_mach_cris_v32.
4282 (PLT_ENTRY_SIZE_V32): New macro.
4283 (elf_cris_plt0_entry): Drop last comma in initializer.
4284 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4285 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4287 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4289 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4290 (elf_cris_finish_dynamic_sections): Similar.
4291 (elf_cris_adjust_dynamic_symbol): Similar.
4292 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4294 <switch with PIC relocs>: Emit error and return FALSE for
4295 bfd_mach_cris_v10_v32.
4296 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4297 Emit warning when generating textrel reloc.
4298 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4299 (cris_elf_final_write_processing): Set flags according to mach.
4300 (cris_elf_print_private_bfd_data): Display
4301 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4302 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4303 new_flags. Don't call cris_elf_final_write_processing. Don't
4304 look at the actual elf header flags at all; use
4305 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4306 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4308 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4309 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4310 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4311 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4312 * bfd-in2.h, libbfd.h: Regenerate.
4314 2004-11-04 Alan Modra <amodra@bigpond.net.au>
4316 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4317 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4319 (struct adjust_toc_info): New.
4320 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4322 2004-11-03 Bob Wilson <bob.wilson@acm.org>
4324 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4325 if there are no segments.
4327 2004-11-02 Daniel Jacobowitz <dan@debian.org>
4329 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4331 2004-11-02 Nick Clifton <nickc@redhat.com>
4333 * elf32-iq2000.c: Convert to ISO C90 formatting.
4335 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
4337 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4339 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4341 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4342 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4343 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4345 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4347 * elf32-sh.c (tpoff): Take alignment into account.
4349 2004-10-28 Nick Clifton <nickc@redhat.com>
4351 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4352 performing a relocatable link.
4353 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4354 for MIPS ports under Irix.
4356 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
4358 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4359 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4360 (elf32_arm_final_link_relocate): Ditto.
4361 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4362 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4363 (elf32_arm_adjust_dynamic_symbol): Ditto.
4364 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4365 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4366 (elf32_arm_r_howto): ... To here.
4367 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4369 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4372 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4373 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4374 and R_IA64_SECREL64LSB.
4376 2004-10-26 Paul Brook <paul@codesourcery.com>
4378 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4379 (bfd_elf_size_dynamic_sections): Create default version definition.
4380 (elf_link_output_extsym): Adjust for default symbol version.
4382 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4384 * mmo.c: Adjust to ISO C.
4386 * mmo.c (mmo_write_section_description): New function broken out
4387 of mmo_internal_write_section.
4388 (mmo_internal_write_section): For each of .text and .data, call
4389 mmo_write_section_description before outputting contents if it has
4390 nontrivially deducible vma or contents.
4391 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4392 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4393 symbols if found within the .data address range.
4395 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4397 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4399 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4401 * mmo.c (File Layout): Correct place of misplaced blurb about
4404 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4406 * config.bfd: Add mips64*-*-openbsd.
4408 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4410 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4413 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4415 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4416 * configure: Regenerate.
4418 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4421 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4422 to linker reloc_overflow callback.
4423 (aout_link_input_section_ext): Likewise.
4424 (aout_link_reloc_link_order): Likewise.
4425 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4426 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4428 (alpha_relocate_section): Likewise.
4429 * coff-arm.c (coff_arm_relocate_section): Likewise.
4430 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4431 * coff-h8500.c (extra_case): Likewise.
4432 * coff-i960.c (coff_i960_relocate_section): Likewise.
4433 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4434 * coff-mips.c (mips_relocate_section): Likewise.
4435 * coff-or32.c (coff_or32_relocate_section): Likewise.
4436 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4437 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4438 * coff-sh.c (sh_relocate_section): Likewise.
4439 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4440 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4441 * coff-z8k.c (extra_case): Likewise.
4442 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4443 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4444 (_bfd_coff_generic_relocate_section): Likewise.
4445 * ecoff.c (ecoff_reloc_link_order): Likewise.
4446 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4447 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4448 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4449 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4450 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4451 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4452 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4453 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4454 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4455 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4456 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4457 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4458 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4459 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4460 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4461 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4462 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4463 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4464 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4465 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4466 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4467 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4468 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4469 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4470 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4471 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4472 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4473 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4474 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4475 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4476 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4477 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4478 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4479 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4480 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4481 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4482 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4483 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4484 * elflink.c (elf_reloc_link_order): Likewise.
4485 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4486 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4487 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4488 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4489 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4490 (aout_link_reloc_link_order): Likewise.
4491 * reloc.c (bfd_generic_get_relocated_section_contents):
4493 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4494 * simple.c (simple_dummy_reloc_overflow): Updated.
4496 2004-10-20 Andreas Schwab <schwab@suse.de>
4498 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4499 (elf_backend_plt_sym_val): Define.
4501 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4503 * config.bfd: Set targ_underscore=yes for PE COFF targets
4505 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4507 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4508 (ppc64_elf_edit_opd): Likewise.
4510 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4512 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4513 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4514 set SEC_ALLOC and SEC_LOAD.
4516 2004-10-18 Nick Clifton <nickc@redhat.com>
4518 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4519 'name' for relocs against both local and global symbols.
4521 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4523 * bfd-in2.h: Regenerate.
4524 * bfd.c (struct bfd): Add no_export.
4525 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4527 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4529 * config.bfd: Whitespace cleanup.
4530 * Makefile.am: Run "make dep-am"
4531 * Makefile.in: Regenerate.
4533 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4535 * elflink.c (struct already_linked_section): Removed.
4536 (try_match_symbols_in_sections, already_linked): Removed.
4537 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4538 prefix of section names when finding already_linked_table
4539 chain. Compare section names. Instead of calling already_linked,
4540 do it inline and only for sections in the same already_linked_list.
4542 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4544 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4545 parameter. If called after _bfd_elf_write_section_eh_frame,
4546 don't allow a -2 return unless need_* bit is already set, and
4547 handle offsets adjusted for output_offset.
4548 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4549 * elf.c (_bfd_elf_section_offset): Update call.
4551 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4554 * coffcode.h (coff_compute_section_file_positions): Cast to
4555 bfd_vma when computing page alignment.
4557 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4559 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4560 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4562 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4564 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4565 relocations use a virtual address, not a section offset.
4567 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4569 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4570 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4571 xtensa_format_encode.
4572 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4573 (ebb_add_proposed_action): Delete.
4575 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4577 * elf32-xtensa.c: Use ISO C90 formatting.
4579 2004-10-12 Paul Brook <paul@codesourcery.com>
4581 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4584 2004-10-12 Paul Brook <paul@codesourcery.com>
4586 * elf32-arm.h: Support EABI version 4 objects.
4588 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4591 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4592 Don't mark as default.
4593 (bfd_x86_64_arch): Don't mark as default.
4595 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4597 * elflink.c (enum action_discarded): New.
4598 (elf_section_complain_discarded): Delete.
4599 (elf_action_discarded): New function subsuming the above and also
4600 controlling reloc behaviour.
4601 (elf_link_input_bfd): Use it.
4603 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4605 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4606 (special_sections): Add .gnu.liblist and .gnu.conflict.
4607 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4609 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4612 * elflink.c (elf_link_input_bfd): Try harder to support
4613 relocations against symbols in removed linkonce sections.
4615 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4617 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4620 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4621 sections do not reference symbols in non-SEC_ALLOC sections.
4623 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4626 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4627 (_bfd_elf_link_omit_section_dynsym): Formatting.
4629 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4631 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4632 * libbfd.h: Regnerate.
4633 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4634 * elf32-frv.c: Likewise.
4635 * elf32-m32r.c: Likewise.
4636 * elf32-ppc.c: Likewise.
4637 * elf64-hppa.c: Likewise.
4638 * elfxx-ia64.c: Likewise.
4639 * opncls.c: Likewise.
4641 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4643 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4644 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4645 offsets stored in struct eh_cie_fde entries before doing other
4648 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4649 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4650 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4651 setting offsets for removed CIEs. Don't set "sec", instead set
4652 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4653 CIE in hdr_info. Only set make_relative and make_lsda_relative
4654 for CIEs. Use pointers rather than array indices.
4655 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4656 make_lsda_relative, need_* on cie_inf for FDEs.
4657 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4658 section output_offset. Delete cie_offset, instead use cie_inf
4659 pointer to CIE entry. Use need_relative and need_lsda_relative on
4660 CIE entry for FDEs. Use pointers rather than array indices.
4662 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4664 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4665 bfd_is_target_special_symbol.
4666 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4667 * som.c (som_bfd_is_target_special_symbol): Define.
4669 2004-10-08 Nick Clifton <nickc@redhat.com>
4671 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4672 * configure: Regenerate.
4673 * bfd-in2.h: Regenerate.
4674 * syms.c (bfd_is_target_special_symbol): New interface function.
4675 Returns true when a symbol should be considered to be special.
4676 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4677 the symbol jump table.
4678 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4679 Return true iff the symbol is a mapping symbol.
4680 (bfd_elf32_bfd_is_target_special_symbol): Define.
4681 * elfxx-target.h: Provide a default definition for
4682 bfd_is_target_special_symbol.
4683 * aout-target.h: Likewise.
4684 * aout-tic30.c: Likewise.
4685 * binary.c: Likewise.
4686 * coffcode.h: Likewise.
4687 * i386msdos.c: Likewise.
4690 * libaout.h: Likewise.
4691 * libbfd-in.h: Likewise
4692 * libecoff.h: Likewise.
4693 * mach-o.c: Likewise.
4695 * nlm-target.h: Likewise.
4696 * oasys.c: Likewise.
4698 * ppcboot.c: Likewise.
4700 * tekhex.c: Likewise.
4701 * versados.c: Likewise.
4703 * xcoff-target.h: Likewise.
4705 * libbfd.h: Regenerate.
4707 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4709 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4710 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4711 (elf_backend_section_from_shdr): Define.
4713 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4715 * syms.c (bfd_is_local_label): Return false for file symbols.
4717 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4718 David Heine <dlheine@tensilica.com>
4720 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4721 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4722 (elf32xtensa_no_literal_movement): New global variable.
4723 (elf_howto_table): Add entries for new relocations.
4724 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4725 (property_table_compare): When addresses are equal, compare sizes and
4726 various property flags.
4727 (property_table_matches): New.
4728 (xtensa_read_table_entries): Extend to read new property tables. Add
4729 output_addr parameter to indicate that output addresses should be used.
4730 Use bfd_get_section_limit.
4731 (elf_xtensa_find_property_entry): New.
4732 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4733 (elf_xtensa_check_relocs): Handle new relocations.
4734 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4735 relocations. Use new xtensa-isa.h functions.
4736 (build_encoding_error_message): Remove encode_result parameter. Add
4737 new target_address parameter used to detect alignment errors.
4738 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4739 error handling. Use new is_operand_relocation function.
4740 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4741 Use underbar macro for error messages. Formatting.
4742 (get_const16_opcode): New.
4743 (get_l32r_opcode): Add a separate flag for initialization.
4744 (get_relocation_opnd): Operand number is no longer explicit in the
4745 relocation. Change to decode the opcode and analyze its operands.
4746 (get_relocation_slot): New.
4747 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4748 Use new xtensa-isa.h functions to handle multislot instructions.
4749 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4750 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4751 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4752 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4753 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4754 get_single_format, init_op_single_format_table): New.
4755 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4756 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4757 (contract_asm_expansion): Add error_message parameter and pass it to
4758 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4759 with R_XTENSA_SLOT0_OP.
4760 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4761 instructions. Use new xtensa-isa.h functions.
4762 (r_reloc struct): Add new virtual_offset field.
4763 (r_reloc_init): Add contents and content_length parameters. Set
4764 virtual_offset field to zero. Add contents to target_offset field for
4765 partial_inplace relocations.
4766 (r_reloc_is_defined): Check for null.
4767 (print_r_reloc): New debug function.
4768 (source_reloc struct): Replace xtensa_operand field with pair of the
4769 opcode and the operand position. Add is_abs_literal field.
4770 (init_source_reloc): Specify operand by opcode/position pair. Set
4771 is_abs_literal field.
4772 (source_reloc_compare): When target_offsets are equal, compare other
4773 fields to make sorting predictable.
4774 (literal_value struct): Add is_abs_literal field.
4775 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4776 (init_literal_value): New.
4777 (is_same_value): Replace with ...
4778 (literal_value_equal): ... this function. Add comparisons of
4779 virtual_offset and is_abs_literal fields.
4780 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4781 failure. Initialize has_last_loc field.
4782 (value_map_hash_table_delete): New.
4783 (hash_literal_value): Rename to ...
4784 (literal_value_hash): ... this. Include is_abs_literal flag and
4785 virtual_offset field in the hash value.
4786 (get_cached_value): Rename to ...
4787 (value_map_get_cached_value): ... this. Update calls to
4788 literal_value_hash and literal_value_equal.
4789 (add_value_map): Check for allocation failure. Update calls to
4790 value_map_get_cached_value and literal_value_hash.
4791 (text_action, text_action_list, text_action_t): New types.
4792 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4793 text_action_add, text_action_add_literal, offset_with_removed_text,
4794 offset_with_removed_text_before_fill, find_insn_action,
4795 print_action_list, print_removed_literals): New.
4796 (offset_with_removed_literals): Delete.
4797 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4798 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4799 allocated_relocs_count fields.
4800 (init_xtensa_relax_info): Initialize new fields.
4801 (reloc_bfd_fix struct): Add new translated field.
4802 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4804 (fix_compare, cache_fix_array): New.
4805 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4806 section via get_xtensa_relax_info. Use cache_fix_array to set up
4807 sorted fix_array and use bsearch instead of linear search.
4808 (section_cache_t): New struct.
4809 (init_section_cache, section_cache_section, clear_section_cache): New.
4810 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4811 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4812 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4813 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4815 (retrieve_contents): Use bfd_get_section_limit.
4816 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4817 to compute_removed_literals. Free value_map_hash_table when no longer
4819 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4820 compute_text_actions for all sections.
4821 (find_relaxable_sections): Mark sections as relaxable if they contain
4822 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4823 call. Increment relax_info src_count field only for appropriate
4824 relocation types. Remove is_literal_section check.
4825 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4826 r_reloc_init and find_associated_l32r_irel. Check
4827 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4828 literals. Pass is_abs_literal flag to init_source_reloc.
4829 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4830 CONST16 instructions. Adjust calls to r_reloc_init and
4831 pcrel_reloc_fits. Handle weak symbols conservatively.
4832 (find_associated_l32r_irel): Add bfd parameter and pass it to
4834 (compute_text_actions, compute_ebb_proposed_actions,
4835 compute_ebb_actions, check_section_ebb_pcrels_fit,
4836 check_section_ebb_reduces, text_action_add_proposed,
4837 compute_fill_extra_space): New.
4838 (remove_literals): Replace with ...
4839 (compute_removed_literals): ... this function. Call
4840 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4841 Call xtensa_read_table_entries to get the property table. Skip
4842 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4843 is_removable_literal, remove_dead_literal, and
4844 identify_literal_placement functions.
4845 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4846 instead of linear search.
4847 (is_removable_literal, remove_dead_literal,
4848 identify_literal_placement): New.
4849 (relocations_reach): Update check for literal not referenced by any
4850 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4851 (coalesce_shared_literal, move_shared_literal): New.
4852 (relax_section): Use bfd_get_section_limit. Call
4853 translate_section_fixes. Update calls to r_reloc_init and
4854 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4855 Add call to pin_internal_relocs. Add special handling for
4856 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4857 info to calculate new addend_displacement variable. Replace code for
4858 deleting literals with more general code to perform the actions
4859 determined by the action_list for the section.
4860 (translate_section_fixes, translate_reloc_bfd_fix): New.
4861 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4862 find_removed_literal only if is_operand_relocation. Update call to
4863 offset_with_removed_text. Use new target_offset and removed_bytes
4865 (move_literal): New.
4866 (relax_property_section): Use bfd_get_section_limit. Set new
4867 is_full_prop_section flag and handle new property tables. Update calls
4868 to r_reloc_init and offset_with_removed_text. Check
4869 is_relaxable_asm_section flag. Handle expansion of zero-sized
4870 unreachable entries, with use of offset_with_removed_text_before_fill.
4871 For relocatable links, combine entries only for literal tables.
4872 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4873 calls to offset_with_removed_text. Translate st_size field for
4875 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4876 failure. Add contents parameter. Update call to get_bfd_fix. Update
4877 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4878 R_XTENSA_ASM_EXPAND relocs.
4879 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4880 call to get_bfd_fix. Include offset from contents for partial_inplace
4882 (is_reloc_sym_weak): New.
4883 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4884 (prop_sec_len): New.
4885 (xtensa_is_property_section): Handle new property sections.
4886 (is_literal_section): Delete.
4887 (internal_reloc_compare): When r_offset matches, compare r_info and
4888 r_addend to make sorting predictable.
4889 (internal_reloc_matches): New.
4890 (xtensa_get_property_section_name): Handle new property sections.
4891 (xtensa_get_property_predef_flags): New.
4892 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4893 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4894 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4895 (xtisa_errno, xtisa_error_msg): New variables.
4896 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4897 (xtensa_insnbuf_alloc): Add error handling.
4898 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4899 use xtensa_format_decode. Add error handling.
4900 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4901 instruction length to find the number of bytes to copy.
4902 (xtensa_isa_init): Add error handling. Replace calls to
4903 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4904 tables in the xtensa_modules structure.
4905 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4906 xtensa_extend_isa): Delete.
4907 (xtensa_isa_free): Change to only free lookup tables.
4908 (opname_lookup_compare): Replace with ...
4909 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4910 (xtensa_insn_maxlength): Rename to ...
4911 (xtensa_isa_maxlength): ... this.
4912 (xtensa_insn_length): Delete.
4913 (xtensa_insn_length_from_first_byte): Replace with ...
4914 (xtensa_isa_length_from_chars): ... this function.
4915 (xtensa_num_opcodes): Rename to ...
4916 (xtensa_isa_num_opcodes): ... this.
4917 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4918 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4919 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4920 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4921 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4922 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4923 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4924 (xtensa_opcode_lookup): Add error handling.
4925 (xtensa_decode_insn): Replace with ...
4926 (xtensa_opcode_decode): ... this function, with new format and
4927 slot parameters. Add error handling.
4928 (xtensa_encode_insn): Replace with ...
4929 (xtensa_opcode_encode): ... this function, which does the encoding via
4930 one of the entries in the "encode_fns" array. Add error handling.
4931 (xtensa_opcode_name): Add error handling.
4932 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4933 xtensa_opcode_is_call): New.
4934 (xtensa_num_operands): Replace with ...
4935 (xtensa_opcode_num_operands): ... this function. Add error handling.
4936 (xtensa_opcode_num_stateOperands,
4937 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4938 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4939 xtensa_operand_is_visible): New.
4940 (xtensa_get_operand, xtensa_operand_kind): Delete.
4941 (xtensa_operand_inout): Add error handling and special-case for
4943 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4944 operate on one slot of an instruction. Added error handling.
4945 (xtensa_operand_encode): Handle default operands with no encoding
4946 functions. Check for success by comparing against decoded value.
4948 (xtensa_operand_decode): Handle default operands. Return decoded value
4949 through argument pointer. Add error handling.
4950 (xtensa_operand_is_register, xtensa_operand_regfile,
4951 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4952 (xtensa_operand_isPCRelative): Rename to ...
4953 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4954 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4955 through argument pointer. Add error handling.
4956 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4957 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4958 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4959 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4960 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4961 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4962 xtensa_state_is_exported, xtensa_sysreg_lookup,
4963 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4964 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4965 xtensa_interface_num_bits, xtensa_interface_inout,
4966 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4967 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4968 * xtensa-modules.c: Rewrite to use new data structures.
4969 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4970 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4971 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4972 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4973 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4974 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4975 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4976 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4977 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4978 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4979 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4980 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4981 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4982 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4983 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4984 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4985 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4986 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4987 * Makefile.in: Regenerate.
4988 * bfd-in2.h: Likewise.
4989 * libbfd.h: Likewise.
4991 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4993 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4994 against the absolute section.
4995 (mips_elf64_write_rela): Likewise.
4997 2004-10-07 Jan Beulich <jbeulich@novell.com>
4999 * elf.c (elf_find_function): Don't generally check for matching
5000 section, just for non-file symbols. Remove redunant comparison
5002 * elf32-arm.h (arm_elf_find_function): Likewise.
5004 2004-10-07 Jeff Baker <jbaker@qnx.com>
5006 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5007 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5010 2004-10-04 Roland McGrath <roland@redhat.com>
5012 * hash.c (bfd_hash_set_default_size): Use const for table.
5013 Use size_t instead of int for variable compared to sizeof results.
5015 2004-10-05 Alan Modra <amodra@bigpond.net.au>
5018 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5020 2004-10-01 Paul Brook <paul@codesourcery.com>
5022 * elf32-arm.h (elf32_arm_fake_sections,
5023 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5025 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5027 2004-10-01 Alan Modra <amodra@bigpond.net.au>
5029 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5031 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5032 need_relative or need_lsda_relative if we are processing an
5033 offset for a reloc on a FDE initial loc or LSDA field
5035 (_bfd_elf_write_section_eh_frame): Test need_relative and
5036 need_lsda_relative in place of corresponding make_* field
5037 when deciding to use pc-relative encodings.
5039 2004-09-30 Paul Brook <paul@codesourcery.com>
5041 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5042 target2 relocation type.
5044 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5047 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5049 2004-09-30 Paul Brook <paul@codesourcery.com>
5051 * reloc.c: Add BFD_RELOC_ARM_SMI.
5052 * bfd-in2.h: Regenerate.
5055 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5057 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5058 vma and output offset to address.
5059 * simple.c (simple_save_output_info): Only set output section
5060 and offset for debug sections, or those not already set up by
5062 (bfd_simple_get_relocated_section_contents): Update comment.
5064 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5066 * elf.c (IS_LOADED): Delete.
5067 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5068 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5071 2004-09-23 Alan Modra <amodra@bigpond.net.au>
5074 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5075 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5076 redundant assignment of EM_SPARC.
5078 2004-09-22 Brian Ford <ford@vss.fsi.com>
5080 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5081 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5083 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5085 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5087 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5088 (elf_backend_modify_segment_map): Don't define.
5090 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5092 * elf.c (IS_LOADED): Define.
5093 (assign_file_positions_for_segments): Don't round up file offset of
5094 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5095 Delete code handling link script adjustment of lma. Do the adjust
5096 in later code handling similar ajustments. Remove dead code error
5097 check. Warn if section lma would require a negative offset
5098 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5099 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5100 update voff in section loop. Change voff in segment loop to be an
5101 adjustment on top of "off". Set sec->filepos and update "off" later.
5102 Test for loadable sections consistently using IS_LOADED. Similarly,
5103 test for alloc-only sections other than .tbss consistently.
5104 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5105 Tidy PT_NOTE handling. Use %B and %A in error messages.
5106 (assign_file_positions_except_relocs): Use %B in error message.
5108 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5110 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5111 (CONFIG_STATUS_DEPENDENCIES): New.
5112 (Makefile): Removed.
5113 (config.status): Likewise.
5114 * Makefile.in: Regenerated.
5116 2004-09-17 Paul Brook <paul@codesourcery.com>
5118 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5119 (bfd_elf32_arm_process_before_allocation): Update prototype.
5120 * bfd-in2.h: Regenerate.
5121 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5122 (elf32_arm_link_hash_table_create): Set it.
5123 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5124 (bfd_elf32_arm_set_target_relocs): New function.
5125 (arm_real_reloc_type): New function.
5126 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5127 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5128 (elf32_arm_gc_sweep_hook): Ditto.
5129 (elf32_arm_check_relocs): Ditto.
5130 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5131 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5133 (elf32_arm_got_prel): New variable.
5134 (elf32_arm_howto_from_type): New function.
5135 (elf32_arm_info_to_howto): Use it.
5136 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5137 BFD_RELOC_ARM_TARGET2.
5138 * libbfd.h: Regenerate.
5139 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5141 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5143 * ecoff.c: Update u.undef.next refs.
5144 * elf64-ppc.c: Likewise.
5145 * elflink.c: Likewise.
5146 * linker.c: Likewise.
5147 * xcofflink.c: Likewise.
5149 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5150 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5151 fields to indirect struct.
5152 * elf-m10300.c: Update u.weakdef refs.
5153 * elf32-arm.h: Likewise.
5154 * elf32-cris.c: Likewise.
5155 * elf32-frv.c: Likewise.
5156 * elf32-hppa.c: Likewise.
5157 * elf32-i370.c: Likewise.
5158 * elf32-i386.c: Likewise.
5159 * elf32-m32r.c: Likewise.
5160 * elf32-m68k.c: Likewise.
5161 * elf32-ppc.c: Likewise.
5162 * elf32-s390.c: Likewise.
5163 * elf32-sh.c: Likewise.
5164 * elf32-sparc.c: Likewise.
5165 * elf32-vax.c: Likewise.
5166 * elf32-xtensa.c: Likewise.
5167 * elf64-alpha.c: Likewise.
5168 * elf64-hppa.c: Likewise.
5169 * elf64-ppc.c: Likewise.
5170 * elf64-s390.c: Likewise.
5171 * elf64-sh64.c: Likewise.
5172 * elf64-sparc.c: Likewise.
5173 * elf64-x86-64.c: Likewise.
5174 * elfxx-ia64.c: Likewise.
5175 * elfxx-mips.c: Likewise.
5176 * elflink.c: Likewise. Also u.elf_hash_value.
5177 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5179 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5180 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5181 (bfd_elf_gc_record_vtentry): Likewise.
5182 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5184 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5186 * Makefile.am: Run "make dep-am".
5187 * Makefile.in: Regenerate.
5188 * bfd-in2.h: Regenerate.
5189 * po/SRC-POTFILES.in: Regenerate.
5190 * po/bfd.pot: Regenerate.
5192 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5194 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5195 with bitfields. Make "type" and "other" bitfields too.
5196 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5197 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5198 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5199 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5200 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5201 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5202 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5203 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5204 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5205 * elf-m10300.c: Likewise.
5207 * elf32-arm.h: Likewise.
5208 * elf32-cris.c: Likewise.
5209 * elf32-frv.c: Likewise.
5210 * elf32-hppa.c: Likewise.
5211 * elf32-i370.c: Likewise.
5212 * elf32-i386.c: Likewise.
5213 * elf32-m32r.c: Likewise.
5214 * elf32-m68k.c: Likewise.
5215 * elf32-ppc.c: Likewise.
5216 * elf32-s390.c: Likewise.
5217 * elf32-sh-symbian.c: Likewise.
5218 * elf32-sh.c: Likewise.
5219 * elf32-sh64.c: Likewise.
5220 * elf32-sparc.c: Likewise.
5221 * elf32-vax.c: Likewise.
5222 * elf32-xtensa.c: Likewise.
5223 * elf64-alpha.c: Likewise.
5224 * elf64-hppa.c: Likewise.
5225 * elf64-ppc.c: Likewise.
5226 * elf64-s390.c: Likewise.
5227 * elf64-sh64.c: Likewise.
5228 * elf64-sparc.c: Likewise.
5229 * elf64-x86-64.c: Likewise.
5230 * elflink.c: Likewise.
5231 * elfxx-ia64.c: Likewise.
5232 * elfxx-mips.c: Likewise.
5233 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5234 * configure: Regenerate.
5235 * aclocal.m4: Regenerate.
5237 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5239 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5240 around uses of R_ARM_TARGET1.
5241 (elf32_arm_check_relocs): Likewise.
5243 2004-09-13 Paul Brook <paul@codesourcery.com>
5245 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5247 * bfd-in2.h: Regenerate.
5248 * libbfd.h: Regenerate.
5249 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5250 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5251 (bfd_elf32_arm_process_before_allocation): Ditto.
5252 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5253 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5254 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5257 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5259 * hpux-core.c (thread_section_p): New function.
5260 (hpux_core_core_file_p): Fix computation of offset in call
5261 to bfd_seek. Create a ".reg" section from an arbitrary
5262 ".reg/<id>" section if none was created after having read
5265 2004-09-11 Andreas Schwab <schwab@suse.de>
5267 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5268 * aclocal.m4: Rebuild.
5269 * configure: Rebuild.
5271 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5273 * section.c (bfd_sections_find_if): Fix parameter name in
5274 comment to match code.
5276 2004-09-10 Alan Modra <amodra@bigpond.net.au>
5278 * elf.c (assign_file_positions_except_relocs): Assign relocs
5279 stored in a bfd section.
5281 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
5283 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5284 h->gotplt_refcount to 0, not -1.
5286 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
5288 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5289 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5291 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5292 handle symbol visibility here.
5294 2004-09-07 Alan Modra <amodra@bigpond.net.au>
5296 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5297 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5299 (ppc_stub_name): Remove trailing "+0" on stub name.
5300 (create_linkage_sections): Create relocations for
5301 branch lookup table when --emit-relocs as well as when --shared.
5302 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5303 relbrlt test. For --emit-stub-syms, always output a sym even when
5304 one already exists on a plt call stub. Put stub type in the stub
5306 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5308 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5309 reloc_count in stub sections. Adjust relbrlt test.
5310 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5311 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5312 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5313 for relocs against discarded symbols. Fix comments.
5315 2004-09-06 Mark Mitchell <mark@codesourcery.com>
5317 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5318 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5320 (map_sections_to_segments): ... here. Use it. Assign a file
5321 position to the .dynamic section if it is not loadable, but part
5322 of the PT_DYNAMIC segment.
5323 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5324 offsets, not VMAs, for the BPABI. Do not fill in the header in
5325 the .got.plt section for the BPABI.
5326 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5328 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5330 2004-09-06 Nick Clifton <nickc@redhat.com>
5332 * elflink.c (elf_link_add_object_symbols): Set the error code to
5333 bfd_error_wrong_format when the input format does not match the
5336 2004-09-06 Alan Modra <amodra@bigpond.net.au>
5338 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5339 (ppc64_elf_check_directives): ..here.
5340 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5341 before accessing ppc64_elf_tdata.
5342 (ppc64_elf_finish_dynamic_sections): And here too.
5344 2004-09-04 Alan Modra <amodra@bigpond.net.au>
5346 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5348 2004-09-03 Mark Mitchell <mark@codesourcery.com>
5350 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5351 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5352 (bfd_elf32_littlearm_symbian_vec): Likewise.
5353 * configure: Regenerated.
5354 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5355 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5356 (PLT_ENTRY_SIZE): Likewise.
5357 (bfd_vma_elf32_arm_symbian_plt_entry): New
5359 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5361 (create_got_section): Don't create sections when generating BPABI
5363 (elf32_arm_create_dynamic_sections): Tidy.
5364 (elf32_arm_link_hash_table_create): Set plt_header_size,
5365 plt_entry_size, and symbian_p.
5366 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5367 generating BPABI objects.
5368 (allocate_dynrelocs): Use htab->plt_header_size, not
5369 PLT_HEADER_SIZE. Do not add to .got.plt when
5370 generating BPABI objects.
5371 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5372 * elfarm-nabi.c: Add SymbianOS target vectors.
5373 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5374 (_bfd_elf_link_create_dynamic_sections): Likewise.
5375 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5376 (elfNN_bed): Use it.
5377 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5378 (bfd_elf32_littlearm_symbian_vec): Likewise.
5379 (_bfd_target_vector): Add them.
5381 2004-09-03 Nick Clifton <nickc@redhat.com>
5384 * coffcode.h (handle_COMDAT): Replace abort with an warning
5385 message and allow the scan to continue.
5387 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5389 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5390 in when reading relocs, not our sorted syms. Remove unnecessary
5393 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5395 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5397 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5399 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5400 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5401 replace uses of *_alias with *_noncanonical.
5402 * aclocal.m4: Rebuild with aclocal 1.4p6.
5403 * Makefile.in: Rebuild with automake 1.4p6.
5404 * doc/Makefile.in: Rebuild with automake 1.4p6.
5405 * configure.in: Autoupdate with autoupdate 2.59.
5406 * config.in: Regenerate with autoheader 2.59.
5407 * configure: Regnerate with autoconf 2.59.
5409 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5411 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5412 symbol pointer arrays before modifying.
5414 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5416 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5417 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5418 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5419 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5420 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5421 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5422 Use both symbol tables on non-relocatable objects. Use a common
5423 error exit. Fix "mid" warning.
5424 * libbfd.h: Regenerate.
5425 * bfd-in2.h: Regenerate.
5427 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5429 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5431 (struct sfpr_def_parms): Save some space.
5432 (sfpr_define): Here too.
5434 * elf64-ppc.c (compare_symbols): Put section syms first.
5435 (sym_exists_at): New function.
5436 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5437 points only for relocatable files. Use .opd section contents
5438 otherwise. Generally clean up the code.
5440 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5442 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5443 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5444 (struct sfpr_def_parms): New.
5445 (sfpr_define): New function.
5446 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5447 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5448 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5449 (savefpr1_tail, restfpr1_tail): New functions.
5450 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5451 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5452 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5453 code. Define all ABI mandated _save and _rest functions.
5455 2004-08-26 Paul Brook <paul@codesourcery.com>
5457 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5459 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5461 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5464 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5466 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5467 that pcrel correction is applied for R_386_PC32.
5469 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5471 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5472 for R_386_32 and R_386_PC32 relocs against symbols defined in
5475 2004-08-25 Dmitry Diky <diwil@spec.ru>
5477 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5478 Add new relocations.
5479 * bfd-in2.h: Regenerate.
5480 * libbfd.h: Regenerate.
5481 * elf32-msp430.c: Clean-up code.
5482 (elf_msp430_howto_table): Add new relocation entries.
5483 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5484 (msp430_elf_relax_section): New function.
5485 (msp430_elf_relax_delete_bytes): New function.
5486 (msp430_elf_symbol_address_p): New function.
5488 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5490 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5491 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5493 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5495 * elflink.c (_bfd_elf_section_already_linked): Handle
5496 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5498 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5500 * config.bfd (arm*-*-symbianelf*): New target.
5501 (arm*-*-eabi*): Likewise.
5503 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5505 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5506 "struct ppc_link_hash_entry *".
5507 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5508 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5510 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5512 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5513 entries (where fd_aux overlaps next entry's fd_func).
5514 Add non_overlapping argument, use it.
5515 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5516 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5517 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5518 as indexes into opd_sym_map/opd_adjust array.
5519 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5521 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5523 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5524 if we can look up their function descriptor in a regular file.
5526 2004-08-18 Nick Clifton <nickc@redhat.com>
5529 * cofflink.c (coff_link_add_symbols): Check that the comdat
5530 pointer in the coff_section_data structure has been initialised
5533 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5536 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5537 changing bfd_link_hash_undefined to bfd_link_hash_new.
5539 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5541 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5543 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5544 (synthetic_opd, synthetic_relocatable): New variables.
5545 (compare_symbols, compare_relocs): New helper routines.
5546 (ppc64_elf_get_synthetic_symtab): New function.
5547 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5549 * bfd-in2.h: Regenerated.
5550 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5551 to relsyms. Return 0 if abfd is relocatable.
5553 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5555 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5557 2004-08-17 Nick Clifton <nickc@redhat.com>
5559 * (is_arm_mapping_symbol_name): New function - return true
5560 when a symbol name matches the requirements for an ARM mapping
5562 (arm_elf_find_function): New function based on
5563 elf_find_function in elf.c but skipping ARM mapping symbols
5564 and including thumb function symbols.
5565 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5566 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5568 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5570 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5571 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5572 (ppc64_elf_brtaken_reloc): Here too.
5574 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5576 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5578 (ppc64_elf_check_directives): Check that we have the right hash
5579 table before proceeding.
5581 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5583 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5584 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5585 the sections that will be discarded.
5587 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5589 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5591 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5593 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5594 free space available.
5596 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5598 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5599 occurrences with bfd_byte * thoughout file.
5601 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5602 (xcoff_write_armap_big): Likewise.
5603 (xcoff_write_archive_contents_old): Likewise.
5604 (xcoff_write_archive_contents_big): Likewise.
5606 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5608 2004-08-13 Nick Clifton <nickc@redhat.com>
5610 * elf32-arm.h: Convert to ISO C90.
5612 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5615 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5618 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5620 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5621 (bfd_archive_filename, bfd_get_section_ident): Delete.
5622 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5623 bfd_archive_filename.
5624 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5625 to warn about symbols in discarded sections. Use _bfd_error_handler.
5626 * aout-adobe.c (aout_adobe_callback): See below.
5627 * aout-cris.c (swap_ext_reloc_in): ..
5628 * coff-arm.c (find_thumb_glue, find_arm_glue,
5629 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5630 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5631 coff_arm_copy_private_bfd_data): ..
5632 * coff-i860.c (i860_reloc_processing): ..
5633 * coff-mcore.c (mcore_coff_unsupported_reloc,
5634 coff_mcore_relocate_section): ..
5635 * coff-ppc.c (coff_ppc_relocate_section): ..
5636 * coff-rs6000.c (xcoff_create_csect_from_smclas
5637 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5638 sh_swap_insns, sh_relocate_section): ..
5639 * coff-tic54x.c (tic54x_reloc_processing): ..
5640 * coff-tic80.c (coff_tic80_relocate_section): ..
5641 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5642 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5643 coff_slurp_symbol_table, coff_classify_symbol,
5644 coff_slurp_reloc_table): ..
5645 * coffgen.c (_bfd_coff_read_string_table): ..
5646 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5647 _bfd_coff_generic_relocate_section): ..
5648 * cpu-arm.c (bfd_arm_merge_machines): ..
5649 * cpu-sh.c (sh_merge_bfd_arch): ..
5650 * elf-hppa.h (elf_hppa_relocate_section): ..
5651 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5652 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5653 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5654 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5655 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5656 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5657 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5658 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5659 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5660 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5661 cris_elf_merge_private_bfd_data
5662 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5663 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5664 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5665 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5666 elf32_hppa_relocate_section): ..
5667 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5668 i370_elf_check_relocs, i370_elf_relocate_section): ..
5669 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5670 elf_i386_relocate_section): ..
5671 * elf32-m32r.c (m32r_elf_relocate_section,
5672 m32r_elf_merge_private_bfd_data): ..
5673 * elf32-m68hc1x.c (m68hc12_add_stub,
5674 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5675 * elf32-m68k.c (elf_m68k_relocate_section): ..
5676 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5677 mcore_elf_relocate_section): ..
5678 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5679 ppc_elf_check_relocs, ppc_elf_relocate_section,
5680 ppc_elf_begin_write_processing): ..
5681 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5682 elf_s390_relocate_section): ..
5683 * elf32-sh-symbian.c (sh_symbian_import_as,
5684 sh_symbian_process_embedded_commands,
5685 sh_symbian_relocate_section): ..
5686 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5687 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5688 sh_elf_merge_private_data): ..
5689 * elf32-sparc.c (elf32_sparc_check_relocs,
5690 elf32_sparc_relocate_section,
5691 elf32_sparc_merge_private_bfd_data): ..
5692 * elf32-v850.c (v850_elf_check_relocs,
5693 v850_elf_merge_private_bfd_data): ..
5694 * elf32-xtensa.c (elf_xtensa_check_relocs,
5695 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5696 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5697 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5698 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5699 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5700 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5701 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5702 ppc64_elf_relocate_section): ..
5703 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5704 elf_s390_relocate_section): ..
5705 * elf64-sh64.c (sh_elf64_relocate_section): ..
5706 * elf64-sparc.c (sparc64_elf_check_relocs,
5707 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5708 sparc64_elf_merge_private_bfd_data): ..
5709 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5710 elf64_x86_64_relocate_section): ..
5711 * elflink.c (_bfd_elf_add_default_symbol,
5712 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5713 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5714 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5715 elf_get_linked_section_vma, elf_fixup_link_order,
5716 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5717 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5718 * elfxx-ia64.c (elfNN_ia64_relax_section,
5719 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5720 * elfxx-mips.c (mips_elf_perform_relocation,
5721 _bfd_mips_elf_check_relocs,
5722 _bfd_mips_elf_merge_private_bfd_data): ..
5723 * ieee.c (ieee_slurp_external_symbols): ..
5724 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5725 * libbfd.c (_bfd_generic_verify_endian_match): ..
5726 * linker.c (_bfd_generic_link_add_one_symbol,
5727 _bfd_generic_section_already_linked): ..
5728 * pdp11.c (translate_to_native_sym_flags): ..
5729 * pe-mips.c (coff_pe_mips_relocate_section): ..
5730 * peicode.h (pe_ILF_build_a_bfd): ..
5731 * srec.c (srec_bad_byte): ..
5732 * stabs.c (_bfd_link_section_stabs): ..
5733 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5734 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5735 with corresponding %B and %A in _bfd_error_handler format string.
5736 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5737 calls to use %A and %B. Fix "against symbol .. from section" and
5738 similar error messages. Combine multiple _bfd_error_handler calls
5739 where they were separated due to bfd_archive_filename deficiencies.
5740 * bfd-in2.h: Regenerate.
5742 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5744 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5747 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5749 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5750 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5751 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5753 (link_hash_newfunc): Init was_undefined.
5754 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5755 Use undefweak instead.
5756 (ppc64_elf_check_directives): Fix undefs chain.
5757 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5759 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5760 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5761 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5763 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5765 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5766 error, test input_section flags rather than sec.
5768 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5770 * elf-bfd.h (struct elf_backend_data): Add
5771 elf_backend_archive_symbol_lookup.
5772 (_bfd_elf_archive_symbol_lookup): Declare.
5773 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5774 (elf_link_add_archive_symbols): ..extracted from here. Call the
5776 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5777 (elfNN_bed): Init new field.
5778 * elf64-ppc.c (elf_backend_check_directives): Define.
5779 (elf_backend_archive_symbol_lookup): Define.
5780 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5781 a ppc_link_hash_entry pointer.
5783 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5784 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5785 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5786 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5787 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5788 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5789 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5792 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5794 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5795 (ppc64_elf_add_symbol_hook): Test for NULL section.
5796 (get_sym_h): Formatting.
5797 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5800 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5801 long branch stubs with code handling plt and r2off branch stubs.
5803 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5805 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5806 * elflink.c (elf_link_input_bfd): Formatting.
5807 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5809 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5810 (link_hash_newfunc): Don't set it.
5811 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5812 (ppc64_elf_mark_entry_syms): Delete.
5813 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5814 sections. Use get_opd_info.
5815 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5817 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5819 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5821 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5822 (func_desc_adjust): Don't set have_undefweak.
5823 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5824 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5826 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5827 "struct ppc_link_hash_entry *". Adjust all references.
5828 (ppc64_elf_hide_symbol): Correct a comment.
5830 * elf64-ppc.c (get_opd_info): New function.
5831 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5832 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5833 before calling get_fdh. Test fdh rather than h before dereferencing
5834 fdh. Mark removed symbols in opd_adjust.
5835 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5836 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5838 (ppc64_elf_output_symbol_hook): Likewise.
5840 2004-08-06 Paul Brook <paul@codesourcery.com>
5842 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5843 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5844 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5845 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5846 and BFD_RELOC_ARM_SBREL32.
5847 * bfd-in2.h, bbfd.h: Regenerate.
5849 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5851 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5852 the dynamic link symbol actually in use.
5854 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5856 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5858 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5859 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5861 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5862 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5864 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5865 Nick Clifton <nickc@redhat.com>
5868 * bfd.c (_bfd_default_error_handler): Make it global.
5870 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5872 * elf.c (assign_section_numbers): Cope gracefully with sections
5873 which have SHF_LINK_ORDER set but no sh_link set up.
5874 * elflink.c (elf_get_linked_section_vma): Likewise.
5876 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5879 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5880 Set it to _bfd_default_error_handler.
5881 (elfNN_bed): Add elf_backend_link_order_error_handler.
5883 * libbfd-in.h (_bfd_default_error_handler): New.
5885 * libbfd.h: Regenerated.
5887 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5889 * archures.c (bfd_mach_sparc_64bit_p): Define.
5890 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5891 * bfd-in2.h: Rebuilt.
5893 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5895 Introduce SH2a support.
5896 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5897 * archures.c (bfd_mach_sh2a_nofpu): New.
5898 * bfd-in2.h: Rebuilt.
5899 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5900 (arch_info_struct): Add sh2a_nofpu.
5901 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5902 2003-12-29 DJ Delorie <dj@redhat.com>
5903 * reloc.c: Add relocs for sh2a.
5904 * bfd-in2.h: Regenerate.
5905 * libbfd.hh: Regenerate.
5906 2003-12-01 Michael Snyder <msnyder@redhat.com>
5907 * archures.c (bfd_mach_sh2a): New.
5908 * bfd-in2.h: Rebuilt.
5909 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5911 (arch_info_struct): Add sh2a.
5912 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5914 2004-07-28 Nick Clifton <nickc@redhat.com>
5915 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5918 * som.c (setup_sections): Improve estimation of space sizes in
5919 relocatable objects.
5921 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5922 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5923 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5925 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5926 * configure: Regenerate.
5927 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5928 case that accepts OSABI=NetBSD and OSABI=SysV.
5929 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5930 the base of .got or .data (if .got does not exist).
5931 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5933 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5934 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5935 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5936 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5938 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5941 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5942 (elf_sec_group): Defined.
5943 (bfd_elf_match_symbols_in_sections): New prototype.
5944 (_bfd_elf_setup_group_pointers): Likewise.
5946 * elf.c (bfd_elf_discard_group): Abort.
5947 (bfd_elf_set_group_contents): Also include relocation sections.
5948 Remove zero-fill for ld -r.
5949 (_bfd_elf_setup_group_pointers): New function.
5950 (elf_sort_elf_symbol): Likewise.
5951 (elf_sym_name_compare): Likewise.
5952 (bfd_elf_match_symbols_in_sections): Likewise.
5954 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5956 * elflink.c (match_group_member): New.
5957 (elf_link_input_bfd): Check group member for discarded section.
5958 (try_match_symbols_in_sections): New function.
5959 (already_linked): Likewise.
5960 (_bfd_elf_section_already_linked): Support mixing comdat group
5961 and linkonce section.
5963 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5964 * linker.c (bfd_section_already_linked_table_traverse): New.
5966 * libbfd.h: Regenerated.
5968 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5970 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5971 BFD_RELOC_CRX_SWITCH32.
5972 * bfd-in2.h: Regenerate.
5973 * libbfd.h: Regenerate.
5974 * elf32-crx.c: Support relocation/relaxation of
5975 BFD_RELOC_CRX_SWITCH* types.
5977 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5979 * elf64-ppc.c: Correct "Linker stubs" comment.
5981 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5983 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5985 (elf_linked_to_section): New.
5987 * elf.c (assign_section_numbers): Set up sh_link for
5990 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5991 to sh_link for SHT_IA_64_UNWIND sections.
5993 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5995 * elflink.c (elf_fixup_link_order): Add _() to error message.
5997 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5999 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6002 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6004 * aout-adobe.c (aout_32_section_already_linked): Defined.
6005 * aout-target.h (MY_section_already_linked): Likewise.
6006 * aout-tic30.c (MY_section_already_linked): Likewise.
6007 * binary.c (binary_section_already_linked): Likewise.
6008 * bout.c (b_out_section_already_linked): Likewise.
6009 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6010 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6011 * coffcode.h (coff_section_already_linked): Likewise.
6012 * i386msdos.c (msdos_section_already_linked): Likewise.
6013 * i386os9k.c (os9k_section_already_linked): Likewise.
6014 * ieee.c (ieee_section_already_linked): Likewise.
6015 * ihex.c (ihex_section_already_linked): Likewise.
6016 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6017 * mmo.c (mmo_section_already_linked): Likewise.
6018 * nlm-target.h (nlm_section_already_linked): Likewise.
6019 * oasys.c (oasys_section_already_linked): Likewise.
6020 * pef.c (bfd_pef_section_already_linked): Likewise.
6021 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6022 * som.c (som_bfd_discard_group): Likewise.
6023 * srec.c (srec_section_already_linked): Likewise.
6024 * tekhex.c (tekhex_section_already_linked): Likewise.
6025 * versados.c (versados_section_already_linked): Likewise.
6026 * vms.c (vms_section_already_linked): Likewise.
6027 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6028 * xsym.c (bfd_sym_section_already_linked): Likewise.
6030 * bfd-in.h (bfd_section_already_linked_table_init): New.
6031 (bfd_section_already_linked_table_free): Likewise.
6033 * coff-rs6000.c (rs6000coff_vec): Add
6034 _bfd_generic_section_already_linked.
6035 (pmac_xcoff_vec): Likewise.
6036 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6037 (aix5coff64_vec): Likewise.
6039 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6040 * elflink.c (_bfd_elf_section_already_linked): New function.
6042 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6044 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6045 (_bfd_generic_section_already_linked): New.
6046 (bfd_section_already_linked_hash_entry): Likewise.
6047 (bfd_section_already_linked): Likewise.
6048 (bfd_section_already_linked_table_lookup): Likewise.
6049 (bfd_section_already_linked_table_insert): Likewise.
6051 * linker.c (bfd_section_already_linked): New.
6052 (_bfd_section_already_linked_table): Likewise.
6053 (bfd_section_already_linked_table_lookup): Likewise.
6054 (bfd_section_already_linked_table_insert): Likewise.
6055 (already_linked_newfunc): Likewise.
6056 (bfd_section_already_linked_table_init): Likewise.
6057 (bfd_section_already_linked_table_free): Likewise.
6058 (_bfd_generic_section_already_linked): Likewise.
6060 * section.c (bfd_section): Remove comdat.
6061 (bfd_comdat_info): Moved to ...
6062 * bfd-in.h (coff_comdat_info): Here.
6063 (bfd_coff_get_comdat_section): New.
6064 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6065 * libcoff-in.h (coff_section_tdata): Add comdat.
6066 * coffcode.h (handle_COMDAT): Updated.
6067 * cofflink.c (coff_link_add_symbols): Likewise.
6068 * ecoff.c (bfd_debug_section): Likewise.
6070 * targets.c (bfd_target): Add _section_already_linked.
6071 (BFD_JUMP_TABLE_LINK): Updated.
6073 * bfd-in2.h: Regenerated.
6074 * libbfd.h: Likewise.
6075 * libcoff.h: Likewise.
6077 2003-07-21 Paul Brook <paul@codesourcery.com>
6079 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6080 elf_fixup_link_order): New functions.
6081 (bfd_elf_final_link): Call elf_fixup_link_order.
6083 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
6085 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6086 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6088 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6089 _bfd_elf_symbol_refs_local_p.
6090 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6093 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6095 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6097 (bfd_elf_get_dyn_lib_class): New prototype.
6098 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6100 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6101 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6102 entry is needed. Issue an error if a DT_NEEDED entry is needed
6103 for a file marked DYN_NO_NEEDED.
6104 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6107 * bfd-in2.h: Regenerated.
6109 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6111 * elflink.c (elf_section_complain_discarded): Don't complain in
6114 2004-07-10 James E Wilson <wilson@specifixinc.com>
6116 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6117 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6118 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6119 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6121 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6122 bfd_put_64 to bfd_putl64.
6123 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6125 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6128 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6129 .init/.fini sections when trying to relax it.
6131 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6133 * elf.c (assign_file_positions_for_segments): Make sure the
6134 .dynamic section is the first section in the PT_DYNAMIC segment.
6136 2004-07-09 Nick Clifton <nickc@redhat.com>
6138 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6139 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6140 sh_elf_get_flags_from_mach functions so that they do not conflict
6141 when this target is built with other sh-elf targets.
6142 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6143 suppression of this function.
6144 (sh_elf_find_flags): Likewise.
6146 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6148 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6149 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6150 (BFD32_BACKENDS): Add elf32-crx.lo.
6151 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6152 (cpu-crx.lo): New target.
6153 (elf32-crx.lo): New target.
6154 * Makefile.in: Regenerate.
6155 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6156 (bfd_archures_list): Add bfd_crx_arch.
6157 * bfd-in2.h: Regenerate.
6158 * config.bfd: Handle crx-*-elf*, crx*.
6159 * configure.in: Handle bfd_elf32_crx_vec.
6160 * configure: Regenerate.
6161 * cpu-crx.c: New file.
6162 * elf32-crx.c: Likewise.
6163 * libbfd.h: Regenerate.
6164 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6165 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6166 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6167 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6168 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6169 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6170 * targets.c (bfd_elf32_crx_vec): Declare.
6171 (bfd_target_vector): Add bfd_elf32_crx_vec.
6173 2004-07-06 Nick Clifton <nickc@redhat.com>
6175 * config.bfd: Add sh-symbian-elf target.
6176 * configure.in: Add bfd_elf32_shl_symbian_vec.
6177 * configure: Regenerate.
6178 * elf-bfd.h (struct elf_backend_data): Add new field
6180 * elflink.c (elf_link_add_object_symbols): Invoke the
6181 check_directives function, if defined.
6182 * elfxx-target.h: Provide a default, NULL definition for
6184 * targets.c: Add bfd_elf32_shl_symbian_vec.
6185 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6187 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6188 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6189 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6190 not already been defined.
6191 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6192 * sh-symbian.c: New file. Provide functions to support the
6193 * sh-symbian-elf target.
6194 * Makefile.am: Add elf32-sh-symbian.c
6195 * Makefile.in: Regenerate.
6197 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6199 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6200 * Makefile.am: Ran make dep-am.
6201 * Makefile.in: Ran make dep-in.
6203 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6205 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6208 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6210 * config.bfd: Add want64 to configuration target s390-*-linux*.
6212 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6214 * bfd.c (bfd_get_section_ident): New.
6216 * elflink.c (elf_link_read_relocs_from_section): Call
6217 bfd_get_section_ident to identify the section when reporting
6219 (_bfd_elf_link_output_relocs): Likewise.
6220 (elf_link_output_extsym): Likewise.
6221 (elf_link_input_bfd): Likewise.
6222 (bfd_elf_gc_record_vtinherit): Likewise.
6224 * bfd-in2.h: Regenerated.
6226 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6227 Nick Clifton <nickc@redhat.com>
6230 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6231 of section symbols to mips_elf_sort_hash_table ().
6233 2004-07-01 Alan Modra <amodra@bigpond.net.au>
6235 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6237 (elf_section_complain_discarded): New function. Handle
6238 .gcc_except_table too.
6239 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6240 in discarded sections.
6241 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6243 2004-06-30 James E Wilson <wilson@specifixinc.com>
6245 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6246 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6248 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6251 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6252 local references to discarded sections and report their
6255 2004-06-30 Alan Modra <amodra@bigpond.net.au>
6257 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6258 sec_info_type, test section name instead.
6260 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6263 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6264 in .init/.fini sections.
6266 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6268 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6269 bfd_get_section_limit.
6271 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6273 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6274 output section size.
6276 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6278 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6280 (mmix_elf_perform_relocation): Adjust for above change.
6281 (mmix_elf_relocate_section): Likewise.
6282 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6283 (mmix_elf_get_section_contents): Delete.
6284 (bfd_elf64_get_section_contents): Delete.
6285 (mmix_elf_relocate_section): Zero stub area.
6286 * linker.c (default_indirect_link_order): Alloc max of section size
6288 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6289 * section.c (bfd_malloc_and_get_section): Likewise.
6290 (struct bfd_section): Update rawsize comment.
6291 * bfd-in2.h: Regenerate.
6293 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6295 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6297 * bfd-in.h (bfd_get_section_limit): Define.
6298 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6299 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6300 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6301 * coff-arm.c (coff_arm_relocate_section): Likewise.
6302 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6303 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6304 (bfd_ns32k_final_link_relocate): Likewise.
6305 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6306 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6307 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6308 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6309 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6310 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6311 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6312 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6313 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6314 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6315 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6316 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6317 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6318 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6319 * elf32-v850.c (v850_elf_reloc): Likewise.
6320 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6321 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6322 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6323 * elf64-mips.c (mips_elf64_gprel32_reloc)
6324 (mips16_gprel_reloc): Likewise.
6325 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6326 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6327 * elf64-sparc.c (init_insn_reloc): Likewise.
6328 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6329 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6330 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6331 (_bfd_mips_elf_generic_reloc): Likewise.
6332 * bfd-in2.h: Regenerate.
6334 2004-06-28 Alan Modra <amodra@bigpond.net.au>
6336 * bfd-in.h (struct stab_info): Move from stabs.c.
6337 * stabs.c (struct stab_link_includes_table): Delete.
6338 (stab_link_includes_lookup): Delete.
6339 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6340 level of indirection from sinfo parm.
6341 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6342 stabstr section. Adjust hash table accesses.
6343 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6344 alloc. Adjust stab_info test.
6345 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6346 (_bfd_coff_final_link): Adjust stab_info test.
6347 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6348 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6350 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6351 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6352 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6353 stabstr section. Adjust stab_info test.
6354 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6355 (_bfd_write_stab_strings): Adjust prototypes.
6356 * libbfd.h: Regenerate.
6357 * libcoff.h: Regenerate.
6358 * bfd-in2.h: Regenerate.
6360 2004-06-27 Mark Kettenis <kettenis@gnu.org>
6362 From Miod Vallat <miod@online.fr>:
6363 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6365 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
6367 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6368 (struct elf32_mn10300_link_hash_entry): Remove
6369 pcrel_relocs_copied.
6370 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6371 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6372 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6373 and gotoff relocations if the symbol doesn't bind locally. Use
6374 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6375 relocation for PCREL32.
6376 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6377 to test whether a symbol binds locally.
6378 (elf32_mn10300_link_hash_newfunc): Don't initialize
6379 pcrel_relocs_copied.
6380 (_bfd_mn10300_elf_discard_copies): Delete.
6381 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6383 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6385 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6387 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6389 * som.c (som_set_reloc_info): Correct small typo.
6391 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6393 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6394 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6395 (m32r_elf_gcsweep_hook): Likewise.
6396 (m32r_elf_check_relocs): Likewise.
6397 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6398 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6399 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6400 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6401 * bfd-in2.h: Regenerated.
6402 * libbfd.h: Regenerated.
6404 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6406 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6408 (elf64_x86_64_relocate_section): Issue an error for
6409 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6410 against global symbols when building shared library.
6412 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6414 * section.c (struct sec): Rename "_cooked_size" to "size".
6415 Rename "_raw_size" to "rawsize".
6416 (STD_SECTION): Adjust comments.
6417 (bfd_set_section_size, bfd_get_section_contents): Use size.
6418 (bfd_malloc_and_get_section): New function.
6419 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6420 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6421 Correctly free reloc and contents memory.
6422 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6423 and fake CIE now that we can shink section size to zero.
6424 (_bfd_elf_write_section_eh_frame): Likewise..
6425 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6426 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6427 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6428 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6429 unneeded indirection.
6430 * elf.c (_bfd_elf_section_offset): .. and update call.
6431 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6432 * libbfd.h: Regenerate.
6433 * bfd-in2.h: Regenerate.
6435 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6436 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6437 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6438 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6439 Similarly use "rawsize", if non-zero, in reloc functions to validate
6440 reloc addresses. Use new bfd_malloc_and_get_section in most places
6441 where bfd_get_section_contents was called. Expand all occurrences of
6442 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6443 grok_prstatus and similar functions to "size".
6444 * aix386-core.c (aix386_core_file_p): ..
6445 * aix5ppc-core.c (xcoff64_core_p): ..
6446 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6447 aout_adobe_set_section_contents): ..
6448 * aout-target.h (callback): ..
6449 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6450 MY_bfd_final_link): ..
6451 * aoutf1.h (sunos4_core_file_p): ..
6452 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6453 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6454 final_link, aout_link_input_section): ..
6455 * binary.c (binary_object_p, binary_canonicalize_symtab,
6456 binary_set_section_contents): ..
6457 * bout.c (b_out_callback, b_out_write_object_contents,
6458 b_out_set_section_contents, b_out_bfd_relax_section,
6459 b_out_bfd_get_relocated_section_contents): ..
6460 * cisco-core.c (cisco_core_file_validate): ..
6461 * coff-alpha.c (alpha_ecoff_object_p,
6462 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6463 * coff-arm.c (coff_arm_relocate_section,
6464 bfd_arm_allocate_interworking_sections): ..
6465 * coff-h8300.c (h8300_reloc16_extra_cases,
6466 h8300_bfd_link_add_symbols): ..
6467 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6468 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6469 ppc_bfd_coff_final_link): ..
6470 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6471 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6472 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6473 * coff64-rs6000.c (xcoff64_write_object_contents,
6474 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6475 * coffcode.h (coff_compute_section_file_positions,
6476 coff_write_object_contents): ..
6477 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6478 coff_section_symbol, build_debug_section): ..
6479 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6480 process_embedded_commands, _bfd_coff_link_input_bfd,
6481 _bfd_coff_write_global_sym): ..
6482 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6483 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6484 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6485 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6486 _bfd_dwarf2_find_nearest_line): ..
6487 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6488 ecoff_compute_section_file_positions,
6489 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6490 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6491 _bfd_elf_discard_section_eh_frame_hdr,
6492 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6493 _bfd_elf_write_section_eh_frame,
6494 _bfd_elf_write_section_eh_frame_hdr): ..
6495 * elf-hppa.h (elf_hppa_sort_unwind): ..
6496 * elf-m10200.c (mn10200_elf_relax_section,
6497 mn10200_elf_relax_delete_bytes,
6498 mn10200_elf_get_relocated_section_contents): ..
6499 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6500 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6501 mn10300_elf_relax_delete_bytes,
6502 mn10300_elf_get_relocated_section_contents,
6503 _bfd_mn10300_elf_adjust_dynamic_symbol,
6504 _bfd_mn10300_elf_discard_copies,
6505 _bfd_mn10300_elf_size_dynamic_sections,
6506 _bfd_mn10300_elf_finish_dynamic_sections): ..
6507 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6508 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6509 bfd_elf_set_group_contents, map_sections_to_segments,
6510 elf_sort_sections, assign_file_positions_for_segments,
6511 SECTION_SIZE, copy_private_bfd_data,
6512 _bfd_elf_get_dynamic_reloc_upper_bound,
6513 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6514 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6515 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6516 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6517 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6518 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6519 bfd_elf32_arm_process_before_allocation,
6520 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6521 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6522 elf32_arm_write_section): ..
6523 * elf32-cris.c (cris_elf_grok_prstatus,
6524 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6525 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6526 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6527 elf_cris_discard_excess_dso_dynamics,
6528 elf_cris_discard_excess_program_dynamics): ..
6529 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6530 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6531 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6532 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6533 elf32_frvfdpic_size_dynamic_sections,
6534 elf32_frvfdpic_modify_segment_map,
6535 elf32_frvfdpic_finish_dynamic_sections): ..
6536 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6537 elf32_h8_get_relocated_section_contents): ..
6538 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6539 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6540 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6541 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6542 elf32_hppa_finish_dynamic_sections): ..
6543 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6544 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6545 i370_elf_finish_dynamic_sections): ..
6546 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6547 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6548 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6549 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6550 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6551 * elf32-ip2k.c (ip2k_is_switch_table_128,
6552 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6553 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6554 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6555 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6556 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6557 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6558 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6559 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6560 m32r_elf_get_relocated_section_contents): ..
6561 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6562 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6563 m68hc11_elf_relax_delete_bytes): ..
6564 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6565 m68hc12_elf_size_one_stub): ..
6566 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6567 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6568 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6569 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6570 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6571 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6572 elf32_mips_grok_prstatus): ..
6573 * elf32-or32.c (or32_elf_consth_reloc): ..
6574 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6575 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6576 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6577 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6578 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6579 ppc_elf_final_write_processing): ..
6580 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6581 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6582 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6583 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6584 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6585 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6586 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6587 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6588 * elf32-sh64-com.c (sh64_address_in_cranges,
6589 sh64_get_contents_type): ..
6590 * elf32-sh64.c (sh64_find_section_for_address,
6591 sh64_elf_final_write_processing): ..
6592 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6593 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6594 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6595 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6596 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6597 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6598 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6599 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6600 elf_vax_finish_dynamic_sections): ..
6601 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6602 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6603 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6604 xstormy16_elf_finish_dynamic_sections): ..
6605 * elf32-xtensa.c (xtensa_read_table_entries,
6606 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6607 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6608 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6609 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6610 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6611 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6612 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6613 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6614 xtensa_callback_required_dependence): ..
6615 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6616 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6617 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6618 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6619 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6620 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6621 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6622 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6623 * elf64-hppa.c (allocate_dynrel_entries,
6624 elf64_hppa_size_dynamic_sections,
6625 elf64_hppa_finish_dynamic_sections): ..
6626 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6627 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6628 elf64_mips_grok_prstatus): ..
6629 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6630 mmix_elf_relocate_section, mmix_elf_final_link,
6631 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6632 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6633 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6634 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6635 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6636 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6637 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6638 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6639 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6640 ppc64_elf_finish_dynamic_sections): ..
6641 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6642 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6643 elf_s390_finish_dynamic_sections): ..
6644 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6645 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6646 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6647 sh64_elf64_finish_dynamic_sections): ..
6648 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6649 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6650 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6651 sparc64_elf_finish_dynamic_symbol,
6652 sparc64_elf_finish_dynamic_sections): ..
6653 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6654 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6655 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6656 elf64_x86_64_finish_dynamic_sections): ..
6657 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6658 * elfcode.h (elf_slurp_reloc_table): ..
6659 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6660 elf_finalize_dynstr, elf_link_add_object_symbols,
6661 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6662 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6663 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6664 elf32_mips_grok_prstatus): ..
6665 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6666 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6667 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6668 elfNN_ia64_finish_dynamic_sections): ..
6669 * elfxx-mips.c (mips_elf_create_procedure_table,
6670 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6671 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6672 mips_elf_global_got_index, mips_elf_multi_got,
6673 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6674 mips_elf_allocate_dynamic_relocations,
6675 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6676 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6677 _bfd_mips_elf_always_size_sections,
6678 _bfd_mips_elf_size_dynamic_sections,
6679 _bfd_mips_elf_finish_dynamic_symbol,
6680 _bfd_mips_elf_finish_dynamic_sections,
6681 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6682 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6683 _bfd_elf_mips_get_relocated_section_contents,
6684 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6685 * hp300hpux.c (callback): ..
6686 * hppabsd-core.c (make_bfd_asection): ..
6687 * hpux-core.c (make_bfd_asection): ..
6688 * i386linux.c (linux_link_create_dynamic_sections,
6689 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6690 * i386msdos.c (msdos_write_object_contents): ..
6691 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6692 os9k_set_section_contents): ..
6693 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6694 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6695 ieee_write_section_part, do_with_relocs, do_as_repeat,
6696 do_without_relocs, ieee_write_debug_part, init_for_output,
6697 ieee_set_section_contents): ..
6698 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6699 * irix-core.c (do_sections, make_bfd_asection): ..
6700 * libaout.h (aout_section_merge_with_text_p): ..
6701 * libbfd.c (_bfd_generic_get_section_contents,
6702 _bfd_generic_get_section_contents_in_window): ..
6703 * linker.c (default_indirect_link_order): ..
6704 * lynx-core.c (make_bfd_asection): ..
6705 * m68klinux.c (linux_link_create_dynamic_sections,
6706 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6707 * mach-o.c (bfd_mach_o_make_bfd_section,
6708 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6709 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6710 bfd_mach_o_scan_read_segment): ..
6711 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6712 _bfd_merge_sections): ..
6713 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6714 mmo_map_set_sizes, mmo_canonicalize_symtab,
6715 mmo_internal_write_section, mmo_write_object_contents): ..
6716 * netbsd-core.c (netbsd_core_file_p): ..
6717 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6718 nlm_alpha_set_public_section): ..
6719 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6720 * nlm32-sparc.c (nlm_sparc_write_import): ..
6721 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6722 nlm_compute_section_file_positions): ..
6723 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6724 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6725 * opncls.c (get_debug_link_info): ..
6726 * osf-core.c (make_bfd_asection): ..
6727 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6728 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6729 final_link, aout_link_input_section): ..
6730 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6731 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6732 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6733 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6734 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6735 * ptrace-core.c (ptrace_unix_core_file_p): ..
6736 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6737 _bfd_final_link_relocate, bfd_generic_relax_section,
6738 bfd_generic_get_relocated_section_contents): ..
6739 * reloc16.c (bfd_coff_reloc16_relax_section,
6740 bfd_coff_reloc16_get_relocated_section_c): ..
6741 * riscix.c (riscix_some_aout_object_p): ..
6742 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6743 * sco5-core.c (make_bfd_asection): ..
6744 * simple.c (bfd_simple_get_relocated_section_contents): ..
6745 * som.c (som_object_setup, setup_sections, som_prep_headers,
6746 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6747 som_set_reloc_info, som_get_section_contents,
6748 som_bfd_link_split_section): ..
6749 * sparclinux.c (linux_link_create_dynamic_sections,
6750 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6751 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6752 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6753 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6754 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6755 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6756 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6757 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6758 sunos_finish_dynamic_link): ..
6759 * syms.c (_bfd_stab_section_find_nearest_line): ..
6760 * tekhex.c (first_phase, tekhex_set_section_contents,
6761 tekhex_write_object_contents): ..
6762 * trad-core.c (trad_unix_core_file_p): ..
6763 * versados.c (process_esd, process_otr, process_otr): ..
6764 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6765 * vms-misc.c (add_new_contents): ..
6766 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6767 * vms.c (vms_set_section_contents): ..
6768 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6769 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6770 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6771 * xsym.c (bfd_sym_scan): .. See above.
6773 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6775 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6776 calling _bfd_merged_section_offset only for section symbols.
6778 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6780 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6781 for handling SEC_MERGE symbols in relax_section.
6783 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6785 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6786 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6787 linked together. Mark the result as h8300sx code.
6789 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6791 * elf-bfd.h (struct elf_backend_data): Added
6792 elf_backend_omit_section_dynsym.
6793 (_bfd_elf_link_omit_section_dynsym): Declare.
6794 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6795 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6796 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6797 (_bfd_elf_link_renumber_dynsyms): ... this function.
6798 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6799 _bfd_elf_link_omit_section_dynsym).
6800 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6802 2004-06-21 Nick Clifton <nickc@redhat.com>
6804 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6807 2004-06-17 Jerome Guitton <guitton@gnat.com>
6809 * bfd-in.h (bfd_cache_close_all): New function declaration.
6810 * bfd-in2.h: Regenerate.
6811 * cache.c (bfd_cache_close_all): New function definition.
6813 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6815 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6817 * configure: Regenerate.
6819 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6821 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6822 the pre-existing section.
6824 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6826 * section.c (struct sec): Remove usused flags. Reorganize a little.
6827 (bfd_get_section_size_before_reloc): Delete.
6828 (bfd_get_section_size_after_reloc): Delete.
6829 (STD_SECTION): Update.
6830 (bfd_get_section_size_now): Delete.
6831 (bfd_set_section_contents): Don't referece reloc_done.
6832 (bfd_get_section_contents): Remove reloc_done comment.
6833 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6835 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6836 * ecoff.c (bfd_debug_section): Update initializer.
6837 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6838 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6839 * bfd-in.h (bfd_section_size): Expand.
6840 (bfd_get_section_size): New macro.
6841 * bfd-in2.h: Regenerate.
6842 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6843 bfd_get_section_size_before_reloc with bfd_get_section_size.
6844 * coffcode.h (coff_write_object_contents): Likewise.
6845 * coffgen.c (build_debug_section): Likewise.
6846 * dwarf1.c (parse_line_table): Likewise.
6847 (_bfd_dwarf1_find_nearest_line): Likewise.
6848 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6849 * i386msdos.c (msdos_write_object_contents): Likewise.
6850 * pdp11.c (squirt_out_relocs): Likewise.
6851 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6852 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6854 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6856 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6857 removal) with updated comment.
6858 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6860 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6861 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6863 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6865 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6866 overflow on branches to undefweaks.
6868 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6870 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6871 as ecoff_section_data() does not return a valid lvalue.
6873 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6875 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6876 (elf_link_add_object_symbols): Likewise.
6878 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6879 (elf_backend_reloc_type_class): New.
6881 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6883 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6885 * configure: Regenerate.
6887 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6889 From: Albert Chin-A-Young <china@thewrittenword.com>
6890 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6893 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6895 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6898 2004-05-28 DJ Delorie <dj@redhat.com>
6900 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6901 for linking, but otherwise adjust reloc for merged sections.
6903 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6905 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6906 _bfd_merged_section_offset for local symbols.
6908 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6910 * Makefile.am: Regenerate dependencies.
6911 * Makefile.in: Regenerate.
6912 * archures.c: Add bfd_mach_sh3_nommu .
6913 * bfd-in2.h: Regenerate.
6914 * cpu-sh.c: Add sh3-nommu architecture.
6915 (bfd_to_arch_table): Create new table.
6916 (sh_get_arch_from_bfd_mach): Create new function.
6917 (sh_get_arch_up_from_bfd_mach): Create new function.
6918 (sh_merge_bfd_arch): Create new function.
6919 * elf32-sh.c (sh_ef_bfd_table): Add table.
6920 (sh_elf_check_relocs): Replace switch statement with
6921 use of sh_ef_bfd_table .
6922 (sh_elf_get_flags_from_mach): Add new function.
6923 (sh_find_elf_flags): Likewise.
6924 (sh_elf_copy_private_data): Replace most of non-elf contents
6925 with a call to sh_merge_bfd_arch() .
6927 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6929 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6930 * Makefile.in: Regenerate.
6932 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6934 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6935 custom calling conventions for dynamic symbols.
6936 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6937 symbol if it's an alias to a global one.
6939 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6941 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6944 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6946 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6949 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6951 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6952 for SHT_GROUP sections.
6954 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6956 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6958 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6959 * merge.c: Formatting. Remove unnecessary casts. Expand
6960 bfd_get_section_alignment macro.
6961 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6962 use throughout file.
6963 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6964 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6965 section name to determine sinfo group, instead test output section
6967 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6968 _bfd_strip_section_from_output rather than just twiddling flags.
6969 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6970 (_bfd_merge_sections): Update prototype.
6971 * libbfd.h: Regenerate.
6973 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6975 * netbsd-core.c: Correctly indent section that sets architecture
6978 From Miod Vallat <miod@online.fr>:
6979 * m88kopenbsd.c: New file.
6980 * targets.c (m88k_openbsd_vec): New.
6981 * config.bfd: Add m88k-*-openbsd*.
6982 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6983 (m88kopenbsd_vec): New.
6984 * configure: Regenerate.
6985 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6986 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6988 * Makefile.in: Regenerate.
6989 * po/SRC-POTFILES.in: Regenerate.
6991 2004-05-24 Nick Clifton <nickc@redhat.com>
6993 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6994 introduced by hash table size patch.
6996 2004-05-22 Ben Elliston <bje@au.ibm.com>
6998 * configure.in (is_release): Remove.
6999 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7000 (AC_OUTPUT): Don't output bfdver.h from version.h.
7001 * configure: Regenerate.
7002 * Makefile.am (RELEASE): New variable.
7003 (bfdver.h): New target.
7004 * Makefile.in: Regenerate.
7005 * doc/Makefile.in: Likewise.
7007 2004-05-22 Ben Elliston <bje@au.ibm.com>
7009 * Makefile.am (config.status): Don't depend on version.h.
7010 * Makefile.in: Regenerate.
7012 2004-05-22 Alan Modra <amodra@bigpond.net.au>
7014 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7015 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7016 * libbfd.h: Regenerate.
7017 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7018 (_bfd_elf_rel_local_sym): Likewise.
7019 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7020 (elf_link_input_bfd): Likewise.
7021 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7022 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7023 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7024 (elfNN_ia64_relocate_section): Likewise.
7026 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
7028 * hash.c (bfd_default_hash_table_size): New variable.
7029 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7030 (bfd_hash_set_default_size): New function. Set the default size
7031 to a selected prime number close to the argument. Document new
7033 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7034 * bfd-in2.h: Regenerate.
7035 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7036 * Makefile.in: Regenerate.
7038 2004-05-21 Mark Kettenis <kettenis@gnu.org>
7040 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7041 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7042 arm, m68k, m88k and hppa core files.
7044 2004-05-21 Nick Clifton <nickc@redhat.com>
7046 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7047 (bfd_bwrite): Likewise.
7048 (bfd_tell): Likewise.
7049 (bfd_flush): Likewise.
7050 (bfd_stat): Likewise.
7051 (bfd_seek): Likewise.
7052 (bfd_get_mtime): Likewise.
7053 (bfd_get_size): Likewise.
7055 2004-05-19 Ben Elliston <bje@au.ibm.com>
7057 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7059 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7061 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7062 (bfd_generic_openr_next_archived_file): Likewise.
7064 2004-05-17 Bob Wilson <bob.wilson@acm.org>
7066 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7067 section names by inserting a new substring after .gnu.linkonce, except
7068 for .gnu.linkonce.t.* where the "t." is replaced.
7070 2004-05-17 Adam Nemet <anemet@lnxw.com>
7072 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7073 (m68-*-lynxos* case): Likewise.
7074 (powerpc-*-lyxnos* case): New case.
7075 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7077 2004-05-17 David Heine <dlheine@tensilica.com>
7079 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7080 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7081 * bfd.c (bfd_copy_private_header_data): Define.
7082 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7084 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7085 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7086 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7087 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7088 segments by calling copy_private_bfd_data.
7089 (_bfd_elf_copy_private_header_data): Define.
7090 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7091 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7092 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7093 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7094 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7095 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7096 * som.c (som_bfd_copy_private_header_data): Define.
7097 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7098 * vms.c (vms_bfd_copy_private_header_data): Define.
7099 * bfd-in2.h: Regenerate.
7100 * libbfd.h: Regenerate.
7102 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7104 * elfxx-mips.c (MINUS_TWO): Define.
7105 (mips_elf_higher, mips_elf_highest,
7106 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7107 some bfd_vma values.
7108 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7110 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7112 * som.c (log2): Rename to exact_log2. Adjust all callers.
7114 2004-05-13 Paul Brook <paul@codesourcery.com>
7116 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7117 dwarf3 format CIE entries. Remove comment about the size of the
7118 ra_column field. It is now correctly deduced.
7120 2004-05-13 Joel Sherrill <joel@oarcorp.com>
7122 * config.bfd (or32-*-rtems*): Switch to elf.
7124 2004-05-13 Nick Clifton <nickc@redhat.com>
7126 * po/fr.po: Updated French translation.
7128 2004-05-11 Jakub Jelinek <jakub@redhat.com>
7130 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7131 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7132 Adjust counting of last_local.
7133 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7134 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7135 created by the linker nor !SHF_ALLOC.
7137 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7138 DT_PLTGOT to the start of the .got.plt section instead of the
7139 .got output section. Set sh_entsize for .got section in addition
7141 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7142 is at sgot->output_section->vma.
7143 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7144 DT_PLTGOT to the start of the .got.plt section instead of the
7145 .got output section.
7146 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7147 is at sgot->output_section->vma. Set sh_entsize for .got section
7148 in addition to .got.plt.
7149 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7150 (bfd_section_from_phdr): Likewise.
7151 (map_sections_to_segments): Likewise.
7152 (assign_file_positions_for_segments): Likewise.
7153 (get_program_header_size): Likewise.
7154 * elflink.c (bfd_elf_size_dynamic_sections): Set
7155 elf_tdata (output_bfd)->relro from info->relro.
7156 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7158 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
7160 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7161 a zero symndx for which we hadn't accounted a dynamic relocation.
7162 (_frvfdpic_add_rofixup): Likewise.
7164 2004-05-07 Brian Ford <ford@vss.fsi.com>
7165 DJ Delorie <dj@redhat.com>
7167 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7168 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7169 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7170 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7172 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
7174 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7175 immediately if there's no link info.
7176 (elf32_frvfdpic_copy_private_bfd_data): New.
7177 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7179 2004-05-06 Zack Weinberg <zack@codesourcery.com>
7181 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7182 filename argument is null; do not call strlen on a null pointer.
7184 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
7186 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7189 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
7191 * configure.in (bfd_elf32_frvfdpic_vec): New.
7192 * configure: Rebuilt.
7193 * targets.c (bfd_elf32_frvfdpic_vec): New.
7194 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7196 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7197 frvfdpic instead of frv. Rearrange elf-target macros such that
7198 the FDPIC-specific ones are only defined for this new target
7200 (bfd_elf32_frvfdpic_vec): Declare.
7202 (elf32_frv_relocate_section): Use it to enable segment checking
7203 and to control rofixup emission. Add output section vma to
7204 applied relocation in non-LOAD non-ALLOC sections. Use
7205 _bfd_error_handler for errors.
7206 (_frv_create_got_section): Create .rel.got and .rofixup only in
7207 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7209 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7210 (elf32_frvfdpic_modify_segment_map): Likewise.
7211 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7212 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7213 error message if we miscompute the rofixup size.
7214 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7215 (frvfdpic_elf_encode_eh_address): Likewise.
7216 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7217 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7218 relocs. Reject unknown relocation types.
7219 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7220 (frv_elf_merge_private_bfd_data): Likewise.
7221 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7222 0x4000 for newly-added elf32-frvfdpic.
7224 2004-05-05 Nick Clifton <nickc@redhat.com>
7227 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7228 returning NULL as most users of this function do not check its
7230 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7231 of bfd_cache_lookup().
7232 * sco5-core.c (sco5_core_file_p): Likewise.
7233 * trad-core.c (trad_unix_core_file_p): Likewise.
7235 2004-05-05 Nick Clifton <nickc@redhat.com>
7237 * cache.c (bfd_cache_lookup): Improve formatting.
7238 * archive.c: Fix formatting.
7240 2004-05-05 Peter Barada <peter@the-baradas.com>
7242 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7243 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7244 * bfd-in2.h(bfd_architecture): Regenerate.
7246 2004-05-03 Alan Modra <amodra@bigpond.net.au>
7248 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7250 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7251 those against discarded link-once and SEC_MERGE section symbols.
7253 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7255 * section.c (bfd_get_section_by_name_if): New.
7256 * bfd-in2.h: Regenerated.
7258 2004-05-02 Alan Modra <amodra@bigpond.net.au>
7260 * som.c (som_bfd_is_group_section): Define.
7262 2004-05-01 Alan Modra <amodra@bigpond.net.au>
7264 * section.c (bfd_make_section_anyway): Copy the whole
7265 bfd_hash_entry, not just "next" from existing entry.
7267 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7269 * elf.c (bfd_section_from_shdr): Maintain the section order in
7271 (special_sections): Add ".note.GNU-stack".
7272 (elf_fake_sections): Handle section group for relocatable
7275 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7277 * section.c (bfd_sections_find_if): New.
7278 * bfd-in2.h: Regenerated.
7280 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7282 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7284 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7285 * elf.c (bfd_elf_is_group_section): New function.
7286 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7287 * section.c (bfd_generic_is_group_section): New function.
7288 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7289 (BFD_JUMP_TABLE_LINK): Adjust.
7290 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7291 * aout-target.h (MY_bfd_is_group_section): Define.
7292 * aout-tic30.c (MY_bfd_is_group_section): Define.
7293 * bfd.c (bfd_is_group_section): Define.
7294 * binary.c (binary_bfd_is_group_section): Define.
7295 * bout.c (b_out_bfd_is_group_section): Define.
7296 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7297 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7298 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7299 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7300 * coffcode.h (coff_bfd_is_group_section): Define.
7301 * i386msdos.c (msdos_bfd_is_group_section): Define.
7302 * i386os9k.c (os9k_bfd_is_group_section): Define.
7303 * ieee.c (ieee_bfd_is_group_section): Define.
7304 * ihex.c (ihex_bfd_is_group_section): Define.
7305 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7306 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7307 * mmo.c (mmo_bfd_is_group_section): Define.
7308 * nlm-target.h (nlm_bfd_is_group_section): Define.
7309 * oasys.c (oasys_bfd_is_group_section): Define.
7310 * pef.c (bfd_pef_bfd_is_group_section): Define.
7311 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7312 * srec.c (srec_bfd_is_group_section): Define.
7313 * tekhex.c (tekhex_bfd_is_group_section): Define.
7314 * versados.c (versados_bfd_is_group_section): Define.
7315 * vms.c (vms_bfd_is_group_section): Define.
7316 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7317 * bfd-in2.h: Regenerate.
7318 * libbfd.h: Regenerate.
7320 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7322 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7324 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
7326 * configure.in: Update version to 2.15.91.
7327 * configure: Regenerate.
7329 2004-04-29 Brian Ford <ford@vss.fsi.com>
7331 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7332 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7333 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7334 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7335 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7336 .gnu.linkonce.wi. sections.
7337 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7338 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7340 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7341 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7343 2004-04-28 Chris Demetriou <cgd@broadcom.com>
7345 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7346 * bfd-in2.h: Regenerate.
7347 * libbfd.h: Likewise.
7349 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7351 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7353 (setup_sections): Use som_subspace_dictionary_record struct instead
7354 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7355 is_comdat, is_common or dup_common.
7356 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7357 is_comdat, is_common and dup_common in section subspace_dict from
7359 (som_begin_writing): Use som_subspace_dictionary_record struct.
7360 (som_finish_writing): Likewise.
7361 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7362 is_common and dup_common flags in info for symbol. Add comment
7363 regarding linker support for these fields. Slightly reorganize
7365 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7366 dup_common fields in symbol table from symbol info.
7367 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7368 arguments. Set corresponding fields in copy_data. Change all callers.
7369 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7371 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7372 * som.h (som_subspace_dictionary_record): Define.
7373 (som_copyable_section_data_struct): Add is_comdat, is_common and
7375 (som_section_data_struct): Use som_subspace_dictionary_record struct
7376 instead of subspace_dictionary_record.
7377 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7379 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7381 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7382 if set. Check reloc_done flag before applying relocations. Use
7383 output addresses, both when applying relocations and when comparing
7384 against the specified section.
7385 (elf_xtensa_relocate_section): Use output address to check if dynamic
7386 reloc is in a literal pool. Set section's reloc_done flag.
7388 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7390 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7391 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7393 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7396 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7398 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7399 structure field removed in 2004-04-24 patch.
7400 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7402 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7404 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7405 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7406 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7407 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7408 field before calling elf_backend_section_flags.
7410 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7412 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7413 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7414 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7415 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7416 and BFD_RELOC_32_PCREL.
7417 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7418 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7419 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7420 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7421 (mips_elf_next_relocation): Move comment about matching HI/LO
7423 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7424 R_MIPS_GNU_REL_HI16.
7426 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7428 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7429 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7430 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7431 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7432 and update comments to reflect current usage.
7433 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7434 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7436 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7437 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7438 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7439 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7440 type number to be MIPS_R_PCREL16.
7441 (mips_relocate_section): Remove support for link-time relaxation
7442 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7443 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7444 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7445 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7446 relaxation of branches used by embedded-PIC.
7447 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7448 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7449 related members, update comment.
7450 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7451 code related to embedded-PIC.
7452 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7453 initialization of now-removed 'adjust' member of
7454 'struct ecoff_debug_info'.
7456 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7458 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7460 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7462 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7463 relocs for locally defined symbols during -shared final link.
7464 (elf32_arm_final_link_relocate): Likewise.
7466 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7468 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7469 ELF_LINK_POINTER_EQUALITY_NEEDED.
7470 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7471 if r_type is not R_X86_64_PC32.
7472 (elf64_x86_64_finish_dynamic_symbol): If
7473 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7476 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7478 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7479 (elf_backend_plt_sym_val): Define.
7481 2004-04-22 Andrew Cagney <cagney@redhat.com>
7483 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7485 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7487 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7489 * som.c (som_set_section_contents): Constantify second argument.
7490 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7491 (som_object_setup): Rework to avoid warning.
7492 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7495 2004-04-22 Andrew Cagney <cagney@redhat.com>
7497 * cache.c (bfd_cache_close): Check for a previously closed file.
7499 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7501 * bfd.c (bfd_get_synthetic_symtab): Define.
7502 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7503 NAME##_get_synthetic_symtab.
7504 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7505 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7506 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7508 (_bfd_elf_get_synthetic_symtab): New prototype.
7509 * elfcode.h (elf_get_synthetic_symtab): Define.
7510 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7511 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7512 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7513 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7514 * bfd-in2.h: Rebuilt.
7515 * libbfd.h: Rebuilt.
7516 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7517 (elf_backend_plt_sym_val): Define.
7518 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7519 (elf_backend_plt_sym_val): Define.
7520 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7521 (elf_backend_plt_sym_val): Define.
7522 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7523 (elf_backend_plt_sym_val): Define.
7524 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7525 (elf_backend_plt_sym_val): Define.
7526 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7527 (elf_backend_plt_sym_val): Define.
7528 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7529 (elf_backend_plt_sym_val): Define.
7530 * aout-target.h (MY_get_synthetic_symtab): Define.
7531 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7532 * coff-rs6000.c (rs6000coff_vec): Add
7533 _bfd_nodynamic_get_synthetic_symtab.
7534 (pmac_xcoff_vec): Likewise.
7535 * coff64-rs6000.c (rs6000coff64_vec): Add
7536 _bfd_nodynamic_get_synthetic_symtab.
7537 (aix5coff64_vec): Likewise.
7538 * sunos.c (MY_get_synthetic_symtab): Define.
7539 * vms.c (vms_get_synthetic_symtab): Define.
7541 2004-04-22 Nick Clifton <nickc@redhat.com>
7543 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7545 2004-04-22 Peter Barada <peter@the-baradas.com>
7547 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7548 * bfd2-in.h: Regenerate.
7549 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7551 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7553 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7554 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7555 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7556 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7557 * bfd-in2.h: Regenerate.
7559 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7561 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7562 require relocations against a weak symbol to reference the same
7563 symbol hash entry if not a final, static link.
7564 (get_cached_value, add_value_map): Add final_static_link argument.
7565 (remove_literals): Pass final_static_link argument as needed.
7567 2004-04-21 Andrew Cagney <cagney@redhat.com>
7569 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7570 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7571 (opncls_bwrite, opncls_bclose, opncls_bflush)
7572 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7573 bfd iovec that uses function callbacks.
7574 (bfd_close): Use the iovec's bclose.
7575 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7576 (cache_bclose, cache_bflush, cache_bstat)
7577 (cache_iovec): New functions and global variable, implement a
7578 cache "iovec", where applicable set bfd_error.
7579 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7580 * bfdio.c (struct bfd_iovec): Define.
7581 (real_read): Delete function.
7582 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7583 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7584 assume that bread and bwrite set bfd_error.
7585 * bfd.c (struct bfd): Add "iovec", update comments.
7586 * bfd-in2.h, libbfd.h: Re-generate.
7588 2004-04-21 Andrew Cagney <cagney@redhat.com>
7590 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7592 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7594 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7595 (bfd_elf_gc_sections): Fail if a shared object is being created.
7596 Do not fail if dynamic sections have been created. Instead call
7597 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7598 dynamically referenced symbols. Do not mark the whole graph
7599 rooted at .eh_frame, only the section proper.
7601 2004-04-20 DJ Delorie <dj@redhat.com>
7603 * reloc.c: Add BFD_RELOC_32_SECREL.
7604 * bfd-in2.h: Regenerate.
7605 * libbfd.h: Likewise.
7606 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7607 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7608 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7610 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7612 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7613 relocs against hidden/protected undefweak symbols properly.
7614 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7616 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7618 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7619 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7622 2004-04-17 Brian Ford <ford@vss.fsi.com>
7624 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7625 filepos for the SizeOfHeaders field.
7626 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7628 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7630 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7632 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7633 change reloc_done. Set and restore _cooked_size.
7636 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7638 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7641 2004-04-15 Nick Clifton <nickc@redhat.com>
7643 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7645 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7647 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7649 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7651 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7652 when it is a definition.
7654 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7656 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7657 when statically linking PIC code.
7658 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7660 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7662 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7663 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7664 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7665 * configure: Regenerate.
7667 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7669 * elflink.c: Include libiberty.h.
7670 * Makefile.am (elflink.lo): Depend on libiberty.h.
7671 * Makefile.in: Regenerate.
7673 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7675 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7678 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7680 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7681 reserve the memory for dynamic linker
7683 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7685 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7686 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7688 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7690 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7691 RELOC_FOR_GLOBAL_SYMBOL.
7692 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7694 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7696 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7697 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7699 2004-04-01 Paul Brook <paul@codesourcery.com>
7701 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7702 * elf32-arm.h (struct elf32_elf_section_map): New.
7703 (struct _arm_elf_section_data): New.
7704 (elf32_arm_section_data): Define.
7705 (struct elf32_arm_link_hash_table): Add byteswap_code.
7706 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7707 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7708 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7709 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7710 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7711 (bfd_elf32_new_section_hook, elf_backend_write_section,
7712 elf_backend_link_output_symbol_hook): Define.
7714 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7716 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7717 that keeps the characters in a B_INCL..B_EINCL range.
7718 (_bfd_link_section_stabs): When computing the sum of the
7719 characters in a B_INCL..B_EINCL range also keep a copy of those
7720 characters. Use this information to distinguish between
7721 include sections that have the same sum and the same length
7722 but which are nevertheless unique.
7724 2004-03-31 Paul Brook <paul@codesourcery.com>
7726 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7727 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7729 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7731 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7732 to 'sum_chars' and add field 'num_chars'.
7733 (_bfd_link_section_stabs): When computing the sum of the
7734 characters in a B_INCL..B_EINCL range also keep a count of the
7735 number of characters. Use this information to help distinguish
7736 between include sections when have the same sum but which
7737 nevertheless are still unique.
7739 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7741 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7743 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7744 Tomer Levi <Tomer.Levi@nsc.com>
7746 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7747 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7748 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7749 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7750 (cpu-cr16c.lo): New target.
7751 (elf32-cr16c.lo): Likewise.
7752 * Makefile.in: Regenerate.
7753 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7754 (bfd_archures_list): Add bfd_cr16c_arch.
7755 * config.bfd: Handle cr16c-*-elf*.
7756 * configure.in: Handle bfd_elf32_cr16c_vec.
7757 * configure: Regenerate.
7758 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7759 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7760 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7761 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7762 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7763 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7764 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7765 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7766 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7767 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7768 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7769 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7770 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7771 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7772 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7773 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7774 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7775 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7776 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7777 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7778 * targets.c (bfd_elf32_cr16c_vec): Declare.
7779 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7780 * cpu-cr16c.c: New file.
7781 * elf32-cr16c.c: Likewise.
7782 * libbfd.h: Regenerate.
7783 * bfd-in2.h: Likewise.
7785 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7787 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7789 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7791 * Makefile.am: Remove all mention of elflink.h.
7792 * Makefile.in: Regenerate.
7793 * bfd-in.h (bfd_elf_discard_info): Declare.
7794 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7795 * bfd-in2.h: Regenerate.
7796 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7797 bfd_elf32_link_record_dynamic_symbol,
7798 bfd_elf64_link_record_dynamic_symbol,
7799 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7800 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7801 _bfd_elf32_link_record_local_dynamic_symbol,
7802 _bfd_elf64_link_record_local_dynamic_symbol,
7803 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7804 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7805 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7806 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7807 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7808 _bfd_elf32_reloc_symbol_deleted_p,
7809 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7810 (bfd_elf_link_record_dynamic_symbol,
7811 bfd_elf_link_record_local_dynamic_symbol,
7812 bfd_elf_final_link, bfd_elf_gc_sections,
7813 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7814 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7815 bfd_elf_reloc_symbol_deleted_p): Declare.
7816 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7817 * elf32-arm.h: Update for changed function names. Remove local
7818 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7819 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7820 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7821 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7822 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7823 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7824 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7825 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7826 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7827 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7828 (bfd_elfNN_print_symbol): Define.
7829 * elfcode.h: Don't include elflink.h.
7830 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7831 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7832 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7833 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7834 elf_link_record_local_dynamic_symbol): Don't define.
7835 * elflink.c: Update for changed function names. Move elflink.h
7837 * elflink.h: Delete file.
7838 * po/SRC-POTFILES.in: Regenerate.
7839 * po/bfd.pot: Regenerate.
7841 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7843 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7844 "name" for global syms accidentally removed in 2004-03-20 change.
7846 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7848 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7849 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7850 where Elf_External_* is different for 64 and 32 bit, with
7851 corresponding elf_size_info field.
7852 (struct elf_final_link_info): Use "bfd_byte *" instead
7853 of "Elf_External_Sym *" for external_syms and symbuf.
7854 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7855 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7856 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7857 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7858 (elf_link_sort_cmp2): Adjust.
7859 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7860 using ELF_R_SYM macro. Set u.sym_mask.
7861 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7862 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7863 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7864 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7865 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7866 swap_syn_out functions. Rearrange dyn swap in/out switch.
7867 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7868 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7869 (elf_link_flush_output_syms): Add elf_backend_data arg.
7870 (elf_link_check_versioned_symbol): Likewise.
7871 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7872 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7873 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7874 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7875 ELF_R_TYPE and ELF_R_INFO macros.
7876 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7877 based on size rather than using ELF_R_INFO.
7878 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7880 (struct alloc_got_off_arg): New.
7881 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7882 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7883 (elf_gc_allocate_got_offsets): Adjust.
7884 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7885 ELF_R_SYM. Use bfd_section_from_elf_index.
7886 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7887 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7888 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7890 2004-03-26 Stan Shebs <shebs@apple.com>
7892 Remove MPW support, no longer used.
7893 * config.bfd (powerpc-*-mpw*): Remove configuration.
7894 * mpw-config.in, mpw-make.sed: Remove files.
7895 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7897 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7899 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7900 (ppc64_elf_add_symbol_hook): New function.
7901 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7902 const from Elf_Internal_Sym param.
7903 * elflink.c (elf_link_add_object_symbols): Adjust.
7904 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7905 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7906 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7907 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7908 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7909 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7910 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7911 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7912 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7913 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7914 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7915 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7916 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7917 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7918 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7919 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7921 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7923 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7924 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7925 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7926 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7927 (bfd_elf64_bfd_link_add_symbols): Delete.
7928 (bfd_elf_link_add_symbols): Declare.
7929 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7930 * elflink.c: Include safe-ctype.h.
7931 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7933 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7934 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7936 (elf_link_add_archive_symbols): Rename from
7937 _bfd_elf_link_add_archive_symbols, make static.
7938 (elf_link_add_object_symbols): New function. Corresponding
7939 elflink.h function converted to use elf_size_info.
7940 (bfd_elf_link_add_symbols): Likewise.
7941 (bfd_elf_size_dynamic_sections): Adjust.
7942 * elflink.h (elf_bfd_link_add_symbols): Delete.
7943 (elf_link_add_object_symbols): Delete.
7944 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7945 bfd_elf_link_add_symbols.
7946 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7948 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7950 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7951 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7953 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7954 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7955 (_bfd_elf_add_dt_needed_tag): Declare.
7956 (_bfd_elf_sort_symbol): Declare.
7957 (_bfd_elf_finalize_dynstr): Declare.
7958 (RELOC_FOR_GLOBAL_SYM): Formatting.
7959 * elfcode.h (elf_add_dynamic_entry): Delete.
7960 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7961 elflink.h function converted to use elf_size_info.
7962 (_bfd_elf_add_dt_needed_tag): Likewise.
7963 (_bfd_elf_sort_symbol): Likewise.
7964 (_bfd_elf_finalize_dynstr): Likewise.
7965 (compute_bucket_count): Likewise.
7966 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7967 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7968 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7969 * elflink.h: ..here.
7970 (sort_symbol, add_dt_needed_tag): Delete.
7971 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7972 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7974 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7975 * elf32-cris.c (add_dynamic_entry): Likewise.
7976 * elf32-hppa.c (add_dynamic_entry): Likewise.
7977 * elf32-i370.c (add_dynamic_entry): Likewise.
7978 * elf32-i386.c (add_dynamic_entry): Likewise.
7979 * elf32-m32r.c (add_dynamic_entry): Likewise.
7980 * elf32-m68k.c (add_dynamic_entry): Likewise.
7981 * elf32-ppc.c (add_dynamic_entry): Likewise.
7982 * elf32-s390.c (add_dynamic_entry): Likewise.
7983 * elf32-sh.c (add_dynamic_entry): Likewise.
7984 * elf32-sparc.c (add_dynamic_entry): Likewise.
7985 * elf32-vax.c (add_dynamic_entry): Likewise.
7986 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7987 * elf64-alpha.c (add_dynamic_entry): Likewise.
7988 * elf64-hppa.c (add_dynamic_entry): Likewise.
7989 * elf64-ppc.c (add_dynamic_entry): Likewise.
7990 * elf64-s390.c (add_dynamic_entry): Likewise.
7991 * elf64-sparc.c (add_dynamic_entry): Likewise.
7992 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7993 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7994 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7995 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7996 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7997 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7999 2004-03-23 Paul Brook <paul@codesourcery.com>
8001 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8003 2004-03-22 Bob Wilson <bob.wilson@acm.org>
8005 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8006 literal tables and check for relocs outside of literal pools.
8007 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8008 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8010 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8011 (elf_xtensa_relocate_section): Read literal tables and check for
8012 dynamic relocations in read-only sections and not in literal pools.
8014 2004-03-23 Alan Modra <amodra@bigpond.net.au>
8017 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8019 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
8021 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8022 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8023 not defined by the executable, or defined in a DSO.
8024 <eliding run-time relocation of .got>: Initialize GOT entry for a
8025 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8027 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8028 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8029 a PLT reloc to GOT for an executable.
8030 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8031 .got for a DSO and explain why.
8032 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8033 and unreferenced symbols for which a PLT is defined. Adjust
8034 dynamic-symbol pruning correspondingly, to make sure we don't lose
8035 a dynamic symbol also defined by a DSO.
8037 2004-03-22 Alan Modra <amodra@bigpond.net.au>
8039 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8040 and rel args. Group input and output args. Wrap to 80 columns.
8041 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8042 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8043 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8044 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8045 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8046 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8047 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8048 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8049 RELOC_FOR_GLOBAL_SYMBOL invocation.
8051 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8053 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8054 unresolved symbols in objects aren't allowed.
8056 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8058 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8059 (elf_hppa_unmark_useless_dynamic_symbols):
8060 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8061 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8062 (elf32_hppa_relocate_section): Likewise.
8063 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8064 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8065 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8066 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8067 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8069 * elf-m10200.c (mn10200_elf_relocate_section): Use
8070 RELOC_FOR_GLOBAL_SYMBOL.
8071 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8072 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8073 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8074 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8075 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8076 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8077 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8078 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8079 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8080 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8081 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8082 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8084 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8086 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8087 (final_link_relocate): Likewise.
8088 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8089 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8091 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8093 * Makefile.am: Run "make dep-am".
8094 * Makefile.in: Regenerate.
8095 * aclocal.m4: Regenerate.
8096 * config.in: Regenerate.
8097 * po/bfd.pot: Regenerate.
8099 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8100 H.J. Lu <hongjiu.lu@intel.com>
8102 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8103 type and size change code to where it was previously. Remove
8104 dt_needed param. Treat old weak syms as strong if new sym is
8105 from a shared lib, even when old sym is from another shared
8106 lib. Remove unnecessary tests of oldweak and newweak. Correct
8108 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8109 _bfd_elf_merge_symbol calls.
8110 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8111 dt_needed local var. Update comments.
8112 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8113 (_bfd_elf_add_default_symbol): Likewise.
8115 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8116 strong syms in one shared object overriding weak syms in another.
8118 2004-03-18 Alan Modra <amodra@bigpond.net.au>
8120 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8121 dyn_lib_class field. Rearrange for better packing.
8122 (elf_dt_soname): Delete.
8123 (elf_dyn_lib_class): Define.
8124 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8125 (bfd_elf_set_dt_needed_soname): Delete.
8126 (bfd_elf_set_dyn_lib_class): New function.
8127 * elflink.h (add_dt_needed_tag): New function. Split out from..
8128 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8129 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8130 initialization of soname.
8131 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8133 * bfd-in.h (enum dynamic_lib_link_class): New.
8134 (bfd_elf_set_dt_needed_soname): Delete.
8135 (bfd_elf_set_dyn_lib_class): Declare.
8136 * bfd-in2.h: Regenerate.
8138 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8139 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8140 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8141 symbol loop. Instead use add_needed to flag tag as written.
8143 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8145 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8146 logic for null_input_bfd detection.
8148 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8150 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8152 2004-03-16 Mark Kettenis <kettenis@gnu.org>
8154 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8157 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8159 * elflink.c (elf_link_read_relocs_from_section): Don't use
8160 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8161 (_bfd_elf_link_read_relocs): ..to here.
8162 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8164 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8166 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8167 values selected in configure.host. Require both to be defined
8168 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8169 corresponding BFD_HOST vars with quotes.
8170 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8171 Always require BFD_HOST_64_BIT_DEFINED.
8172 <file_ptr type>: Find off_t size before emitting message. Combine
8173 off_t and ftello64 conditional.
8174 * configure: Regenerate.
8176 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8178 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8179 aliasing warning. Remove trailing whitespace throughout file.
8181 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8183 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8184 input_section in calls to get_dyn_name.
8185 * 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
8187 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8189 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8191 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8192 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8193 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8194 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8195 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8196 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8197 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8199 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8200 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8201 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8202 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8203 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8204 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8205 (read_8_bytes, read_indirect_string, read_address): Likewise.
8206 (read_abbrevs, parse_comp_unit): Likewise.
8207 * targets.c (struct bfd_target): Likewise.
8208 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8209 * hppabsd-core.c: Likewise. Formatting.
8210 * hpux-core.c: Likewise.
8211 * irix-core.c: Likewise.
8212 * netbsd-core.c: Likewise.
8213 * osf-core.c: Likewise.
8214 * ptrace-core.c: Likewise.
8215 * sco5-core.c: Likewise.
8216 * trad-core.c: Likewise.
8217 * configure: Regenerate.
8218 * bfd-in2.h: Regenerate.
8220 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8222 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8223 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8224 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8225 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8226 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8227 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8228 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8229 * libbfd.c: Likewise in function definitions.
8230 (bfd_put_8): Mask with 0xff rather than casting to char.
8231 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8232 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8233 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8234 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8235 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8236 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8237 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8238 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8239 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8240 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8241 * archive.c (do_slurp_coff_armap): Update swap prototype.
8242 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8243 (tic54x_getl_signed_32): Likewise.
8244 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8245 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8246 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8247 (bfd_getp_signed_32, bfd_putp32): Likewise.
8248 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8249 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8250 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8251 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8252 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8253 bfd_h_getx_signed_16, bfd_h_putx16.
8254 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8255 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8256 * hpux-core.c: Likewise.
8257 * irix-core.c: Likewise.
8258 * netbsd-core.c: Likewise.
8259 * osf-core.c: Likewise.
8260 * ptrace-core.c: Likewise.
8261 * sco5-core.c: Likewise.
8262 * trad-core.c: Likewise.
8263 * bfd-in2.h: Regenerate.
8265 2004-03-15 Matt Thomas <matt@3am-software.com>
8267 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8270 2004-03-13 Mark Kettenis <kettenis@gnu.org>
8272 * config.bfd: Add x86_64-*-openbsd*.
8273 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8275 * configure: Regenerate.
8277 2004-03-12 Nick Clifton <nickc@redhat.com>
8278 Dave Murphy <wintermute2k4@ntlworld.com>
8280 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8281 if the input bfd does not contain any code.
8283 2004-03-09 Steve Ellcey <sje@cup.hp.com>
8285 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8287 2004-03-05 Fred Fish <fnf@redhat.com>
8289 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8290 mips16 symbols to be even rather than testing first for even/odd.
8291 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8293 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8295 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8298 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
8300 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8301 undefined symbols as hash_new.
8303 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8305 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8307 * elf32-sh.c: Ditto.
8308 * bfd-in2.h: Regenerate.
8310 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
8312 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8314 (_frv_count_got_plt_entries): Initialize them.
8315 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8317 (frv_pic_relocs_info_for_global): Likewise.
8318 (frv_pic_relocs_info_for_local): Likewise.
8319 (frv_pic_merge_early_relocs_info): New.
8320 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8322 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8323 Check that we don't exceed the allocated count for entry.
8324 (_frv_add_rofixup): Likewise.
8325 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8326 (elf32_frv_finish_dynamic_sections): Improve error message in case
8327 we emit too few rofixup entries.
8329 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
8331 * archures.c (bfd_mach_fr450): New.
8332 * bfd-in2.h: Regenerate.
8333 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8334 (arch_info_500): Link to it.
8335 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8336 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8337 (frv_elf_arch_extension_p): New function.
8338 (frv_elf_merge_private_bfd_data): Use it.
8340 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8342 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8344 * elflink.h (is_global_data_symbol_definition): Moved to
8346 (elf_link_is_defined_archive_symbol): Likewise.
8347 (elf_link_add_archive_symbols): Likewise. Renamed to
8348 _bfd_elf_link_add_archive_symbols.
8350 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8351 of ELF symbol table entry from backend.
8352 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8353 instead of elf_link_add_object_symbols.
8355 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8357 * elf-bfd.h (struct elf_backend_data): Added
8358 elf_backend_can_make_relative_eh_frame,
8359 elf_backend_can_make_lsda_relative_eh_frame and
8360 elf_backend_encode_eh_address.
8361 (_bfd_elf_encode_eh_address): Declare.
8362 (_bfd_elf_can_make_relative): Declare.
8363 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8364 hooks to decide whether to attempt to make_relative and
8366 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8367 (_bfd_elf_can_make_relative): New.
8368 (_bfd_elf_encode_eh_address): New.
8369 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8370 (frv_elf_encode_eh_address): New.
8371 (elf_backend_can_make_relative_eh_frame): Define.
8372 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8373 (elf_backend_encode_eh_address): Define.
8375 (elf_backend_can_make_relative_eh_frame): Define.
8376 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8377 (elf_backend_encode_eh_address): Define.
8378 (elfNN_bed): Add them.
8380 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8382 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8383 complain_on_overflow to signed.
8385 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8387 * elflink.h (sort_symbol): New.
8388 (elf_link_add_object_symbols): Use a sorted symbol array for
8391 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8393 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8394 for pc relative relocs.
8395 (elf_s390_relocate_section): Likewise.
8396 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8397 for pc relative relocs.
8398 (elf_s390_relocate_section): Likewise.
8400 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8402 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8405 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8407 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8408 field to track if a relocation is against readonly section.
8409 (count_dyn_reloc): Take a new argument for rent->reltext.
8410 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8411 (get_reloc_section): Don't set ia64_info->reltext here.
8412 (allocate_dynrel_entries): Set ia64_info->reltext here.
8414 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8416 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8417 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8418 function's descriptor to symbol+offset, and map local undefweak
8419 symbol to NULL function descriptor.
8420 (elf32_frv_relocate_section): Likewise.
8422 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8424 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8426 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8427 (netbsd_core_file_p): Set architecture from machine ID for
8430 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8432 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8433 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8435 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8437 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8438 symbols with non-default visibility.
8440 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8442 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8443 IMAGE_SCN_MEM_WRITE on known sections only.
8445 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8447 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8448 symbols used in PIE relocs.
8450 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8452 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8455 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8457 * configure.in: Update version to 2.15.90.
8458 * configure: Regenerate.
8460 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8461 Richard Sandiford <rsandifo@redhat.com>
8463 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8464 _bfd_elf_symbol_refs_local_p to decide whether to decay
8465 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8466 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8467 relocs if the symbol wasn't defined by a regular object file.
8468 Don't check the symbol's dynindx.
8470 2004-02-16 Andrew Cagney <cagney@redhat.com>
8472 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8474 * bfd-in2.h: Re-generate.
8476 2004-02-14 Andrew Cagney <cagney@redhat.com>
8478 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8479 _LARGEFILE64_SOURCE.
8481 2004-02-13 Andrew Cagney <cagney@redhat.com>
8483 * elf.c (vma_page_aligned_bias): New function.
8484 (assign_file_positions_except_relocs)
8485 (assign_file_positions_for_segments): Replace broken modulo
8486 arithmetic with call to vma_page_aligned_bias.
8488 2004-02-11 Andrew Cagney <cagney@redhat.com>
8490 * bfd-in.h: Update copyright.
8491 (bfd_tell): Change return type to file_ptr.
8492 * bfd-in2.h: Re-generate.
8493 * cache.c: Update copyright.
8494 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8496 (close_one): Use real_ftell.
8497 * bfdio.c: Update copyright.
8498 (real_ftell, real_fseek): New functions.
8499 (bfd_tell): Use real_fseek and real_ftell, change return type to
8501 (bfd_seek): Use real_ftell and real_fseek, change type of
8502 file_position to a file_ptr.
8503 * libbfd-in.h: Update copyright.
8504 (real_ftell, real_fseek): Declare.
8505 * libbfd.h: Re-generate.
8507 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8508 fseeko and fseeko64. Determine bfd_file_ptr.
8509 * configure: Re-generate.
8510 * config.in: Re-generate.
8512 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8514 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8515 * elf32-h8300.c: Likewise.
8517 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8518 Nick Clifton <nickc@redhat.com>
8520 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8521 GOT entries with no associated GOT subsection.
8523 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8525 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8526 * elf.c (swap_out_syms): Use it to decide whether local section
8527 symbols should be named.
8528 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8529 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8530 (elf_backend_name_local_section_symbols): Define.
8531 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8533 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8535 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8536 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8539 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8541 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8542 to bfd_link_hash_entry passed by reference to
8543 _bfd_generic_link_add_one_symbol.
8545 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8547 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8548 relocations against dynamic symbols.
8550 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8552 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8555 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8557 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8558 * bfd-in2.h, libbfd.h: Rebuilt.
8560 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8562 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8563 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8564 flag has been cleared.
8566 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8568 * coff-h8300.c: Add and adjust comments about relaxation.
8569 * elf32-h8300.c: Likewise.
8571 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8573 * coff-h8300.c: Fix comment typos.
8574 * elf32-h8300.c: Likewise.
8576 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8578 * coff-h8300.c: Add comments about relaxation.
8579 * elf32-h8300.c: Likewise.
8581 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8583 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8585 * aclocal.m4: Regenerate.
8586 * configure: Regenerate.
8588 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8590 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8591 mips_elf64_rtype_to_howto instead of using howto_table.
8593 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8595 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8597 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8598 relocs which would not use the PLT.
8600 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8602 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8603 (ppc64_elf_gc_sweep_hook): Likewise.
8604 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8606 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8608 Adds linker relaxation support for bit manipulation insns like
8609 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8611 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8612 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8613 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8614 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8616 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8618 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8620 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8622 * elf32-h8300.c: Fix formatting.
8624 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8626 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8627 dynamic object is present. Declare r_symndx and h in an inner
8629 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8631 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8633 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8634 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8635 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8636 identically. Do not emit PC24 relocations for shared libraries.
8637 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8638 identically. Don't adjust pc_count.
8639 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8640 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8641 adjust count for branch relocations.
8642 (allocate_dynrelocs): Correct typo in call to
8643 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8644 PC24 or PLT32 relocs when linking.
8646 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8648 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8649 relocation howto with ARM_26 one for consistency.
8650 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8651 that will be converted to ARM_26D ones, since we always want 'done'
8652 relocations to be reflected in section's data.
8653 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8655 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8658 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8660 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8661 are not partial_inplace during a relocatable link.
8663 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8665 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8666 if no dynamic object is present. Declare r_symndx and h in an
8669 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8671 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8672 trampoline if it is known out of range.
8674 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8676 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8677 * elf32-frv.c (_frv_osec_readonly_p): New.
8678 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8680 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8681 (elf32_frv_relocate_section): Likewise. Error out if attempting
8682 to emit rofixups or dynamic relocs in read-only segments. Use
8683 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8684 dynamic relocations.
8685 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8686 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8687 relocations or fixups involving merged sections correctly. Avoid
8688 crash when undefined symbol is referenced by R_FRV_32 or
8689 R_FRV_FUNCDESC_VALUE.
8690 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8691 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8692 input section holding local symbol to addend of R_FRV_32 or
8693 R_FRV_FUNCDESC_VALUE dynamic relocation.
8694 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8695 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8696 (elf32_frv_always_size_sections): Don't store pointer to
8697 __stacksize symbol in sec_info.
8698 (elf32_frv_modify_segment_map): Look it up here.
8699 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8700 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8701 of the lazy PLT entry, not only its offset, as the low word of a
8702 function descriptor.
8703 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8704 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8705 if a hash table entry already exists but is not a definition.
8706 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8707 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8708 (_frv_add_rofixup): Don't inline.
8709 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8710 for undefweak symbols.
8711 (elf32_frv_relocate_section): Avoid crash while computing
8712 relocation when linking with shared library. Only emit rofixups
8713 and dynamic relocations for alloc&load sections. Mark binaries
8714 with inter-segment relocations for relocation as a unit.
8715 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8716 (DEFAULT_STACK_SIZE): New.
8717 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8718 emit rofixups or dynamic relocs when linking dynamic non-PIE
8720 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8721 shared libs too. Reserve the last entry for the GOT pointer.
8722 (elf32_frv_finish_dynamic_sections): Emit it.
8723 (elf32_frv_always_size_sections): New.
8724 (elf32_frv_modify_segment_map): New.
8725 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8727 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8728 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8729 (elf_backend_always_size_sections): New.
8730 (elf_backend_modify_segment_map): New.
8731 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8732 * config.bfd: Added frv-*-*linux*.
8733 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8734 ABS section, instead of crashing.
8735 (elf32_frv_relocate_section): Don't crash before warning about
8736 different segments in non-PIC relocation.
8737 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8738 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8739 relocs to undefweak symbols.
8740 (elf32_frv_relocate_section): Ditto for undefined symbols.
8741 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8742 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8743 gotfixup section was created.
8744 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8745 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8746 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8747 complain_overflow_signed.
8748 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8749 have not been allocated.
8750 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8751 privfd only if dynamic sections were created.
8752 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8753 for GPREL relocs. When linking relocatable FDPIC executables,
8754 emit warnings for relocations that would be illegal on PIE or
8755 shared libraries. Emit rofixup for R_FRV_32 only if input object
8757 (_frv_create_got_section): Define _gp symbol in the rofixup
8759 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8760 dynamic sections missing, error out requesting -melf32frvfd.
8761 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8762 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8763 computation of addends from section and global or local symbol
8764 value. Change return type to bfd_boolean, and return a failure if
8765 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8766 nonzero addend is required.
8767 (elf32_frv_relocate_section): Likewise. Print error for
8768 unsupported nonzero addends.
8769 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8770 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8771 force everything local.
8772 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8773 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8774 (frv_gotfixup_section): New.
8775 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8776 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8778 (_frv_add_rofixup): New.
8779 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8780 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8781 improve some ugly conditions.
8782 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8783 relocations in fdpic.
8784 (_frv_create_got_section): Create .rofixup.got section.
8785 (struct _frv_dynamic_got_info): Added fixups.
8786 (_frv_count_got_plt_entries): Account in-GOT relocations into
8787 relocs32, relocsfd and relocsfdv. Account them into relocs or
8788 fixups, as appropriate.
8789 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8791 (elf32_frv_finish_dynamic_sections): Verify that the right number
8792 of relocations and fixups was generated.
8793 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8795 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8796 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8797 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8798 descriptor of a (formerly-)global symbol is local.
8799 (struct frv_pic_relocs_info): Adjust comments.
8800 (_frv_emit_got_relocs_plt_entries): Adjust.
8801 (elf32_frv_relocate_section): Likewise.
8802 (_frv_count_got_plt_entries): Likewise.
8803 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8804 symbol's value to addend in the common preamble. Decay dynamic
8805 symbols to section+offset if they bind or call locally, for GOT
8806 and FUNCDESC_VALUE, respectively.
8807 (elf32_frv_relocate_section): Likewise.
8808 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8809 internal or hidden visibility.
8810 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8811 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8812 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8813 (elf32_frv_relocate_section): Pass relocation addend in. Use
8814 original relocation addend to look up the got relocs/plt entries
8815 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8816 processing relocations that reference .scommon symbols.
8817 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8818 Introduce support for dynamic linking.
8819 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8820 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8821 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8822 (frv_reloc_type_lookup): Return REL howtos for executables and
8824 (frv_info_to_howto_rel): New.
8825 (struct frv_elf_link_hash_table): New.
8826 (frv_hash_table, frv_got_section, frv_gotrel_section,
8827 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8828 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8829 (frv_elf_link_hash_table_create): New.
8830 (struct frv_pic_relocs_info): New.
8831 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8832 (frv_pic_relocs_info_find): New.
8833 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8835 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8836 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8837 (_frv_emit_got_relocs_plt_entries): New.
8838 (elf32_frv_relocate_section): Add support for dynamic linking.
8839 Handle new relocations.
8840 (_frv_create_got_section): New.
8841 (elf32_frv_create_dynamic_sections): New.
8842 (ELF_DYNAMIC_INTERPRETER): New.
8843 (struct _frv_dynamic_got_info): New.
8844 (_frv_count_got_plt_entries): New.
8845 (struct _frv_dynamic_got_plt_info): New.
8846 (_frv_compute_got_alloc_data): New.
8847 (_frv_get_got_entry, _frv_get_fd_entry): New.
8848 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8849 (_frv_resolve_final_relocs_info): New.
8850 (elf32_frv_size_dynamic_sections): New.
8851 (elf32_frv_finish_dynamic_sections): New.
8852 (elf32_frv_adjust_dynamic_symbol): New.
8853 (elf32_frv_finish_dynamic_symbol): New.
8854 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8856 (elf_info_to_howto_rel): Define.
8857 (bfd_elf32_bfd_link_hash_table_create): Define.
8858 (elf_backend_create_dynamic_sections): Define.
8859 (elf_backend_adjust_dynamic_symbol): Define.
8860 (elf_backend_size_dynamic_sections): Define.
8861 (elf_backend_finish_dynamic_symbol): Define.
8862 (elf_backend_finish_dynamic_sections): Define.
8863 (elf_backend_want_got_sym): Define.
8864 (elf_backend_got_header_size): Define.
8865 (elf_backend_want_got_plt): Define.
8866 (elf_backend_plt_readonly): Define.
8867 (elf_backend_want_plt_sym): Define.
8868 (elf_backend_plt_header_size): Define.
8869 (elf_backend_may_use_rel_p): Define.
8870 (elf_backend_may_use_rela_p): Define.
8871 (elf_backend_default_use_rela_p): Define.
8872 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8873 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8874 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8875 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8876 (frv_reloc_map): Map the corresponding BFD relocs to them.
8877 (frv_reloc_type_lookup): ... and back to BFD relocs.
8878 * reloc.c: New relocs.
8879 * bfd-in2.h, libbfd.h: Rebuilt.
8880 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8881 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8882 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8883 R_FRV_FUNCDESC_GOTLO): New.
8884 (frv_reloc_map): Map the corresponding BFD relocs to them.
8885 (frv_reloc_type_lookup): ... and back to BFD relocs.
8886 * reloc.c: New relocs.
8887 * bfd-in2.h, libbfd.h: Rebuilt.
8889 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8891 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8892 targets to support pages of up to 64kB.
8893 (elf32_bed): Redefine to get a separate backend data structure for
8894 traditional targets.
8895 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8896 targets to support pages of up to 64kB.
8897 (elf64_bed): Redefine to get a separate backend data structure for
8898 traditional targets.
8899 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8900 targets to support pages of up to 64kB.
8901 (elf32_bed): Redefine to get a separate backend data structure for
8902 traditional targets.
8904 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8906 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8908 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8910 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8911 (elf_i386_grok_psinfo): Likewise.
8913 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8915 * config.bfd: Add m68k-uClinux target.
8917 2004-01-01 Grant Edwards <grante@visi.com>
8919 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8920 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8921 (elf32_h8_gc_sweep_hook): New function.
8922 (elf_backend_gc_mark_hook): Define.
8923 (elf_backend_gc_sweep_hook): Define.
8924 (elf_backend_can_gc_sections): Define.
8926 For older changes see ChangeLog-0203
8932 version-control: never