1 2005-07-07 Ben Elliston <bje@gnu.org>
3 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
5 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
7 * dwarf2.c (varinfo): Add addr.
8 (lookup_symbol_in_variable_table): Also check addr.
9 (scan_unit_for_symbols): Set addr for variable.
10 (comp_unit_find_line): Updated.
12 2005-07-06 Nick Clifton <nickc@redhat.com>
14 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
15 message if an unknown reloc is encountered.
16 (alpha_relocate_section): Likewise.
18 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
19 with a missing howto field.
21 2005-07-06 Alan Modra <amodra@bigpond.net.au>
23 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
26 2005-07-05 Paul Brook <paul@codesourcery.com>
28 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
29 (ppc_elf_vxworks_get_sec_type_attr): New function.
30 (elf_backend_special_sections): Remove vxwords definition.
31 (elf_backend_get_sec_type_attr): Define for vxworks.
33 2005-07-05 Nick Clifton <nickc@redhat.com>
35 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
37 2005-07-05 Paul Brook <paul@codesourcery.com>
39 * config.bfd: Add separate case for ppc-vxworks.
40 * configure: Regenerate.
41 * configure.in: Include elf-vxworks.lo on ppc targets.
42 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
44 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
45 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
46 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
47 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
48 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
49 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
50 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
51 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
52 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
53 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
54 (ppc_elf_create_got): Create .got.plt for VxWorks.
55 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
57 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
58 (allocate_got): VxWorks does not need a got header.
59 (allocate_dynrelocs): Handle VxWorks plt format.
60 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
61 VxWorks. Handle VxWorks plt/got.
62 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
63 (ppc_elf_vxworks_special_sections): New.
64 (ppc_elf_vxworks_link_hash_table_create,
65 ppc_elf_vxworks_add_symbol_hook,
66 elf_i386_vxworks_link_output_symbol_hook,
67 ppc_elf_vxworks_final_write_processing): New functions.
68 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
69 (_bfd_target_vector): Use it.
71 2005-07-05 Jakub Jelinek <jakub@redhat.com>
73 * libbfd-in.h (struct artdata): Add extended_names_size field.
75 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
76 allocated object by bfd_zalloc.
77 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
78 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
79 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
80 (get_extended_arelt_filename): Fail if index is bigger or equal to
82 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
83 get_extended_arelt_filename already did that.
84 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
85 Allocate one extra byte and clear it, in case extended names table
88 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
89 bfd_zalloc2): New prototypes.
90 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
91 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
92 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
93 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
94 elf_map_symbols, map_sections_to_segments,
95 assign_file_positions_for_segments, copy_private_bfd_data,
96 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
101 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
102 verdef or verneed section.
103 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
104 verneed sections gracefully.
105 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
106 bogus relocation values.
107 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
108 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
109 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
110 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
111 * elfxx-ia64.c (lookup_howto): Likewise.
113 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
114 the end of strtab and clear it.
117 2005-07-05 Nick Clifton <nickc@redhat.com>
119 * po/vi.po: New Vietnamese translation.
120 * configure.in (ALL_LINGUAS): Add vi.
121 * configure: Regenerate.
123 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
125 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
126 touchup logic like i386/ppc.
128 2005-07-05 Alan Modra <amodra@bigpond.net.au>
130 * elf.c (special_sections): Move const qualifier.
131 (special_sections_b..special_sections_t): Likewise.
132 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
134 (elf32_arm_symbian_special_sections): Move const qualifier.
135 * elf32-m32r.c: Similarly.
136 * elf32-m68hc11.c: Similarly.
137 * elf32-m68hc12.c: Similarly.
138 * elf32-mcore.c: Similarly.
139 * elf32-ppc.c: Similarly.
140 * elf32-sh64.c: Similarly.
141 * elf32-v850.c: Similarly.
142 * elf32-xtensa.c: Similarly.
143 * elf64-alpha.c: Similarly.
144 * elf64-hppa.c: Similarly.
145 * elf64-ppc.c: Similarly.
146 * elf64-sh64.c: Similarly.
147 * elfxx-ia64.c: Similarly.
148 * elfxx-mips.c: Similarly.
150 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
152 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
153 info->executable instead of !info->shared where appropriate.
155 2005-07-04 Alan Modra <amodra@bigpond.net.au>
158 * elf.c (assign_file_positions_for_segments): Remove excluded
159 sections from the segment map.
161 2005-07-04 Alan Modra <amodra@bigpond.net.au>
164 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
166 (_bfd_elf_get_special_section): Declare.
167 (bfd_elf_special_section): Update prototype.
168 * elf.c (special_sections): Remove unused outer entries.
169 (get_special_section): Delete.
170 (_bfd_elf_get_special_section): New function.
171 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
172 special_sections indexing.
173 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
174 * elf32-arm.c (symbian_special_sections_d): Delete.
175 (symbian_special_sections_g, symbian_special_sections_h): Delete.
176 (symbian_special_sections_i, symbian_special_sections_f): Delete.
177 (symbian_special_sections_p): Delete.
178 (elf32_arm_symbian_special_sections): Merge above to here.
179 (elf32_arm_symbian_get_sec_type_attr): New function.
180 (elf_backend_special_sections): Don't define.
181 (elf_backend_get_sec_type_attr): Define.
182 * elf32-m32r.c: Similarly to elf32-arm.c.
183 * elf32-m68hc11.c: Likewise.
184 * elf32-m68hc12.c: Likewise.
185 * elf32-mcore.c: Likewise.
186 * elf32-sh64.c: Likewise.
187 * elf32-v850.c: Likewise.
188 * elf32-xtensa.c: Likewise.
189 * elf64-alpha.c: Likewise.
190 * elf64-hppa.c: Likewise.
191 * elf64-ppc.c: Likewise.
192 * elf64-sh64.c: Likewise.
193 * elfxx-ia64.c: Likewise.
194 * elfxx-mips.c: Likewise.
195 * elf32-ppc.c: Likewise.
196 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
197 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
198 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
199 (elf_backend_get_sec_type_attr): Define.
200 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
201 (elf_backend_special_sections): Don't define.
204 2005-07-01 Nick Clifton <nickc@redhat.com>
206 * cpu-d10v.c: Update to ISO C90 style function declarations and
208 * cpu-d30v.c: Likewsie.
209 * cpu-i370.c: Likewsie.
210 * cpu-xstormy16.c: Likewsie.
211 * elf32-arc.c: Likewsie.
212 * elf32-d10v.c: Likewsie.
213 * elf32-d30v.c: Likewsie.
214 * elf32-dlx.c: Likewsie.
215 * elf32-i370.c: Likewsie.
216 * elf32-i960.c: Likewsie.
217 * elf32-ip2k.c: Likewsie.
218 * elf32-m32r.c: Likewsie.
219 * elf32-mcore.c: Likewsie.
220 * elf32-openrisc.c: Likewsie.
221 * elf32-or32.c: Likewsie.
222 * elf32-pj.c: Likewsie.
223 * elf32-v850.c: Likewsie.
224 * elf32-xstormy16.c: Likewsie.
226 2005-07-01 Alan Modra <amodra@bigpond.net.au>
228 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
230 (elf64_alpha_create_dynamic_sections): Always make new sections
231 by using bfd_make_section_anyway_with_flags. Check that .got not
233 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
236 2005-06-30 Alan Modra <amodra@bigpond.net.au>
238 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
239 _SDA_BASE_ and _SDA2_BASE_ symbols.
240 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
241 sym if not def_regular.
242 (_bfd_elf_provide_section_bound_symbols): Similarly.
244 2005-06-30 Ben Elliston <bje@gnu.org>
246 * config.bfd: Mark as obsolete:
251 2005-06-29 Alan Modra <amodra@bigpond.net.au>
253 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
254 .eh_frame specially..
255 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
256 Don't recheck sections we have already marked.
257 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
258 * section.c (struct bfd_section): Add gc_mark_from_eh.
259 (STD_SECTION): Adjust.
260 * ecoff.c (bfd_debug_section): Adjust.
261 * bfd-in2.h: Regenerate.
263 2005-06-29 Alan Modra <amodra@bigpond.net.au>
265 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
266 not been processed by check_relocs.
268 2005-06-29 Paul Brook <paul@codesourcery.com>
270 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
271 * bfd-in2.h: Regenerate.
272 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
274 * elflink.c (bfd_elf_set_symbol): Add section argument.
275 (_bfd_elf_provide_symbol): Ditto.
276 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
278 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
280 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
282 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
283 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
284 (struct elf32_hppa_link_hash_table): Use etab and bstab.
285 (stub_hash_newfunc): Use hh.
286 (hppa_link_hash_newfunc): Use hsh_cache.
287 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
288 (elf32_hppa_link_hash_table_free): Use bstab.
289 (hppa_stub_name): Use eh.
290 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
291 (hppa_add_stub): Use bstab.
292 (hppa_type_of_stub): Use eh.
293 (hppa_build_one_stub): Use hh and bh_root.
294 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
295 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
296 (elf32_hppa_gc_sweep_hook): Use hdh_next.
297 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
298 (allocate_plt_static): Use etab.
299 (allocate_dynrelocs): Use etab, and hdh_next.
300 (readonly_dynrelocs): Use hdh_next.
301 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
302 (get_local_syms): Use eh, bstab, and hh.
303 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
304 (elf32_hppa_set_gp): Use etab.
305 (elf32_hppa_build_stubs): Use bstab.
306 (final_link_relocate): Use eh, bh_root.
307 (elf32_hppa_relocate_section): Use elf, etab.
308 (elf32_hppa_finish_dynamic_sections): Use etab.
310 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
312 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
315 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
317 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
318 (hppa_stub_hash_entry): Define.
319 (stub_hash_newfunc): Rename variables.
320 (hppa_link_hash_newfunc): Likewise.
321 (elf32_hppa_link_hash_table_free): Likewise.
322 (hppa_stub_name): Likewise.
323 (hppa_get_stub_entry): Likewise.
324 (hppa_add_stub): Likewise.
325 (hppa_type_of_stub): Likewise.
326 (hppa_build_one_stub): Likewise.
327 (hppa_size_one_stub): Likewise.
328 (elf32_hppa_create_dynamic_sections): Likewise.
329 (elf32_hppa_copy_indirect_symbol): Likewise.
330 (elf32_hppa_check_relocs): Likewise.
331 (elf32_hppa_gc_mark_hook): Likewise.
332 (elf32_hppa_gc_sweep_hook): Likewise.
333 (elf32_hppa_grok_psinfo): Likewise.
334 (elf32_hppa_hide_symbol): Likewise.
335 (elf32_hppa_adjust_dynamic_symbol): Likewise.
336 (allocate_dynrelocs): Likewise.
337 (clobber_millicode_symbols): Likewise.
338 (readonly_dynrelocs): Likewise.
339 (elf32_hppa_size_dynamic_sections): Likewise.
340 (get_local_syms): Likewise.
341 (elf32_hppa_size_stubs): Likewise.
342 (hppa_record_segment_addr): Likewise.
343 (final_link_relocate): Likewise.
344 (elf32_hppa_relocate_section): Likewise.
345 (elf32_hppa_finish_dynamic_symbol): Likewise.
347 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
350 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
352 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
353 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
354 * elf32-cris.c (cris_elf_check_relocs): Likewise.
355 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
356 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
357 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
358 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
359 * elf32-i370.c (i370_elf_check_relocs): Likewise.
360 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
361 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
362 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
363 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
364 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
365 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
366 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
367 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
368 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
369 * elf32-s390.c (elf_s390_check_relocs): Likewise.
370 * elf32-sh.c (sh_elf_check_relocs): Likewise.
371 * elf32-v850.c (v850_elf_check_relocs): Likewise.
372 * elf32-vax.c (elf_vax_check_relocs): Likewise.
373 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
374 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
375 * elf64-s390.c (elf_s390_check_relocs): Likewise.
376 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
377 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
378 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
380 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
383 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
386 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
389 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
390 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
392 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
394 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
395 BFD_RELOC_X86_64_GOTPC32.
396 * bfd-in2.h: Regenerated.
398 2005-06-17 Jakub Jelinek <jakub@redhat.com>
400 * elf.c (bfd_section_from_shdr): Kill bogus warning.
402 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
403 symbol, relocation, group or versym sections.
405 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
407 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
408 doesn't point into the section.
410 2005-06-17 Jan Beulich <jbeulich@novell.com>
412 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
413 and BFD_RELOC_X86_64_GOTPC32.
414 * libbfd.h (bfd_reloc_code_real_names): Likewise.
415 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
416 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
417 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
418 and R_X86_64_GOTPC32.
419 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
420 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
421 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
422 (elf64_x86_64_relocate_section): Likewise.
423 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
425 2005-06-15 Mark Kettenis <kettenis@gnu.org>
427 * archive.c: Include "libiberty.h".
429 2005-06-15 Nick Clifton <nickc@redhat.com>
431 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
432 produced by the GreenHills toolchain can be assimilated.
434 2005-06-14 Steve Ellcey <sje@cup.hp.com>
436 * som.c (som_find_inliner_info): New.
438 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
440 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
442 2005-06-14 Jakub Jelinek <jakub@redhat.com>
444 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
445 Prevent endless recursion on broken objects.
447 * archive.c (do_slurp_coff_armap): Check for overflows.
449 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
451 * elfcode.h (elf_write_relocs): Do nothing if there are no
454 2005-06-10 Alan Modra <amodra@bigpond.net.au>
456 * dwarf2.c (decode_line_info): Revert last change. Instead set
457 initial low_pc to -1 to avoid need to test whether loc_pc has
460 2005-06-09 Christopher Faylor <cgf@timesys.com>
462 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
463 either SEC_ALLOC OR SEC_LOAD.
465 2005-06-09 Christopher Faylor <cgf@timesys.com>
467 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
468 section header. Do not add STYP_NOLOAD since it does not appear to be
471 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
474 * dwarf2.c (lookup_address_in_line_info_table): Restore code
475 handling NULL function info, removed with 2005-04-03 change.
477 2005-06-08 Mark Mitchell <mark@codesourcery.com>
479 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
481 2005-06-09 Alan Modra <amodra@bigpond.net.au>
483 * elflink.c (elf_mark_used_section): Delete.
484 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
485 * reloc.c (bfd_mark_used_section): New function.
486 (bfd_generic_gc_sections): Call bfd_mark_used_section.
488 2005-06-08 Alan Modra <amodra@bigpond.net.au>
490 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
493 2005-06-07 Mark Mitchell <mark@codesourcery.com>
495 * opncls.c (bfd_fdopenr): Add missing break statements.
497 2005-06-07 Mark Mitchell <mark@codesourcery.com>
499 * opncls.c (bfd_fopen): New API.
501 (bfd_fdopenr): Likewise.
502 * bfd-in2.h: Regenerated.
504 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
505 Michael Snyder <msnyder@redhat.com>
506 Stan Cox <scox@redhat.com>
508 * Makefile.am (ALL_MACHINES): Add ms1 support.
509 (ALL_MACHINES_CFILES): Same.
510 (BFD32_BACKENDS): Same.
511 (BFD32_BACKENDS_CFILES): Same.
513 * Makefile.in: Regenerate.
515 * archures.c (bfd_architecture): Add ms1 entries.
516 Externalize bfd_ms1_arch.
517 (bfd_archures_list): Add bfd_ms1_arch.
519 * bfd-in2.h: Regenerate.
521 * cpu-ms1.c: New file.
523 * elf32-ms1.c: New file.
525 * targets.c: Define extern of bfd_elf32_ms1_vec.
526 Add bfd_elf32_ms1_vec to _bfd_target_vector.
528 * configure.in: Add bfd_elf32_ms1_vec case.
530 * configure: Regenerate.
532 * config.bfd: Add ms1-*-elf to table.
534 2005-06-07 Zack Weinberg <zack@codesourcery.com>
536 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
538 2005-06-07 Alan Modra <amodra@bigpond.net.au>
540 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
541 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
543 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
546 * bfd.c (bfd_find_line): New.
548 * dwarf2.c (comp_unit): Add variable_table.
549 (funcinfo): Add file, line, and sec.
551 (lookup_symbol_in_function_table): New.
552 (lookup_symbol_in_variable_table): New.
553 (scan_unit_for_functions): Renamed to ...
554 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
556 (comp_unit_find_nearest_line): Updated.
557 (comp_unit_find_line): New.
558 (_bfd_dwarf2_find_line): New.
560 * elf-bfd.h (_bfd_elf_find_line): New.
561 (_bfd_generic_find_line): New. Defined.
563 * elf.c (_bfd_elf_find_line): New.
565 * libbfd-in.h (_bfd_dwarf2_find_line): New.
566 (_bfd_generic_find_line): New.
568 * bfd-in2.h: Regenerated.
569 * libbfd.h: Likewise.
571 * libbfd.c (_bfd_generic_find_line): New.
573 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
574 with _bfd_generic_find_line.
575 (bfd_target): Add _bfd_find_line.
577 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
579 * dwarf2.c (decode_line_info): Properly set low_pc.
581 2005-06-06 Alan Modra <amodra@bigpond.net.au>
583 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
584 case, include addend when indexing .opd section map.
585 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
586 clear opd_adjust array if no_opd_opt set. Tidy code.
587 Ignore zero size .opd. Check bfd_alloc return value.
588 (ppc_stub_name): Return immediately on bfd_malloc fail.
589 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
591 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
593 * dwarf2.c (comp_unit): Fix a typo in comment.
595 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
597 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
598 (reloc_type_lookup): Dito.
599 (elf_vax_discard_copies): Dito.
600 (elf_vax_instantiate_got_entries): Dito.
601 (elf_vax_link_hash_traverse): Dito.
602 (elf_vax_link_hash_newfunc): Dito.
603 (elf_vax_link_hash_table_create): Dito.
604 (elf32_vax_set_private_flags): Dito.
605 (elf32_vax_merge_private_bfd_data): Dito.
606 (elf32_vax_print_private_bfd_data): Dito.
607 (elf_vax_check_relocs): Dito.
608 (elf_vax_gc_mark_hook): Dito.
609 (elf_vax_gc_sweep_hook): Dito.
610 (elf_vax_size_dynamic_sections): Dito.
611 (elf_vax_discard_copies): Dito.
612 (elf_vax_instantiate_got_entries): Dito.
613 (elf_vax_relocate_section): Dito.
614 (elf_vax_finish_dynamic_symbol): Dito.
615 (elf_vax_finish_dynamic_sections): Dito.
616 (elf_vax_hash_table): Break-up of line isn't needed.
617 (elf_vax_check_relocs): Remove leading whitespace
618 (elf_vax_relocate_section): Remove redundant whitespace
619 (elf_vax_link_hash_newfunc): Don't cast NULL.
620 (elf_vax_link_hash_table_create): Dito.
621 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
623 2005-06-03 Alan Modra <amodra@bigpond.net.au>
626 * configure.in: Bump version
627 * configure: Regenerate.
628 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
629 discarded section sym refs and kill linker output.
630 * simple.c (simple_dummy_einfo): New function.
631 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
633 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
636 2005-06-02 Alan Modra <amodra@bigpond.net.au>
638 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
639 restrictive of func code and func descr for undefined syms as well
642 2005-05-31 Jim Blandy <jimb@redhat.com>
644 * Makefile.am: Regenerate dependencies with 'make dep-am'.
645 * Makefile.in: Regenerate.
647 2005-05-31 Richard Henderson <rth@redhat.com>
649 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
650 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
651 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
652 (elf64_alpha_want_plt): Update to match.
653 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
654 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
656 2005-05-31 Zack Weinberg <zack@codesourcery.com>
658 * elf32-arm.c (elf32_arm_reloc_type_lookup)
659 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
660 Use ISO C90 function declaration style.
662 2005-05-31 James E Wilson <wilson@specifixinc.com>
664 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
665 header PF_R flag on PT_LOAD segments.
667 2005-05-30 Richard Henderson <rth@redhat.com>
669 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
670 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
672 2005-05-29 Richard Henderson <rth@redhat.com>
674 * configure.in (--enable-secureplt): New.
675 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
676 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
677 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
678 (elf64_alpha_use_secureplt): New.
679 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
680 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
681 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
682 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
683 (struct alpha_elf_link_hash_entry): Add plt_offset.
684 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
685 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
686 (PLT_ENTRY_WORD3): Remove.
687 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
688 on .plt and create .got.plt.
689 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
690 (get_got_entry): Initialize plt_offset.
691 (elf64_alpha_want_plt): New.
692 (elf64_alpha_check_relocs): Use it.
693 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
695 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
697 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
699 (elf64_alpha_size_plt_section): Size .got.plt section.
700 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
702 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
703 Add PLTRO DYNAMIC entry.
704 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
705 (elf64_alpha_finish_dynamic_sections): Likewise.
707 2005-05-28 David Daney <ddaney@avtrex.com>
709 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
710 calculation of DT_RELSZ to occur after all dynamic relocations
713 2005-05-28 Eli Zaretskii <eliz@gnu.org>
715 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
716 * config.in, configure: Regenerate.
718 2005-05-26 Mark Kettenis <kettenis@gnu.org>
719 Maciej W. Rozycki <macro@linux-mips.org>
721 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
722 stop processing of options if one of invalid size is
724 (_bfd_mips_elf_section_from_shdr): Likewise.
725 (_bfd_mips_elf_fake_sections): Reset the type of empty special
728 2005-05-26 Richard Henderson <rth@redhat.com>
730 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
731 plt_old_section, plt_old_value.
732 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
733 (elf64_alpha_size_plt_section_1): Don't use it.
735 2005-05-26 Jakub Jelinek <jakub@redhat.com>
737 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
738 first shdr has sh_size == 0. Fail if e_shnum is large to cause
739 arithmetic overflow when allocating the i_shdr array.
740 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
742 2005-05-25 Richard Henderson <rth@redhat.com>
744 * elf64-alpha.c: Update all function definitions to ISO C. Remove
745 all function prototypes; rearrange functions into def-use order.
747 2005-05-25 Richard Henderson <rth@redhat.com>
749 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
750 in the presence of deleting elements.
751 (elf64_alpha_size_got_sections): Zero dead got section size.
753 2005-05-23 Fred Fish <fnf@specifixinc.com>
755 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
756 (struct funcinfo): Add caller_func, caller_file, caller_line.
757 tag, and nesting_level members.
758 (lookup_address_in_function_table): Change first passed parameter
759 from "struct funcinfo *" to "struct comp_unit *".
760 (lookup_address_in_function_table): Dereference unit to find function
762 (lookup_address_in_function_table): Traverse the function list to
763 create a chain of inlined functions back to the first non inlined
765 (scan_unit_for_functions): Remember tag and nesting level. Handle
766 DW_AT_call_file and DW_AT_call_line.
767 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
768 call to pass unit pointer instead of function table pointer. For
769 inlined functions, save pointer to the inliner chain.
770 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
771 (_bfd_dwarf2_find_inliner_info): New function that returns information
772 from the inliner chain after a call to bfd_find_nearest_line.
774 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
775 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
776 NAME##_find_inliner_info.
777 (bfd_target): Add _bfd_find_inliner_info.
778 * bfd-in2.h: Regenerate.
780 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
781 macro that always returns bfd_false.
782 (_bfd_dwarf2_find_inliner_info): Declare.
783 * libbfd.h: Regenerate.
785 * elf32-arm.c (elf32_arm_find_inliner_info): New function
786 that calls _bfd_dwarf2_find_inliner_info.
787 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
789 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
790 that calls _bfd_dwarf2_find_inliner_info.
791 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
792 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
793 _bfd_mips_elf_find_inliner_info.
794 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
795 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
797 * elf.c (_bfd_elf_find_inliner_info): New function that calls
798 _bfd_dwarf2_find_inliner_info.
799 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
800 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
801 _bfd_elf_find_inliner_info.
803 * coffgen.c (coff_find_inliner_info): New function that
804 calls _bfd_dwarf2_find_inliner_info.
805 * libcoff-in.h (coff_find_inliner_info): Declare.
806 * libcoff.h: Regenerate.
807 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
808 (pmac_xcoff_vec) Ditto.
809 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
810 (aix5coff64_vec): Ditto.
812 * aout-target.h (MY_find_inliner_info): Define as
813 _bfd_nosymbols_find_inliner_info.
814 * aout-tic30.c (MY_find_inliner_info): Ditto.
815 * binary.c (binary_find_inliner_info): Ditto.
816 * i386msdos.c (msdos_find_inliner_info): Ditto.
817 * ihex.c (ihex_find_inliner_info): Ditto.
818 * libaout.h (aout_32_find_inliner_info): Ditto.
819 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
820 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
821 * mmo.c (mmo_find_inliner_info): Ditto.
822 * nlm-target.h (nlm_find_inliner_info): Ditto.
823 * pef.c (bfd_pef_find_inliner_info): Ditto.
824 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
825 * srec.c (srec_find_inliner_info): Ditto.
826 * tekhex.c (tekhex_find_inliner_info): Ditto.
827 * versados.c (versados_find_inliner_info): Ditto.
828 * xsym.c (bfd_sym_find_inliner_info): Ditto.
830 * ieee.c (ieee_find_inliner_info): New function that always
832 * oasys.c (oasys_find_inliner_info): Ditto.
833 * vms.c (vms_find_inliner_info): Ditto.
835 2005-05-24 Alan Modra <amodra@bigpond.net.au>
837 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
838 force old plt layout.
840 2005-05-22 Richard Henderson <rth@redhat.com>
842 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
844 (elf64_alpha_check_relocs): Likewise.
845 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
846 non-allocated sections.
848 2005-05-22 Richard Henderson <rth@redhat.com>
850 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
851 undefweak to use zero register. Call elf64_alpha_relax_got_load
852 if not all uses removed.
853 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
854 (elf64_alpha_relax_section): Handle undefweak symbols.
855 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
856 (elf64_alpha_size_rela_got_1): Likewise.
857 (elf64_alpha_relocate_section): Likewise.
859 2005-05-22 Richard Henderson <rth@redhat.com>
861 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
862 on SEC_CODE sections.
864 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
866 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
868 (som_write_space_strings): Change type of tmp_space and p to char *.
869 (som_write_symbol_strings): Likewise. Also change type of comp to
871 (som_begin_writing): Change type of strings_size to unsigned int.
872 (som_finish_writing): Likewise.
873 (som_slurp_reloc_table): Change type of external_relocs to unsigned
875 * som.h (struct som_section_data_struct): Change type of reloc_stream
876 field to unsigned char *.
878 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
880 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
881 copy relocations for VxWorks.
883 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
885 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
887 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
888 (ppc_elf_check_relocs): Set has_sda_refs.
889 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
890 copy relocations. Use has_sda_refs to place variables in .sbss.
891 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
894 2005-05-20 Bob Wilson <bob.wilson@acm.org>
896 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
897 xtensa_default_isa is initialized.
899 2005-05-20 Alan Modra <amodra@bigpond.net.au>
901 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
902 for second and subsequent list entries. Only allocate multiple
903 glink stubs when shared or pie.
904 (ppc_elf_finish_dynamic_symbol): Break out early when only one
905 glink stub is needed.
907 2005-05-19 Zack Weinberg <zack@codesourcery.com>
909 * Makefile.am: Have 'all' depend on 'info'.
910 * Makefile.in: Regenerate.
912 2005-05-19 Alan Modra <amodra@bigpond.net.au>
914 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
915 init_offset. Add init_got_refcount, init_plt_refcount,
916 init_got_offset and init_plt_offset.
917 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
918 (_bfd_elf_link_hash_hide_symbol): Likewise.
919 (_bfd_elf_link_hash_table_init): Likewise.
920 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
921 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
922 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
923 (bfd_elf_size_dynamic_sections): Likewise.
924 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
925 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
926 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
927 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
928 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
929 (struct plt_entry): New.
930 (ppc_elf_link_hash_table_create): Set new init_plt fields.
931 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
932 use _bfd_elf_link_hash_copy_indirect.
933 (update_plt_info, find_plt_ent): New functions.
934 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
935 and adjust for use of plt list rather than refcount.
936 (ppc_elf_gc_sweep_hook): Likewise.
937 (ppc_elf_tls_optimize): Likewise.
938 (ppc_elf_adjust_dynamic_symbol): Likewise.
939 (allocate_dynrelocs): Likewise.
940 (ppc_elf_relax_section): Likewise.
941 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
942 when performing a relocatable link.
943 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
944 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
947 2005-05-19 Alan Modra <amodra@bigpond.net.au>
949 * elf.c (assign_file_positions_for_segments): Use maximum of
950 maxpagesize and section alignment when adjusting initial
951 segment offset and section offsets.
953 2005-05-18 Zack Weinberg <zack@codesourcery.com>
955 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
958 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
960 * elf.c (group_signature): Undo the last change. Check if the
961 symbol table section is correct.
963 2005-05-17 Zack Weinberg <zack@codesourcery.com>
965 * elf32-arm.c: Wherever possible, use official reloc names
967 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
968 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
969 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
970 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
971 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
972 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
973 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
974 Add many new relocations from AAELF.
975 (elf32_arm_howto_from_type): Update to match.
976 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
977 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
978 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
979 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
980 (elf32_arm_final_link_relocate): Add support for
981 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
982 case entries redundant with default.
984 * reloc.c: Reorganize ARM relocations. Add Thumb
985 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
986 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
987 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
988 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
989 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
990 * bfd-in2.h, libbfd.h: Regenerate.
992 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
994 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
996 * format.c (bfd_check_format_matches): Set output_has_begun
998 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
999 special case for both_direction.
1001 2005-05-17 Nick Clifton <nickc@redhat.com>
1003 * elf.c (group_signature): Check for a group section which is
1004 actually a (corrupt) symbol table section in disguise and prevent
1005 an infinite loop from occurring.
1007 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1009 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1012 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1014 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1015 predicate on slot 0 only if slot 0 isn't br.
1017 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1020 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1021 empty sdynbss section.
1022 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1024 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
1026 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1029 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1031 * elf32-ppc.c (LIS_11. LIS_12): Define.
1032 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1033 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1034 for --data-plt when building non-pie executables.
1036 2005-05-17 Nick Clifton <nickc@redhat.com>
1038 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1039 the situation where a symbols's section is not known but a section
1040 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1043 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1044 the presence of a symbol table to just before the symbol table is
1047 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1050 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1051 (elfNN_ia64_relax_section): Use it.
1053 2005-05-14 Mark Kettenis <kettenis@gnu.org>
1055 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1058 2005-05-14 Alan Modra <amodra@bigpond.net.au>
1060 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1062 (ppc_elf_finish_dynamic_sections): Likewise.
1064 2005-05-13 Fred Fish <fnf@specifixinc.com>
1066 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1067 * libbfd.h: Rebuilt.
1069 2005-05-13 Bob Wilson <bob.wilson@acm.org>
1071 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1072 periods in linkonce_kind values.
1074 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1076 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1077 against protected function when building executable.
1079 2005-05-12 Alan Modra <amodra@bigpond.net.au>
1081 * elf32-ppc.c (LWZU_0_X_11): Delete.
1082 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1083 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1084 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1086 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1088 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1089 Generate .glink branch table and updated stubs.
1091 2005-05-11 Alan Modra <amodra@bigpond.net.au>
1093 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1094 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1095 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1096 (CROR_151515, CROR_313131): Delete.
1097 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1098 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1099 LWZU_0_X_11): Define.
1100 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1101 and R_PPC_REL16_HA entries.
1102 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1103 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1104 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1105 new_plt, and old_plt.
1106 (ppc_elf_create_dynamic_sections): Create .glink section.
1107 (ppc_elf_check_relocs): Set new_plt and old_plt.
1108 (ppc_elf_select_plt_layout): New function.
1109 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1110 (allocate_got): Handle differences between old and new got layout.
1111 (allocate_dynrelocs): Likewise for plt.
1112 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1113 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1114 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1115 destination of R_PPC_PLTREL24 relocs.
1116 (ppc_elf_relocate_section): Handle new relocs and changed destination
1118 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1119 differences in layout.
1120 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1121 put a blrl in new got. Write glink contents.
1122 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1123 * libbfd.h: Regenerate.
1124 * bfd-in2.h: Regenerate.
1126 2005-05-11 Andreas Schwab <schwab@suse.de>
1128 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1131 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1133 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1134 section if SEC_ALLOC isn't set.
1136 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1138 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1139 * acinclude.m4: Don't sinclude accross.m4.
1140 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1142 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1144 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1145 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1146 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1147 (func_desc_adjust): Hide fake function descriptors when function
1148 code entry is defined.
1149 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1151 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1153 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1155 2005-05-08 Dave Korn <dave.korn@artimi.com>
1157 * coff-tic80.c: Undefine _CONST after system headers to prevent
1158 clash with tic80-specific definition in include/coff/tic80.h
1160 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1163 * elflink.c (elf_link_output_extsym): Use output_bfd if
1164 h->root.u.def.section is bfd_abs_section_ptr when reporting
1167 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1169 * elf-bfd.h (elf_backend_data): Update special_sections to
1170 array of pointer to bfd_elf_special_section.
1171 * elf.c (special_sections): Likewise.
1172 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1173 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1174 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1175 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1176 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1177 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1178 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1179 * elf32-v850.c (v850_elf_special_sections): Likewise.
1180 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1181 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1182 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1183 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1184 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1185 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1186 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1187 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1189 * elf.c (get_special_section): Updated.
1191 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1193 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1194 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1195 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1197 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1198 * elf32-frv.c (_frv_create_got_section): Likewise.
1199 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1200 (elf_backend_got_symbol_offset): Don't define.
1201 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1202 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1204 (ppc_elf_create_got): Tidy.
1205 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1206 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1207 (ppc_elf_gc_sweep_hook): Likewise.
1208 (ppc_elf_relocate_section): Likewise.
1209 (ppc_elf_finish_dynamic_symbol): Likewise.
1210 (allocate_got): New function.
1211 (allocate_dynrelocs): Use allocate_got.
1212 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1213 so that local got can refcount it. Set got_header_size.
1214 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1216 (ppc_elf_finish_dynamic_sections): Likewise.
1217 (elf_backend_got_symbol_offset): Don't define.
1218 (elf_backend_got_header_size): Ditto.
1220 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1222 * configure.in (ACX_HEADER_STRING): New.
1223 * configure: Regenerate.
1224 * config.in: Regenerate.
1225 * sysdep.h (STRING_WITH_STRINGS): Use.
1227 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1229 * elf.c (_bfd_elf_close_and_cleanup): Only call
1230 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1232 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1234 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1235 "__bss_start" instead of "_edata" as fallback.
1237 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1239 * bfd-in2.h: Regenerated.
1241 2005-05-05 Paul Brook <paul@codesourcery.com>
1243 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1244 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1246 * configure: Regenerate.
1247 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1248 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1249 (elf32-i386.lo): Depend on elf-vxworks.h.
1250 (elf-vxworks.lo): New rule.
1251 * Makefile.in: Regenerate.
1252 * elf-bfd.h (elf_backend_data): Update type of
1253 elf_backend_emit_relocs.
1254 (_bfd_elf_link_output_relocs): Update prototype.
1255 * elflink.c (_bfd_elf_link_output_relocs): Always use
1256 bed->elf_backend_emit_relocs when outputting relocations.
1257 * elfxx-target.h (elf_backend_emit_relocs): Default to
1258 _bfd_elf_link_output_relocs.
1259 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1260 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1261 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1262 (elf_i386_plt0_entry): Remove padding.
1263 (elf_i386_pic_plt0_entry): Ditto.
1264 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1265 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1266 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1267 plt0_pad_byte fields.
1268 (elf_i386_link_hash_table_create): Zero them.
1269 (elf_i386_create_dynamic_sections): Create static relocation section.
1270 (allocate_dynrelocs): Allocate space for static PLT relocations.
1271 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1272 symbols. Give PLT symbols function type. Don't strip PLT sections
1273 if we have exported symbols from them.
1274 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1275 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1277 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1278 Add relocation for GOT location. Fill in PLT static relocations.
1279 (elf_i386_vxworks_link_hash_table_create): New function.
1280 (elf_i386_vxworks_link_output_symbol_hook): New function.
1281 * elf-vxworks.h: New file.
1283 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1285 * section.c (bfd_make_section_anyway_with_flags): New.
1286 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1287 (bfd_make_section_with_flags): New.
1288 (bfd_make_section): Call bfd_make_section_with_flags.
1290 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1291 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1292 instead of bfd_make_section/bfd_make_section and don't call
1293 bfd_set_section_flags.
1294 (mn10300_elf_check_relocs): Likewise.
1295 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1296 * elf32-arm.c (create_got_section): Likewise.
1297 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1298 (elf32_arm_check_relocs): Likewise.
1299 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1300 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1301 (_frv_create_got_section): Likewise.
1302 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1303 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1304 (elf32_hppa_check_relocs): Likewise.
1305 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1306 (i370_elf_check_relocs): Likewise.
1307 * elf32-i386.c (create_got_section): Likewise.
1308 (elf_i386_check_relocs): Likewise.
1309 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1310 (create_got_section): Likewise.
1311 (m32r_elf_create_dynamic_sections): Likewise.
1312 (m32r_elf_check_relocs): Likewise.
1313 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1314 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1315 (ppc_elf_create_dynamic_sections): Likewise.
1316 (ppc_elf_add_symbol_hook): Likewise.
1317 (ppc_elf_check_relocs): Likewise.
1318 * elf32-s390.c (create_got_section): Likewise.
1319 (elf_s390_check_relocs): Likewise.
1320 * elf32-sh.c (create_got_section): Likewise.
1321 (sh_elf_create_dynamic_sections): Likewise.
1322 (sh_elf_check_relocs): Likewise.
1323 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1324 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1325 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1326 (add_extra_plt_sections): Likewise.
1327 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1328 (elf64_alpha_create_got_section): Likewise.
1329 (elf64_alpha_create_dynamic_sections): Likewise.
1330 (elf64_alpha_check_relocs): Likewise.
1331 * elf64-hppa.c (get_reloc_section): Likewise.
1332 (get_opd): Likewise.
1333 (get_plt): Likewise.
1334 (get_dlt): Likewise.
1335 (get_stub): Likewise.
1336 (elf64_hppa_create_dynamic_sectionso): Likewise.
1337 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1338 * elf64-ppc.c (create_linkage_sections): Likewise.
1339 (ppc64_elf_check_relocs): Likewise.
1340 * elf64-s390.c (create_got_section): Likewise.
1341 (elf_s390_check_relocs): Likewise.
1342 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1343 (sh64_elf64_create_dynamic_sections): Likewise.
1344 * elf64-x86-64.c (create_got_section): Likewise.
1345 (elf64_x86_64_check_relocs): Likewise.
1346 * elflink.c (_bfd_elf_create_got_section): Likewise.
1347 (_bfd_elf_link_create_dynamic_sections): Likewise.
1348 (elf_link_add_object_symbols): Likewise.
1349 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1350 (elfNN_ia64_create_dynamic_sections): Likewise.
1351 (get_fptr): Likewise.
1352 (get_pltoff): Likewise.
1353 (get_reloc_section): Likewise.
1354 (elfNN_ia64_object_p): Likewise.
1355 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1356 (mips_elf_create_compact_rel_section): Likewise.
1357 (mips_elf_create_got_section): Likewise.
1358 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1359 * elfxx-sparc.c (create_got_section): Likewise.
1360 (_bfd_sparc_elf_check_relocs): Likewise.
1362 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1363 on linker created sections.
1365 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1368 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1369 script on executable.
1371 2005-05-05 John Levon <levon@movementarian.org>
1373 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1374 allocated memory before returning.
1375 (decode_line_info): Likewise.
1376 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1377 allocated by functions in this file.
1378 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1379 * elf.c (_bfd_elf_close_and_cleanup): Call
1380 _bfd_dwarf2_cleanup_debug_info.
1382 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1384 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1385 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1386 * configure, config.in, Makefile.in: Regenerate.
1387 * sysdep.h (stpcpy): Revert last change.
1389 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1391 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1393 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1395 * elfxx-ia64.c (ARCH_SIZE): New.
1396 (LOG_SECTION_ALIGN): Likewise.
1397 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1398 align relocation sections.
1399 (get_fptr): Likewise.
1400 (get_reloc_section): Likewise.
1401 (elfNN_ia64_tprel_base): Likewise.
1402 (elfNN_ia64_check_relocs): Support 32bit relocations.
1403 (allocate_global_fptr_got): Likewise.
1404 (allocate_dynrel_entries): Likewise.
1405 (set_got_entry): Likewise.
1406 (set_pltoff_entry): Likewise.
1407 (elfNN_ia64_relocate_section): Likewise.
1409 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1411 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1412 * configure: Regenerate.
1413 * config.in: Likewise.
1415 * sysdep.h (stpcpy): New.
1417 2005-05-04 Nick Clifton <nickc@redhat.com>
1419 * Update the address and phone number of the FSF organization in
1420 the GPL notices in the following files:
1421 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1422 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1423 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1424 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1425 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1426 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1427 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1428 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1429 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1430 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1431 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1432 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1433 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1434 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1435 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1436 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1437 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1438 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1439 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1440 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1441 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1442 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1443 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1444 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1445 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1446 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1447 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1448 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1449 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1450 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1451 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1452 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1453 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1454 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1455 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1456 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1457 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1458 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1459 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1460 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1461 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1462 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1463 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1464 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1465 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1466 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1467 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1468 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1469 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1470 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1471 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1472 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1473 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1474 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1475 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1476 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1477 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1478 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1479 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1480 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1481 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1482 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1483 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1484 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1485 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1486 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1487 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1488 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1489 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1490 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1493 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1495 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1496 * bfd-in2.h: Regenerated.
1498 * elflink.c (bfd_elf_set_symbol): New.
1499 (_bfd_elf_provide_symbol): Call it.
1500 (_bfd_elf_provide_section_bound_symbols): New.
1502 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1504 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1505 at the end, if a strong definition has already been seen.
1507 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1509 * section.c (struct bfd_section): Replace link_order_head and
1510 link_order_tail with map_head and map_tail union.
1511 (STD_SECTION): Update.
1512 (_bfd_strip_section_from_output): Delete.
1513 * aoutx.h: Update throughout for above changes.
1514 * coff-ppc.c: Likewise.
1515 * cofflink.c: Likewise.
1516 * ecoff.c: Likewise.
1517 * elf-eh-frame.c: Likewise.
1518 * elf-m10300.c: Likewise.
1520 * elf32-arm.c: Likewise.
1521 * elf32-cris.c: Likewise.
1522 * elf32-hppa.c: Likewise.
1523 * elf32-i386.c: Likewise.
1524 * elf32-m32r.c: Likewise.
1525 * elf32-m68hc1x.c: Likewise.
1526 * elf32-m68k.c: Likewise.
1527 * elf32-ppc.c: Likewise.
1528 * elf32-s390.c: Likewise.
1529 * elf32-sh.c: Likewise.
1530 * elf32-vax.c: Likewise.
1531 * elf32-xtensa.c: Likewise.
1532 * elf64-alpha.c: Likewise.
1533 * elf64-hppa.c: Likewise.
1534 * elf64-ppc.c: Likewise.
1535 * elf64-s390.c: Likewise.
1536 * elf64-sh64.c: Likewise.
1537 * elf64-x86-64.c: Likewise.
1538 * elflink.c: Likewise.
1539 * elfxx-ia64.c: Likewise.
1540 * elfxx-mips.c: Likewise.
1541 * elfxx-sparc.c: Likewise.
1542 * linker.c: Likewise.
1543 * merge.c: Likewise.
1544 * pdp11.c: Likewise.
1545 * xcofflink.c: Likewise.
1546 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1547 out from bfd_elf_size_dynamic_sections.
1548 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1549 * bfd-in2.h: Regenerate.
1551 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1553 * section.c (bfd_section_list_remove): Don't clear s->next.
1554 (bfd_section_list_append): Always init s->prev.
1555 (bfd_section_list_prepend): Define.
1556 (bfd_section_list_insert_after): Minor optimization.
1557 (bfd_section_removed_from_list): Rewrite.
1558 * elf.c (assign_section_numbers): Simplify list traversal now that
1559 bfd_section_list_remove doesn't destroy removed section next ptr.
1560 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1561 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1562 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1563 * bfd-in2.h: Regenerate.
1565 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1567 * bfd.c (bfd): Remove section_tail and add section_last.
1568 (bfd_preserve): Likewise.
1569 (bfd_preserve_save): Likewise.
1570 (bfd_preserve_restore): Likewise.
1571 * opncls.c (_bfd_new_bfd): Likewise.
1573 * coffcode.h (coff_compute_section_file_positions): Updated.
1574 (coff_compute_section_file_positions): Likewise.
1575 * elf.c (assign_section_numbers): Likewise.
1576 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1577 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1578 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1579 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1580 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1581 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1583 * ecoff.c (bfd_debug_section): Initialize prev.
1585 * section.c (bfd_section): Add prev.
1586 (bfd_section_list_remove): Updated.
1587 (bfd_section_list_append): New.
1588 (bfd_section_list_insert_after): New.
1589 (bfd_section_list_insert_before): New.
1590 (bfd_section_list_insert): Removed.
1591 (bfd_section_removed_from_list): Updated.
1592 (STD_SECTION): Initialize prev.
1593 (bfd_section_init): Updated.
1594 (bfd_section_list_clear): Updated.
1596 * bfd-in2.h: Regenerated.
1598 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1600 * elf.c (_bfd_elf_new_section_hook): Don't call
1601 _bfd_elf_get_sec_type_attr on sections from input files.
1603 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1605 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1606 hash table size 16699 instead of bfd_hash_table_init.
1608 2005-05-01 Paul Brook <paul@codesourcery.com>
1610 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1611 definition has already been seen.
1613 2005-05-01 Paul Brook <paul@codesourcery.com>
1615 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1616 R_ARM_PLT32 the same as R_ARM_PC24.
1617 (arm_add_to_rel): Ditto.
1619 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1621 * config.bfd: Add h8300*-*-rtemscoff.
1622 Switch h8300*-*-rtems* to elf.
1624 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1626 * aclocal.m4, Makefile.in: Regnerated.
1628 2005-04-28 Paul Brook <paul@codesourcery.com>
1630 Merge changes only applied to Makefile.in.
1631 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1632 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1633 (elfxx-sparc.lo): New rule.
1634 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1635 (elf64-sparc.lo): Likewise.
1637 2005-04-28 Julian Brown <julian@codesourcery.com>
1639 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1642 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1644 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1646 * elf.c (bfd_elf_sym_name): Updated.
1647 (group_signature): Likewise.
1648 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1649 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1650 (ppc64_elf_edit_toc): Likewise.
1651 (ppc64_elf_relocate_section): Likewise.
1652 * elfcode.h (elf_slurp_symbol_table): Likewise.
1653 * elflink.c (elf_link_input_bfd): Likewise.
1655 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1656 bfd_elf_sym_name to get local symbol name when reporting errors.
1658 2005-04-27 Nick Clifton <nickc@redhat.com>
1660 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1661 formatted input file results in a reloc which has no associated
1664 2005-04-26 Jerome Guitton <guitton@gnat.com>
1666 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1668 2005-04-25 David S. Miller <davem@davemloft.net>
1670 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1671 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1672 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1675 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1678 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1679 to discarded section an error.
1681 2005-04-21 Jerome Guitton <guitton@gnat.com>
1683 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1684 corresponding AC_CHECK_DECLS.
1685 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1687 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1688 * configure: Regenerate.
1691 2005-04-21 Andreas Schwab <schwab@suse.de>
1693 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1694 unsigned from type of dynamic_interpreter.
1695 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1698 * elf.c (assign_section_numbers): Fix comment.
1700 2005-04-21 Jerome Guitton <guitton@gnat.com>
1702 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1703 for struct som_exec_auxhdr fields.
1705 2005-04-21 Nick Clifton <nickc@redhat.com>
1707 * aout-adobe.c: Convert to ISO C and fix formatting.
1708 * aout-arm.c: Convert to ISO C and fix formatting.
1709 * aout-cris.c: Convert to ISO C and fix formatting.
1710 * aout-ns32k.c: Convert to ISO C and fix formatting.
1711 * aout-tic30.c: Convert to ISO C and fix formatting.
1712 * coffcode.h: Convert to ISO C and fix formatting.
1713 * coffswap.h: Convert to ISO C and fix formatting.
1714 * i386aout.c: Convert to ISO C and fix formatting.
1715 * libaout.h: Convert to ISO C and fix formatting.
1716 * libcoff-in.h: Convert to ISO C and fix formatting.
1717 * libcoff.h: Convert to ISO C and fix formatting.
1718 * libecoff.h: Convert to ISO C and fix formatting.
1719 * libnlm.h: Convert to ISO C and fix formatting.
1720 * libpei.h: Convert to ISO C and fix formatting.
1721 * libxcoff.h: Convert to ISO C and fix formatting.
1722 * nlm-target.h: Convert to ISO C and fix formatting.
1723 * nlm.c: Convert to ISO C and fix formatting.
1724 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1725 * nlm32-i386.c: Convert to ISO C and fix formatting.
1726 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1727 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1728 * nlmcode.h: Convert to ISO C and fix formatting.
1729 * nlmswap.h: Convert to ISO C and fix formatting.
1730 * pe-mips.c: Convert to ISO C and fix formatting.
1731 * peXXigen.c: Convert to ISO C and fix formatting.
1732 * peicode.h: Convert to ISO C and fix formatting.
1733 * vms-gsd.c: Convert to ISO C and fix formatting.
1734 * vms-hdr.c: Convert to ISO C and fix formatting.
1735 * vms-misc.c: Convert to ISO C and fix formatting.
1736 * vms-tir.c: Convert to ISO C and fix formatting.
1737 * vms.c: Convert to ISO C and fix formatting.
1738 * vms.h: Convert to ISO C and fix formatting.
1740 * coffgen.c (coff_print_symbol): Restore correct formatting of
1743 2005-04-20 David S. Miller <davem@davemloft.net>
1745 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1746 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1747 (allocate_dynrelocs): Likewise.
1749 2005-04-20 Jerome Guitton <guitton@gnat.com>
1751 * configure.in: Fix the check for basename declaration. Add check
1752 for declarations of ftello, ftello64, fseeko, fseeko64.
1753 * configure: Regenerate.
1755 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1757 2005-04-19 David S. Miller <davem@davemloft.net>
1759 * elfxx-sparc.c: New file.
1760 * elfxx-sparc.h: New file.
1761 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1762 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1763 (elfxx-sparc.lo): New rule.
1764 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1765 (elf64-sparc.lo): Likewise.
1766 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1767 (bfd_elf64_sparc_vec): Likewise.
1768 * configure: Regenerate.
1769 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1770 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1771 which is more consistent with elf32-sparc.c
1773 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1775 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1776 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1778 2005-04-19 Alan Modra <amodra@bigpond.net.au>
1780 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1781 dynamic relocs in non-SEC_ALLOC sections.
1782 (ppc_elf_gc_sweep_hook): Likewise.
1783 (ppc_elf_relax_section): Likewise.
1784 (ppc_elf_relocate_section): Likewise.
1786 2005-04-18 Nick Clifton <nickc@redhat.com>
1788 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1789 assigning a value to return_value.
1791 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1794 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1797 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1800 * elf.c (setup_group): Properly handle zero group count.
1802 2005-04-17 Mark Kettenis <kettenis@gnu.org>
1804 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1805 (som_is_subspace, compare_subspaces, som_compute_checksum)
1806 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1808 (hppa_som_reloc, compare_syms, compare_subspaces)
1809 (som_print_symbol, som_get_section_contents)
1810 (som_set_section_contents): Remove space after 'void *'.
1811 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1812 (som_bfd_merge_private_bfd_data)
1813 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1816 2004-04-15 Julian Brown <julian@codesourcery.com>
1818 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1819 * bfd-in2.h: Regenerate.
1820 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1821 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1822 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1823 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1824 relocations if requested to.
1825 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1826 use_blx rather than symbian_p.
1827 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1828 use_blx is in effect.
1829 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1832 2005-04-15 Nick Clifton <nickc@redhat.com>
1834 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1837 2005-04-15 Alan Modra <amodra@bigpond.net.au>
1840 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1841 used as a list pointer.
1843 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1845 * Makefile.am (NO_WERROR): Define.
1846 * warning.m4: New file
1847 * acinclude.m4: Include warning.m4.
1848 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1849 * Makefile.in: Regenerate.
1850 * configure: Regenerate.
1852 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1854 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1855 Write trailing padding.
1857 * merge.c (merge_strings): Round up section size for alignment.
1859 2005-04-14 David S. Miller <davem@davemloft.net>
1861 Add TLS support for 64-bit Sparc ELF.
1862 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1863 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1864 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1865 sparc64_elf_hash_entry, sparc64_elf_tdata,
1866 sparc64_elf_local_got_tls_type): New defines.
1867 (sparc64_elf_mkobject): New function.
1868 (sparc64_elf_link_hash_table): Add members for dynamic linker
1869 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1870 uion to track TLS GOT references. Add sym_sec to cache
1871 mappings from local sym to section.
1872 (link_hash_newfunc): New function.
1873 (sparc64_elf_bfd_link_hash_table_create): Rename to
1874 sparc64_elf_link_hash_table_create for consistency.
1875 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1876 (sparc64_elf_create_dynamic_sections): Initialize new section
1877 members of sparc64_elf_link_hash_table. Only init srelbss
1879 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1881 (SPARC_NOP): Define.
1882 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1883 sparc64_elf_plt_ptr_offset): Delete.
1884 (sparc64_plt_entry_build): New function to build PLT entries
1885 gradually instread of all at once at the end of linking.
1886 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1887 local vars. Get them from sparc64_elf_hash_table instead.
1888 Check early on if r_symndx is in bounds. Handle TLS transitions.
1889 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1890 For TLS relocs, record the tls_type in either
1891 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1892 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1893 to the __tls_get_addr symbol. For PLT relocs, track references
1894 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1895 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1896 symbol references, count the number of relocations needed for
1897 that symbol. For default switch case, don't error, this lets
1898 the TLS relocs not explicitly handled by this function get
1900 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1901 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1902 it from sparc64_elf_hash_table. Store the real PLT offset
1903 in h->plt.offset, and build PLT entries one at a time. Also
1904 get .dynbss section pointer from htab.
1905 (allocate_dynrelocs, readonly_dynrelocs,
1906 sparc64_omit_section_dynsym): New functions.
1907 (sparc64_elf_omit_section_dynsym): Use these new functions as
1909 (dtpoff_base, tpoff): New functions.
1910 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1911 locals, get them from sparc64_elf_hash_table. Handle TLS
1912 relocations and refcounting in main relocation loop.
1913 (sparc64_elf_finish_dynamic_symbol): Use
1914 sparc64_elf_link_hash_table. Build PLT entries as we see
1915 them. Handle TLS GOT relocations.
1916 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1917 from sparc64_elf_hash_table. Initialize only PLT header
1918 not all entries since we not build PLT entries one by one.
1919 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1920 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1921 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1923 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1925 * elflink.c (elf_link_input_bfd): Update check for removed
1928 2005-04-12 Alan Modra <amodra@bigpond.net.au>
1930 * Makefile.am: Run "make dep-am".
1931 * Makefile.in: Regenerate.
1932 * aclocal.m4: Regenerate.
1933 * libcoff.h: Regenerate.
1935 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1937 * linker.c (_bfd_generic_link_output_symbols): Also check if
1938 the output section of an input section has been removed from
1941 * section.c (bfd_section_list_remove): Clear the next field
1942 of the removed section.
1943 (bfd_section_removed_from_list): New.
1944 * bfd-in2.h: Regenerated.
1946 2005-04-11 David S. Miller <davem@davemloft.net>
1948 * elf32-sparc.c (elf32_sparc_relocate_section,
1949 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1950 R_SPARC_TLS_LE_{HIX22,LOX10}.
1951 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1952 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1953 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1954 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1956 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1958 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1960 2005-04-11 Nick Clifton <nickc@redhat.com>
1962 * aout-target.h: Convert to ISO C.
1963 * aoutf1.h: Convert to ISO C.
1964 * aoutx.h: Convert to ISO C.
1965 * bout.c: Convert to ISO C.
1966 * dwarf1.c: Convert to ISO C.
1967 * ecoffswap.h: Convert to ISO C.
1968 * freebsd.h: Convert to ISO C.
1969 * genlink.h: Convert to ISO C.
1970 * ieee.c: Convert to ISO C.
1971 * ihex.c: Convert to ISO C.
1972 * libcoff-in.h: Convert to ISO C.
1973 * mach-o.c: Convert to ISO C.
1974 * mach-o.h: Convert to ISO C.
1975 * netbsd.h: Convert to ISO C.
1976 * ns32k.h: Convert to ISO C.
1977 * ns32knetbsd.c: Convert to ISO C.
1978 * oasys.c: Convert to ISO C.
1979 * pdp11.c: Convert to ISO C.
1980 * pef-traceback.h: Convert to ISO C.
1981 * pef.c: Convert to ISO C.
1982 * pef.h: Convert to ISO C.
1983 * riscix.c: Convert to ISO C.
1984 * som.c: Convert to ISO C.
1985 * som.h: Convert to ISO C.
1986 * srec.c: Convert to ISO C.
1987 * stabs.c: Convert to ISO C.
1988 * sunos.c: Convert to ISO C.
1989 * tekhex.c: Convert to ISO C.
1990 * versados.c: Convert to ISO C.
1991 * version.h: Convert to ISO C.
1992 * xcoff-target.h: Convert to ISO C.
1993 * xcofflink.c: Convert to ISO C.
1994 * xsym.c: Convert to ISO C.
1995 * xsym.h: Convert to ISO C.
1997 2005-04-08 Paul Brook <paul@codesourcery.com>
1999 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2000 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2001 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2002 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2003 (elf32_arm_to_thumb_stub): Create PIC stubs.
2004 (record_arm_to_thumb_glue): Use different stub size for relocatable
2007 2005-04-05 Alan Modra <amodra@bigpond.net.au>
2009 * elf64-ppc.c (dec_dynrel_count): New function split out from
2010 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2011 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2012 (ppc64_elf_tls_optimize): Likewise.
2014 2005-04-05 Mark Kettenis <kettenis@gnu.org>
2016 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2017 CORE_WCOOKIE_OFFSET.
2018 (SPARC64_WCOOKIE_OFFSET): New.
2019 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2021 2005-04-05 Nick Clifton <nickc@redhat.com>
2023 * po/rw.po: New translation: Kinyarwanda
2024 * configure.in (ALL_LINGUAS): Add rw
2025 * configure: Regenerate.
2027 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
2029 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2030 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2031 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2033 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2034 to check for SHT_MIPS_OPTIONS sections.
2035 (_bfd_mips_elf_set_section_contents): Likewise.
2037 2005-04-04 Eric Christopher <echristo@redhat.com>
2039 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2040 Clean up gp handling code.
2042 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2044 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2046 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2047 sections for relocatable files only. Remove the linker created
2049 (_bfd_elf_compute_section_file_positions): Pass link_info to
2050 assign_section_numbers.
2052 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2053 (elf_backend_object_p): Defined.
2055 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2057 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2059 2005-04-03 Fred Fish <fnf@specifixinc.com>
2061 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2062 dwarf_ranges_size members.
2063 (struct comp_unit): Add base_address member.
2064 (struct funcinfo): Replace low/high members with an arange.
2065 (arange_add): Replace incoming "unit" parameter with "abfd" and
2066 "first_arange" pointers. Reorganize/rewrite function body.
2067 (decode_line_info): Change arange_add call to pass bfd and arange
2069 (lookup_address_in_line_info_table): Use arange list instead of
2070 individual low/high members. Walk function's arange list to find
2071 lowest PC in list, to test for overlapping functions.
2072 (read_debug_ranges): New function, reads the debug_ranges section.
2073 (lookup_address_in_function_table): Use arange list instead of
2074 individual low/high members. Rewrite to find smallest range that
2076 (read_rangelist): Read a given rangelist from debug_ranges.
2077 (scan_unit_for_functions): Use arange list instead of individual
2078 low/high members. Handle a DW_AT_ranges attribute.
2079 (parse_comp_unit): Use arange list instead of individual low/high
2080 members. Save comp unit base address. Handle a DW_AT_ranges
2083 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2085 * elf.c (assign_section_numbers): Really use the kept section.
2087 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2089 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2091 * elf.c (assign_section_numbers): When sh_link points to a
2092 discarded section, call _bfd_elf_check_kept_section to see if
2093 the kept section can be used. Otherwise reject sh_link
2094 pointing to discarded section.
2096 * elflink.c (_bfd_elf_check_kept_section): New.
2097 (elf_link_input_bfd): Use it.
2099 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2101 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2102 that we no longer need.
2104 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2106 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2108 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2110 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2112 * elf.c (assign_section_numbers): Fix a typo.
2114 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2116 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2118 (_bfd_elf_section_already_linked): Likewise.
2120 2005-03-31 Jerome Guitton <guitton@gnat.com>
2122 * config.in: Regenerate.
2124 2005-03-31 Jerome Guitton <guitton@gnat.com>
2126 * config.in (HAVE_DECL_BASENAME): New configure macro.
2127 * configure.in: Check for basename.
2128 * configure: Regenerate.
2130 2005-03-30 Julian Brown <julian@codesourcery.com>
2132 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2133 bfd_elf32_is_arm_mapping_symbol_name.
2134 * bfd-in2.h: Regenerate.
2135 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2136 bfd_elf32_is_arm_mapping_symbol_name.
2137 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2138 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2139 (arm_elf_find_function): Likewise.
2140 (elf32_arm_output_symbol_hook): Likewise.
2142 2005-03-30 Julian Brown <julian@codesourcery.com>
2144 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2145 * bfd-in2.h: Regenerate.
2146 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2147 bfd_elf32_is_arm_mapping_symbol_name.
2148 (elf32_arm_output_symbol_hook): Likewise.
2149 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2151 (is_arm_mapping_symbol_name): Function moved from here...
2152 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2155 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2157 * configure.in: Check for ffs decl and alphabetize.
2158 * config.in: Regenerate.
2159 * configure: Regenerate.
2160 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2162 2005-03-29 Fred Fish <fnf@specifixinc.com>
2164 * dwarf2.c (struct comp_unit): Fix typo.
2165 (scan_unit_for_functions): Remove unused local variable "name"
2166 and dead code that set it.
2168 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2169 Phil Blundell <philb@gnu.org>
2171 * bfd-in2.h, libbfd.h: Regenerated.
2172 * reloc.c: Add ARM TLS relocations.
2173 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2175 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2176 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2177 (elf32_arm_tls_ie32_howto): New.
2178 (elf32_arm_howto_from_type): Support TLS relocations.
2179 (elf32_arm_reloc_map): Likewise.
2180 (elf32_arm_reloc_type_lookup): Likewise.
2182 (struct elf32_arm_obj_tdata): New.
2183 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2184 (elf32_arm_mkobject): New function.
2185 (struct elf32_arm_relocs_copied): Add pc_count.
2186 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2187 (GOT_TLS_IE): Define.
2188 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2189 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2190 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2191 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2192 (dtpoff_base, tpoff): New functions.
2193 (elf32_arm_final_link_relocate): Handle TLS relocations.
2194 (IS_ARM_TLS_RELOC): Define.
2195 (elf32_arm_relocate_section): Warn about TLS mismatches.
2196 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2197 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2198 TLS relocations and pc_count.
2199 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2200 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2202 (elf32_arm_size_dynamic_sections): Handle TLS.
2203 (elf32_arm_finish_dynamic_symbol): Likewise.
2204 (bfd_elf32_mkobject): Define.
2206 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2208 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2209 relocation types. Don't count relocations which will use a PLT.
2211 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2213 * elf.c (elfcore_grok_nto_status): Print tid as long.
2214 (elfcore_grok_nto_regs): Likewise.
2216 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2218 * irix-core.c: Remove some unnecessary prototypes.
2220 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2222 * irix-core.c: Convert to ISO C.
2224 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2226 * irix-core.c (do_sections): Replace + by | in expression.
2227 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2228 to unused parameters to avoid a compiler warning.
2230 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2232 * netbsd-core.c: Convert to ISO C. Fix formatting.
2234 2005-03-24 Eric Christopher <echristo@redhat.com>
2236 * elfxx-mips.c: Revert previous patch.
2238 2005-03-24 Nick Clifton <nickc@redhat.com>
2240 * targets.c (_bfd_target_vector): Only include the
2241 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2242 all targets enabled.
2244 2005-03-24 James E Wilson <wilson@specifixinc.com>
2246 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2247 (BFD64_BACKENDS): Add elf32-ia64.lo.
2248 * Makefile.in: Regenerate.
2250 2005-03-23 Eric Christopher <echristo@redhat.com>
2252 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2253 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2254 after emitting relocation.
2255 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2256 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2259 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2260 Nick Clifton <nickc@redhat.com>
2262 * config.bfd: Accept any C library to accompany a GNU Linux
2263 implementation, not just the GNU C library.
2264 * configure.in: Likewise.
2265 * configure: Regenerate.
2267 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2269 * bfd-in.h (_bfd_elf_provide_symbol): New.
2270 * bfd-in2.h: Regenerated.
2272 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2273 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2276 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2279 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2281 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2283 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2285 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2286 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2287 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2288 (xtensa_opcode_decode): Rearrange code.
2290 2005-03-22 Nick Clifton <nickc@redhat.com>
2292 * binary.c: Convert to ISO C90 formatting.
2293 * coff-arm.c: Convert to ISO C90 formatting.
2294 * coffgen.c: Convert to ISO C90 formatting.
2295 * elf32-gen.c: Convert to ISO C90 formatting.
2296 * elf64-gen.c: Convert to ISO C90 formatting.
2297 * hash.c: Convert to ISO C90 formatting.
2298 * ieee.c: Convert to ISO C90 formatting.
2300 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2302 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2303 unresolved symbols in R_ARM_NONE relocations.
2305 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2307 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2308 UNRESOLVED_RELOC_P argument. Set it appropriately.
2309 (elf32_arm_relocate_section): Update call to
2310 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2311 unresolved_reloc instead.
2313 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2315 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2316 .gnu.warning.* sections.
2318 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2320 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2322 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2323 (elf_create_pointer_linker_section): Delete info parm. Don't make
2324 h dynamic. Don't set written_address_p.
2325 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2326 (bfd_put_ptr): Delete.
2327 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2328 Always write section contents. Assert global sym is def_regular.
2329 Use offset bottom bit as a written flag.
2330 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2333 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2335 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2336 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2339 2005-03-21 Nick Clifton <nickc@redhat.com>
2341 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2343 (t2a1_bx_pc_insn): Likewise.
2344 (t2a2_noop_insn): Likewise.
2345 (t2a3_b_insn): Likewise.
2346 (t2a1_push_insn): Likewise.
2347 (t2a2_ldr_insn): Likewise.
2348 (t2a3_mov_insn): Likewise.
2349 (t2a4_bx_insn): Likewise.
2350 (t2a5_pop_insn): Likewise.
2351 (t2a6_bx_insn): Likewise.
2352 (coff_arm_relocate_section): Only declare the high_address
2353 variable for non WINCE targets.
2355 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2357 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2358 SEC_LINKER_CREATED. Attach to dynobj.
2359 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2361 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2363 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2364 sym_offset. Add name, bss_name, sym_name, sym_val.
2365 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2366 Add sdata array of elf_linker_section_t.
2367 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2368 (enum elf_linker_section_enum): Delete.
2369 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2370 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2371 the special sections are needed. Adjust htab->sdata refs.
2372 Ensure dynobj is set in sreloc code.
2373 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2374 (ppc_elf_set_sdata_syms): New function.
2375 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2376 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2377 sym_val instead of sym_hash.
2378 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2380 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2382 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2383 (ppc_elf_merge_private_bfd_data): Likewise.
2385 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2387 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2388 (ppc_elf_create_linker_section): Don't create rel_section.
2389 (elf_create_pointer_linker_section): Don't size relocs.
2390 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2391 Don't generate relocs.
2392 (ppc_elf_relocate_section): Adjust calls to
2393 elf_finish_pointer_linker_section.
2395 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2397 * elf32-ppc.c (is_ppc_elf_target): New function.
2398 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2399 for bfd_target_elf_flavour. Do this test before endian check.
2400 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2401 (ppc_elf_size_dynamic_sections): Likewise.
2403 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2405 * elf-bfd.h (elf_backend_data): Add int to
2406 elf_backend_section_from_shdr.
2407 (bfd_elf_section_data): Update comment for this_idx.
2408 (_bfd_elf_make_section_from_shdr): Add int.
2409 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2411 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2412 and use it to set this_idx in bfd_elf_section_data.
2413 (bfd_section_from_shdr): Pass shindex to
2414 _bfd_elf_make_section_from_shdr.
2415 (_bfd_elf_section_from_bfd_section): Use this_idx in
2416 bfd_elf_section_data to find section index.
2418 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2419 index and pass it to _bfd_elf_make_section_from_shdr.
2420 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2421 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2422 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2423 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2424 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2425 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2426 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2427 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2428 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2430 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2431 Ross Ridge <rridge@csclub.uwaterloo.ca>
2433 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2434 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2437 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2439 * elflink.c (elf_mark_used_section): Remove check for special
2442 2005-03-18 Andreas Schwab <schwab@suse.de>
2444 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2445 from bfd_vma to ia64_insn, remove broken cast.
2447 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2449 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2450 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2451 elf_m68k_finish_dynamic_sections): Use it.
2453 2005-03-17 Paul Brook <paul@codesourcery.com>
2454 Dan Jacobowitz <dan@codesourcery.com>
2455 Mark Mitchell <mark@codesourcery.com>
2457 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2458 (elf32_arm_additional_program_headers): Likewise.
2459 (elf_backend_modify_segment_map): Define.
2460 (elf_backend_additional_program_headers): Likewise.
2461 (elf32_arm_symbian_modify_segment_map): Use
2462 elf32_arm_modify_segment_map.
2464 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2466 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2467 for special sections.
2469 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2471 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2472 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2473 section_sym_count param, and return number of section symbols.
2474 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2475 .dynsym contents. Don't bother calling swap_symbol_out on the
2476 first all-zero dynsym.
2477 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2478 special sections like bfd_abs_section.
2479 (bfd_elf_gc_sections): Spelling fix.
2481 2005-03-16 Fred Fish <fnf@specifixinc.com>
2484 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2485 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2487 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2489 * elflink.c (elf_mark_used_section): New.
2490 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2491 non-relocatable link if we don't do GC.
2493 2005-03-16 Nick Clifton <nickc@redhat.com>
2494 Ben Elliston <bje@au.ibm.com>
2496 * configure.in (werror): New switch: Add -Werror to the
2497 compiler command line. Enabled by default. Disable via
2499 * configure: Regenerate.
2501 2005-03-16 Nick Clifton <nickc@redhat.com>
2503 * ecoff.c: Convert to ISO C90 formatting.
2505 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2507 * elf32-ppc.c: Divide file into general and linker specific
2508 functions. Sort linker functions into roughly the order in which
2509 they are called by the ELF linker code.
2511 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2513 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2514 on section. Correct comment, and add FIXME.
2515 (ppc_elf_additional_program_headers): Don't bump header count for
2516 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2517 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2518 do allocate memory if they need it.
2520 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2522 * config.bfd (x86_64-elf): Add target.
2524 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2526 * po/es.po: Commit new Spanish translation.
2528 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2530 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2531 for global symbol when reporting overflow.
2533 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2535 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2536 * libbfd.h: Rebuilt.
2537 * archive.c (_bfd_ar_spacepad): New function.
2538 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2539 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2540 coff_write_armap): Use it.
2541 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2543 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2545 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2547 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2548 has_table to the start of the function.
2550 2005-03-10 Ben Elliston <bje@au.ibm.com>
2552 * archive.c: Include hashtab.h.
2553 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2554 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2555 (hash_file_ptr): New function.
2556 (eq_file_ptr): Likewise.
2557 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2558 * libbfd-in.h: Include hashtab.h.
2559 (struct artdata): Change `cache' member type to htab_t.
2560 * libbfd.h: Rebuild.
2562 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2564 * configure.in: Bump version to 2.16.90.
2565 * configure: Regenerated.
2567 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2569 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2570 close is a function like macro in system headers.
2572 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2575 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2576 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2578 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2580 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2582 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2584 * po/bfd.pot: Regenerate.
2586 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2588 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2590 (func_desc_adjust): Force dot-syms local in executables as well
2593 2005-03-04 David Daney <ddaney@avtrex.com>
2595 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2596 '__gnu_local_gp' symbol used by gas -mno-shared.
2598 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2600 * elf-bfd.h (elf_backend_data): Add "const char *" to
2601 elf_backend_section_from_phdr.
2603 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2604 elf_backend_section_from_phdr hook.
2606 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2607 Joseph Myers <joseph@codesourcery.com>
2609 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2610 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2612 (struct mips_elf_got_per_bfd_arg): Add global_count.
2613 (struct mips_elf_count_tls_arg): New.
2614 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2615 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2616 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2617 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2618 (TLS_RELOC_P): Define.
2619 (TP_OFFSET, DTP_OFFSET): Define.
2620 (dtprel_base, tprel_base): New functions.
2621 (mips_elf_link_hash_newfunc): Initialize tls_type.
2622 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2623 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2625 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2626 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2627 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2628 (mips_tls_got_index): New functions.
2629 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2630 arguments. Pass them to mips_elf_create_local_got_entry. Use
2632 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2634 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2635 mips_elf_create_local_got_entry.
2636 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2637 arguments. Handle TLS entries.
2638 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2639 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2641 (mips_elf_record_global_got_symbol): Likewise.
2642 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2644 (mips_elf_merge_gots): Handle TLS entries when merging.
2645 (mips_elf_initialize_tls_index): New function.
2646 (mips_elf_set_global_got_offset): Handle TLS entries.
2647 (mips_elf_adjust_gp): Handle TLS.
2648 (mips_elf_multi_got): Remove redundant call to
2649 mips_elf_resolve_final_got_entries. Initialize global_count.
2650 Correct a comment. Initialize new TLS members of mips_got_info.
2651 Assign TLS GOT indexes for new GOTs.
2652 (mips_elf_create_got_section): Initialize new TLS members of
2654 (mips_elf_calculate_relocation): Handle TLS relocs.
2655 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2657 (_bfd_mips_elf_always_size_sections): Handle TLS.
2658 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2659 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2661 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2662 (_bfd_mips_elf_hide_symbol): Handle TLS.
2663 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2664 (mips_reloc_map): Add TLS relocs.
2665 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2666 * elf64-mips.c (mips_elf64_howto_table_rel)
2667 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2668 * reloc.c: Define new MIPS TLS relocations.
2669 * libbfd.h, bfd-in2.h: Regenerated.
2671 2005-03-02 Jan Beulich <jbeulich@novell.com>
2673 * Makefile.am: Add dependency of cache.o on libiberty.h.
2674 * cache.c: Include libiberty.h.
2675 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2677 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2679 * elf.c (bfd_section_from_shdr <default case>): Call
2680 elf_backend_section_from_shdr hook unconditionally, and return
2682 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2683 * elfxx-target.h (elf_backend_section_from_shdr)
2684 (elf_backend_section_from_phdr): Default to
2685 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2688 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2690 * targets.h: Typo fix.
2691 * bfd-in2.h: Regenerate.
2693 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2694 structs to size on-disk structures.
2695 (b_out_set_section_contents): Size the external struct, not the
2696 internal one for on-disk size.
2697 (b_out_sizeof_headers): Likewise.
2699 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2701 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2702 entry points with the func descriptor as well as undefweak.
2704 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2706 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2707 present when IMPORT_NAME_UNDOECRATE is used.
2709 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2712 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2715 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2716 to _bfd_elf_merge_symbol.
2718 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2719 unsigned int to return the alignment of the old common symbol
2720 in the dynamic object.
2721 (_bfd_elf_add_default_symbol): Pass NULL to
2722 _bfd_elf_merge_symbol.
2723 (elf_link_add_object_symbols): Pass &old_alignment to
2724 _bfd_elf_merge_symbol. Get the alignment of the new common
2725 symbol in the dynamic object.
2727 2005-02-24 Ben Elliston <bje@au.ibm.com>
2729 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2730 * format.c (bfd_check_format_matches): Likewise.
2731 * archive.c (BFD_GNU960_ARMAG): Likewise.
2732 (bfd_generic_archive_p): Likewise.
2733 (_bfd_write_archive_contents): Likewise.
2735 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2737 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2738 * configure: Regenerate.
2740 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2742 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2743 COMDAT group sections to have default visibility.
2745 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2747 * coffcode.h (coff_print_aux): Warning fix.
2748 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2749 instead of section pointer to identify.
2750 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2751 the correct size buffer for local sym mangling too.
2752 (h8300_bfd_link_add_symbols): Likewise.
2753 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2755 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2756 * elf32-xtensa.c (literal_value_hash): Warning fix.
2757 * versados.c (process_otr): Warning fix.
2758 (versados_canonicalize_reloc): Likewise.
2759 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2760 * vms.c (fill_section_ptr): Warning fix.
2762 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2764 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2765 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2767 2005-02-23 Nick Clifton <nickc@redhat.com>
2769 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2770 the relvaddr field of the Elf32_crinfo structure.
2772 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2773 variables that are passed by reference to
2774 m68hc11_get_relocation_value in case that function does not
2777 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2778 return statements and replace with a single return at the end of
2779 the function. This helps pacify the flow analysis code in gcc 4.0.
2781 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2782 strtab to avoid compile time warning.
2784 2005-02-23 Ben Elliston <bje@au.ibm.com>
2786 * opncls.c (bfd_zalloc): Document this function.
2788 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2790 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2791 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2792 Replace SEC_SHARED with SEC_COFF_SHARED.
2793 (styp_to_sec_flags): Likewise.
2795 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2796 (TARGET_LITTLE_SYM): Likewise.
2798 * section.c (SEC_ARCH_BIT_0): Removed.
2799 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2800 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2801 (SEC_SHARED): Renamed to ...
2802 (SEC_COFF_SHARED): This.
2803 (SEC_BLOCK): Renamed to ...
2804 (SEC_TIC54X_BLOCK): This.
2805 (SEC_CLINK): Renamed to ...
2806 (SEC_TIC54X_CLINK): This.
2807 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2808 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2810 * bfd-in2.h: Regenerated.
2812 2005-02-21 Fred Fish <fnf@specifixinc.com>
2814 * dwarf2.c (find_abstract_instance_name): Call recursively
2815 to handle a DW_AT_specification.
2817 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2819 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2820 mips_elf_create_dynamic_relocation,
2821 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2822 Remove #if 0'd code.
2824 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2826 * Makefile.am: Run "make dep-am"
2827 * Makefile.in: Regenerate.
2829 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2831 * coffgen.c (bfd_coff_get_comdat_section): Check that
2832 coff_section_data isn't NULL.
2834 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2836 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2837 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2838 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2839 useless assignments.
2840 (xcoff_write_archive_contents_big): Likewise.
2841 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2842 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2843 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2844 * cofflink.c (process_embedded_commands): Warning fixes.
2845 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2847 * dwarf2.c: Warning fixes.
2848 * elf-bfd.h: Likewise.
2849 * elf-eh-frame.c: Likewise.
2850 * elf-strtab.c: Likewise.
2852 * elf32-m68k.c: Likewise.
2853 * elf32-ppc.c: Likewise.
2854 * elf32-sh-symbian.c: Likewise.
2855 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2856 * elf64-sh64.c: Likewise.
2857 * peicode.h: Likewise.
2858 * elf64-mmix.c: Warning fixes.
2859 * elfcode.h: Likewise.
2860 * elfxx-mips.c: Likewise.
2861 * libbfd-in.h: Likewise.
2862 * libbfd.c: Likewise.
2863 * mach-o.c: Likewise.
2864 * merge.c: Likewise.
2866 * opncls.c: Likewise.
2869 * vms-hdr.c: Likewise.
2870 * vms-tir.c: Likewise.
2871 * xtensa-isa.c: Likewise.
2872 * xtensa-modules.c: Likewise.
2874 (pstrcmp): Use correct choice of string lengths. Fix return value.
2875 (bfd_sym_module_name): Correct string length.
2876 * bfd-in2.h: Regenerate.
2877 * libbfd.h: Regenerate.
2879 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
2881 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2882 uninitialized check_segment[1] in TLSMOFF case.
2883 Reported by Alan Modra.
2884 (elf32_frv_relocate_section): Improve errors and warnings.
2886 2005-02-17 Alan Modra <amodra@bigpond.net.au>
2888 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2890 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2892 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2893 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2894 * pef.c (bfd_pef_scan): Don't ignore return value of
2895 bfd_pef_scan_start_address.
2896 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2897 bfd_mach_o_scan_start_address.
2898 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2899 * elfxx-mips.c: Remove unnecessary prototypes.
2900 (sort_dynamic_relocs_64): Abort if not BFD64.
2902 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2904 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2905 Skip toc reloc adjust if reloc_count is zero.
2907 2005-02-15 Nigel Stephens <nigel@mips.com>
2908 Maciej W. Rozycki <macro@mips.com>
2910 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2911 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2912 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2913 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2914 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2916 (mips16_gprel_reloc): Remove bit shuffling; call
2917 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2918 and _bfd_mips16_elf_reloc_shuffle() instead.
2919 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2920 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2922 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2923 elf_mips16_howto_table_rel.
2924 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2925 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2926 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2927 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2928 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2930 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2931 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2932 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2934 (mips16_gprel_reloc): Remove bit shuffling; call
2935 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2936 and _bfd_mips16_elf_reloc_shuffle() instead.
2937 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2938 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2940 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2941 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2942 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2943 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2944 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2945 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2946 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2948 (mips16_gprel_reloc): Remove bit shuffling; call
2949 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2950 and _bfd_mips16_elf_reloc_shuffle() instead.
2951 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2952 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2954 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2955 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2956 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2957 handle bit shuffling for MIPS16 relocs.
2958 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2959 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2960 and _bfd_mips16_elf_reloc_shuffle().
2961 (_bfd_mips_elf_generic_reloc): Likewise.
2962 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2964 (mips_elf_obtain_contents): Remove bit shuffling.
2965 (mips_elf_perform_relocation): Likewise; call
2966 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2968 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2970 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2971 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2972 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2973 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2974 (BFD_RELOC_MIPS16_LO16): Likewise.
2975 * bfd-in2.h: Regenerate.
2976 * libbfd.h: Regenerate.
2978 2005-02-15 Jan Beulich <jbeulich@novell.com>
2980 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2981 R_IA64_DTPMOD64[LM]SB.
2983 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2985 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2986 backward branch in the same section.
2987 (elfNN_ia64_relocate_section): Inform users that the input
2988 section is too big to relax br instruction when overflow
2989 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2990 and R_IA64_PCREL21F.
2992 2005-02-14 Orjan Friberg <orjanf@axis.com>
2994 * elfcore.h (elf_core_file_p): Move the call to
2995 elf_backend_object_p to allow the correct machine to be set before
2996 processing the program headers.
2998 2005-02-14 Nick Clifton <nickc@redhat.com>
3001 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3002 aware flag from the input bfd to the output bfd.
3004 2005-02-11 Maciej W. Rozycki <macro@mips.com>
3006 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3007 R_MIPS_LITERAL relocations for external symbols.
3008 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3009 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3011 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3013 * bfd-in2.h: Rebuilt.
3015 2005-02-11 Paul Brook <paul@codesourcery.com>
3017 * elf-bfd.h (struct elf_link_hash_table): Add
3018 is_relocatable_executable.
3019 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3020 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3021 symbols in relocatable executables.
3022 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3023 relocatable executables.
3024 (_bfd_elf_link_renumber_dynsyms): Ditto.
3025 (bfd_elf_final_link): Ditto.
3026 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3027 relocations into relocatable executables.
3028 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3029 executables. Also copy absolute relocations.
3030 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3031 in relocatable executables.
3032 (allocate_dynrelocs): Copy relocations for relocatable executables.
3033 Output dynamic symbols for symbols defined in linker scripts.
3035 2005-02-11 Nick Clifton <nickc@redhat.com>
3037 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3038 to avoid a compile time warning.
3040 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3043 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3044 inclusion of coffcode.h so that it is actually picked up.
3046 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3047 case it is not used.
3049 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3050 structure and macro.
3052 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3055 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3056 to protect the declaration of this array.
3058 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3059 Avoid call to memcpy with a size of 0.
3061 2005-02-12 Alan Modra <amodra@bigpond.net.au>
3063 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3064 old-style branches to undefined dot-symbols which will be
3065 satisfied by a plt call.
3067 2005-02-11 Alan Modra <amodra@bigpond.net.au>
3069 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3070 (ppc64_elf_copy_indirect_symbol): ..here.
3071 (func_desc_adjust): Use move_plt_plist.
3073 2005-02-10 Paul Brook <paul@codesourcery.com>
3075 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3077 2005-02-10 Paul Brook <paul@codesourcery.com>
3079 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3081 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3082 (elf_link_renumber_local_hash_table_dynsyms): New function.
3083 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3085 2005-02-10 Jakub Jelinek <jakub@redhat.com>
3087 * bfd-in.h (BFD_LINKER_CREATED): Define.
3088 * bfd-in2.h: Rebuilt.
3089 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3090 BFD_LINKER_CREATED bfds when determining input bfds without
3091 .note.GNU-stack section.
3093 2005-02-10 Maciej W. Rozycki <macro@mips.com>
3095 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3096 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3097 relocations against external symbols unchanged.
3099 2005-02-08 Paul Brook <paul@codesourcery.com>
3101 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3104 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
3106 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3109 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3111 * elf64-mips.c: Fix formatting throughout.
3113 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3115 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3117 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
3119 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3120 *ABS*/*UND* sections.
3121 (elf32_frv_relocate_section): Move zero-addend-required error...
3122 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3123 missing needed TLS section.
3125 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
3127 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3128 being the last symbol.
3129 (aout_link_add_symbols): Just return TRUE if a warning
3132 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3134 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3135 R_MIPS_GPREL32 relocations against external symbols.
3136 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3139 2005-02-07 Alan Modra <amodra@bigpond.net.au>
3141 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3142 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3143 elf_string_from_elf_strtab.
3144 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3145 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3146 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3147 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3148 looking at cached symtab info first, before iterating over headers.
3149 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3150 * elfcode.h (elf_object_p): Don't load section header stringtab
3153 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3155 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3156 against protected function when building shared library.
3159 * elf64-x86-64.c (is_32bit_relative_branch): New.
3160 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3161 protected function symbol when building shared library for
3162 32bit relative branch instruction.
3164 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3166 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3167 syms when doing a relocatable link.
3168 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3170 (ppc64_elf_tls_setup): Likewise.
3171 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3173 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3175 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3176 (link_hash_newfunc): Clear all locals using memset.
3177 (make_fdh): Remove flags param. Always create fake func desc
3178 weak. Link the descriptor with the code entry sym.
3179 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3180 (add_symbol_adjust): Adjust make_fdh call.
3181 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3182 descriptor to strong undefined if code entry is strong.
3184 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3186 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3187 lookup here. Set to new before calling bfd_link_repair_undef_list.
3188 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3190 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3192 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3194 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3196 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3197 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3198 before the as-needed lib was loaded. Abort on unexpected refs.
3200 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3202 * elflink.c (elf_smash_syms): Expand comments.
3203 (elf_link_add_object_symbols): Only call elf_smash_syms for
3204 as-needed dynamic objects.
3206 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3207 everything, just the field specific to ia64.
3208 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3210 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3212 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3213 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3215 (struct add_symbol_adjust_data): New.
3216 (add_symbol_adjust): Make an undefweak func desc for old ABI
3217 objects to link with --as-needed shared libs. Return fail status.
3218 Don't adjust old ABI func entry sym to weak if func desc syms
3220 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3223 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3225 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3228 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3230 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3231 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3232 remove anything but new and undefweak.
3233 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3235 (_bfd_elf_create_dynamic_sections): Formatting.
3236 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3237 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3238 (struct elf_smash_data): New.
3239 (elf_smash_syms): New function.
3240 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3241 unneeded dynamic objects to loaded list.
3242 (elf_link_output_extsym): Don't handle as-needed here. Strip
3243 bfd_link_hash_new symbols.
3244 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3245 delref when dynindx is already -1.
3246 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3248 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3250 2005-02-01 Ben Elliston <bje@au.ibm.com>
3252 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3254 2005-02-01 Ben Elliston <bje@au.ibm.com>
3256 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3257 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3258 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3259 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3260 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3261 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3262 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3263 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3264 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3265 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3266 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3267 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3268 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3269 throughout. Similarly, collapse #if 1'd code.
3271 2005-02-01 Ben Elliston <bje@au.ibm.com>
3273 * elf-bfd.h (bfd_elf_discard_group): Remove.
3274 * elf.c (bfd_elf_discard_group): Likewise.
3275 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3277 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3279 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3280 (_bfd_elf_eh_frame_address_size): Declare.
3281 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3282 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3283 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3284 (elf_backend_eh_frame_address_size): Define.
3285 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3286 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3287 size from the new backend hook.
3288 (_bfd_elf_write_section_eh_frame): Likewise.
3289 (_bfd_elf_eh_frame_address_size): New function.
3291 2005-01-31 Andrew Cagney <cagney@gnu.org>
3293 * configure: Regenerate to track ../gettext.m4.
3295 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3297 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3298 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3300 2005-01-31 Nick Clifton <nickc@redhat.com>
3302 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3303 sparc-lynxos, vax-vms) be obsolete.
3305 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3307 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3308 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3309 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3310 * elfcode.h (elf_object_p): Use minpagesize instead of
3312 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3313 (elfNN_bed): Include ELF_MINPAGESIZE.
3315 2005-01-28 Julian Brown <julian@codesourcery.com>
3317 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3318 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3319 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3320 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3321 passing flag value from ld. Set flag value in global hash table entry.
3322 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3325 2005-01-27 Andrew Cagney <cagney@gnu.org>
3327 * configure: Regenerate to track ../gettext.m4 change.
3329 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3331 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3334 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3336 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3337 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3339 * reloc.c: Add R_FRV_TLSMOFF.
3340 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3341 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3342 (elf32_frv_relocate_section): Handle it.
3343 (elf32_frv_check_relocs): Likewise.
3344 * libbfd.h, bfd-in2.h: Rebuilt.
3345 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3346 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3347 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3348 such that they return the constant in gr9.
3349 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3351 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3352 too, such that they shrink on relaxation.
3353 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3354 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3355 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3356 if we can guarantee the use of 16-bit constants.
3357 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3358 Introduce TLS support for FR-V FDPIC.
3359 * reloc.c: Add TLS relocations.
3360 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3361 (elf32_frv_rel_tlsdesc_value_howto): New.
3362 (elf32_frv_rel_tlsoff_howto): New.
3363 (frv_reloc_map): Add new mappings.
3364 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3366 (frvfdpic_dynamic_got_plt_info): New.
3367 (frvfdpic_plt_tls_ret_offset): New.
3368 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3369 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3370 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3371 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3373 (struct frvfdpic_relocs_info): Add TLS fields.
3374 (frvfdpic_relocs_info_hash): Warning clean up.
3375 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3376 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3377 (FRVFDPIC_TLS_BIAS): Define.
3378 (tls_biased_base): New.
3379 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3381 (frv_reloc_type_lookup): Likewise.
3382 (frvfdpic_info_to_howto_rel): Likewise.
3383 (elf32_frv_relocate_section): Likewise.
3384 (_frv_create_got_section): Create the PLT section here.
3385 (elf32_frvfdpic_create_dynamic_sections): Not here.
3386 (_frvfdpic_count_nontls_entries): Move out of...
3387 (_frvfdpic_count_got_plt_entries): ... here.
3388 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3389 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3391 (_frvfdpic_relax_tls_entries): New.
3392 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3393 (_frvfdpic_get_tlsdesc_entry): New.
3394 (_frvfdpic_assign_got_entries): Add TLS support.
3395 (_frvfdpic_assign_plt_entries): Likewise.
3396 (_frvfdpic_reset_got_plt_entries): New.
3397 (_frvfdpic_size_got_plt): Move out of...
3398 (elf32_frvfdpic_size_dynamic_sections): ... here.
3399 (_frvfdpic_relax_got_plt_entries): New.
3400 (elf32_frvfdpic_relax_section): New.
3401 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3402 (elf32_frv_check_relocs): Add TLS support.
3403 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3404 * libbfd.h, bfd-in2.h: Rebuilt.
3406 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3408 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3409 loadable reloc sections.
3410 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3411 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3413 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3415 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3416 sections immediately when linking shared libs. Instead, wait until
3417 we know a lib is needed.
3418 (_bfd_elf_link_create_dynstrtab): Extract from..
3419 (_bfd_elf_link_create_dynamic_sections_): ..here.
3420 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3421 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3422 for non-existent .dynamic.
3423 (elf_link_output_extsym): Don't complain about undefined symbols
3424 in as-needed dynamic libs that aren't actually linked.
3426 2005-01-24 Andrew Cagney <cagney@gnu.org>
3428 * configure: Regenerate, ../gettext.m4 was updated.
3430 2005-01-21 Ben Elliston <bje@au.ibm.com>
3432 * aout-encap.c: Remove unused file.
3434 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3437 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3438 non-function symbols are local.
3439 (_bfd_elf_symbol_refs_local_p): Likewise.
3441 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3443 * bfd.c (bfd_link_just_syms): Add abfd param.
3444 * bfd-in2.h: Regenerate.
3446 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3448 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3449 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3450 instructions. If the amount of padding is known, reduce the size
3451 of the CIE or FDE by that amount.
3453 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3455 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3456 augmentation_size. Use bfd_signed_vmas for data_align.
3457 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3458 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3459 functions. Don't read past the end of the enclosing CIE or FDE.
3460 (skip_bytes): New utility function.
3461 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3463 (_bfd_elf_write_section_eh_frame): Use new functions.
3465 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3467 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3468 assert-style REQUIRE() macro to handle sanity checks.
3470 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3472 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3474 (read_unsigned_leb128): Removed.
3475 (read_signed_leb128): Removed.
3476 (find_abstract_instance_name): Updated.
3477 (parse_comp_unit): Accept info_ptr_unit.
3478 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3479 comp unit and pass it to parse_comp_unit.
3481 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3482 (read_signed_leb128): Moved to ...
3485 * libbfd-in.h (read_unsigned_leb128): New prototype.
3486 (read_signed_leb128): Likewise.
3487 * libbfd.h: Regenerated.
3489 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3490 Nick Clifton <nickc@redhat.com>
3492 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3493 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3494 arch_sh4a_nofpu_up in order to match the external names and make the
3495 testsuite's job easier.
3496 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3498 * bfd-in2.h: Regenerate.
3500 2005-01-15 Andrew Cagney <cagney@gnu.org>
3503 * acinclude.m4: Move BFD_NEED_DECLARATION,
3504 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3505 the new file bfd.m4. Include ../bfd/bfd.m4.
3506 * configure: Re-generate.
3508 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3510 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3511 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3513 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3514 R_PPC_RELAX32PC_PLT.
3516 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3518 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3520 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3521 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3522 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3523 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3524 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3525 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3526 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3527 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3528 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3529 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3530 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3531 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3532 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3533 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3535 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3537 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3540 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3542 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3543 * bfd-in2.h: Regenerate.
3544 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3545 to support these new machine values.
3546 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3548 (bfd_maxq_arch): Update values for the maxq20.
3550 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3552 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3553 non-shared object, do not reserve space in .plt and .rela.plt for
3554 regular symbols neither defined nor referenced in shared objects.
3556 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3558 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3559 to zero the structure.
3560 (create_got_section): Use BFD_ASSERT instead of abort.
3561 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3563 (create_got_section): New function.
3564 (sparc64_elf_create_dynamic_sections): Likewise.
3565 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3566 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3567 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3568 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3569 (sparc64_elf_finish_dynamic_symbol): Likewise.
3570 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3571 (elf_backend_create_dynamic_sections): Define to
3572 sparc64_elf_create_dynamic_sections.
3574 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3576 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3577 (elf_backend_omit_section_dynsym): Define to it.
3578 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3579 (elf_backend_omit_section_dynsym): Define to it.
3581 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3583 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3584 PT_DYNAMIC segment, unless .dynamic.
3586 2005-01-06 Paul Brook <paul@codesourcery.com>
3588 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3589 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3590 * configure: Regenerate.
3591 * elf32-arm.c: Add VxWorks target bfd.
3593 (elf32_arm_link_hash_table): Add use_rel.
3594 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3595 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3596 Correct offset calculation for RELA case.
3597 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3598 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3599 (elf32_arm_vxworks_link_hash_table_create): New function.
3600 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3601 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3602 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3604 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3606 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3608 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3609 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3610 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3611 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3612 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3613 (toc_adjusting_stub_needed): Rewrite.
3614 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3615 toc tests. Adjust for toc_adjusting_stub_needed changes.
3616 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3617 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3618 * section.c: Expand comment on backend bits.
3619 * bfd-in2.h: Regenerate.
3620 * libbfd.h: Regenerate.
3622 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3624 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3625 toc adjusting stub, do not test source section flags.
3627 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3629 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3630 from STABS debugging sections again.
3632 2005-01-05 Fred Fish <fnf@specifixinc.com>
3634 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3635 (find_abstract_instance_name): New function.
3636 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3637 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3638 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3640 2004-12-31 Paul Brook <paul@copdesourcery.com>
3642 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3644 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3646 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3647 Commit missing changes from 2004-12-22.
3648 * bfd-in2.h: Regenerate.
3650 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3652 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3654 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3656 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3657 Add 'base' argument for constructing register sections. Reformat.
3658 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3659 gp and fp regs. Reformat.
3661 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3663 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3664 * bfd-in2.h: Regenerate.
3665 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3666 (avr_reloc_map): Likewise.
3667 (avr_final_link_relocate): Likewise.
3669 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3671 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3672 as-needed dynamic libs as undefined.
3673 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3674 libs when finding they are needed.
3676 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3678 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3679 (opd_entry_value): Use opd_relocs if available.
3680 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3681 copy .opd relocations to opd_relocs.
3682 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3684 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3686 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3687 * elf32-v850.c (v850_elf_howto_table): Add entry for
3688 R_V850_LO16_SPLIT_OFFSET.
3689 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3690 (v850_elf_perform_lo16_relocation): New function, extracted from...
3691 (v850_elf_perform_relocation): ...here. Use it to handle
3692 R_V850_LO16_SPLIT_OFFSET.
3693 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3694 R_V850_LO16_SPLIT_OFFSET.
3695 * libbfd.h, bfd-in2.h: Regenerate.
3697 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3699 * config.bfd: Add s390x-ibm-tpf support.
3701 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3703 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3704 to prototype, to make hash info available.
3705 Prevent wrapped symbols from being adjusted twice.
3707 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3709 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3710 overflow for calls to undefined weak symbols.
3712 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3714 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3715 canonical sections syms have a name.
3717 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3719 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3720 have been adjusted for output.
3721 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3723 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3725 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3726 add symtab_hdr param.
3727 (group_signature): Update calls.
3728 * elf-bfd.h (bfd_elf_sym_name): Update.
3729 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3730 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3731 (ppc64_elf_relocate_section): Update.
3732 * elflink.c (elf_link_input_bfd): Update.
3734 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3736 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3737 st_shndx on STT_SECTION sections.
3739 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3741 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3742 ELF section symbols.
3744 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3746 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3747 return a real value, unless it is a PLT symbol.
3748 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3751 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3752 R_MIPS_JALR entry to 0.
3754 * archures.c: Define bfd_mach_mips9000.
3755 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3756 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3757 * cpu-mips.c (I_mips9000): Define.
3758 (arch_info_struct): Add case for bfd_mach_mips9000.
3759 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3760 * bfd-in2.h: Regenerate.
3762 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3764 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3767 2004-12-07 Ben Elliston <bje@gnu.org>
3769 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3771 2004-12-06 Daniel Jacobowitz <dan@debian.org>
3773 Suggested by Fergal Daly <fergal@esatclear.ie>:
3774 * simple.c (simple_dummy_multiple_definition): New function.
3775 (bfd_simple_get_relocated_section_contents): Use it.
3777 2004-12-03 Jan Beulich <jbeulich@novell.com>
3779 * elf.c (elf_find_function): Don't use the last file symbol ever,
3780 seen, but the last one seen prior to the symbol being reported.
3781 Don't report a filename at all for global symbols when that might
3784 2004-12-01 Paul Brook <paul@codesourcery.com>
3786 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3787 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3790 2004-12-01 Paul Brook <paul@codesourcery.com>
3792 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3795 2004-11-30 Paul Brook <paul@codesourcery.com>
3797 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3798 no_pipeline_knowledge
3799 (elf32_arm_link_hash_table_create): Ditto.
3800 (bfd_elf32_arm_process_before_allocation): Ditto.
3801 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3803 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3805 * bfd-in2.h: Regenerate.
3807 2004-11-30 Randolph Chung <tausq@debian.org>
3809 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3810 (elf32_hppa_grok_psinfo): New function.
3811 (elf_backend_grok_prstatus): Define.
3812 (elf_backend_grok_psinfo): Define.
3814 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3817 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3819 2004-11-24 Paul Brook <paul@codesourcery.com>
3821 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3823 2004-11-24 Paul Brook <paul@codesourcery.com>
3825 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3826 (elf32_arm_swap_symbol_out): New function.
3827 (elf32_arm_size_info): Add.
3828 (elf_backend_size_info): Define.
3830 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3832 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3835 2004-11-19 Alan Modra <amodra@bigpond.net.au>
3837 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3838 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3839 * nlmcode.h (nlm_write_object_contents): Warning fix.
3841 2004-11-18 Bob Wilson <bob.wilson@acm.org>
3843 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3845 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3847 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3848 (elf32_arm_plt_thumb_stub): New.
3849 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3851 (elf32_arm_link_hash_traverse): Fix typo.
3852 (elf32_arm_link_hash_table): Add obfd.
3853 (elf32_arm_link_hash_newfunc): Initialize new fields.
3854 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3855 (elf32_arm_link_hash_table_create): Initialize obfd.
3856 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3857 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3858 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3859 interworking BFD is not dynamic.
3860 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3861 not emit glue for PLT references.
3862 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3863 emit glue for PLT references. Support the Thumb PLT prefix.
3864 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3866 (elf32_arm_check_relocs): Likewise.
3867 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3869 (allocate_dynrelocs): Handle Thumb PLT references.
3870 (elf32_arm_finish_dynamic_symbol): Likewise.
3871 (elf32_arm_symbol_processing): New function.
3872 (elf_backend_symbol_processing): Define.
3874 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3876 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3877 add_fde_encoding. Remove need_relative.
3878 * elf-eh-frame.c (extra_augmentation_string_bytes)
3879 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3880 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3881 in cases where the CIE has no existing 'R' augmentation. Use
3882 size_of_output_cie_fde when assigning offsets. Use the final offset
3883 as the new section size.
3884 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3885 Account for any extra augmentation bytes in the returned offset.
3886 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3887 moved before being modified. Pad growing entries with DW_CFA_nops.
3888 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3889 and add_fde_encoding.
3891 2004-11-15 Mark Mitchell <mark@codesourcery.com>
3893 * elf32-arm.c (elf32_arm_relocate_section): Use
3894 arm_real_reloc_type.
3896 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3898 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3899 for discard relocations; don't add an R_MIPS_NONE to the main body
3902 2004-11-04 Paul Brook <paul@codesourcery.com>
3904 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3905 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3906 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3907 default version definition for unversioned symbols.
3908 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3909 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3910 _bfd_elf_slurp_version_tables. Set default version for unversioned
3913 2004-11-15 Paul Brook <paul@codesourcery.com>
3915 * elflink.c (elf_link_add_object_symbols): Don't assume version
3916 indices are consecutive.
3918 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
3920 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3921 composite relocations against the personality data.
3923 2004-11-13 Paul Brook <paul@codesourcery.com>
3925 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3926 R_ARM_PREL31 relocations to PLT entries.
3927 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3928 (elf32_arm_check_relocs): Ditto.
3930 2004-11-12 Bob Wilson <bob.wilson@acm.org>
3932 * xtensa-isa.c (xtensa_interface_class_id): New.
3934 2004-11-11 Bob Wilson <bob.wilson@acm.org>
3936 * elf32-xtensa.c (property_table_compare): Remove assertion about
3937 entries with the same address and non-zero size.
3938 (xtensa_read_table_entries): Report such entries as errors.
3940 2004-11-11 Mark Mitchell <mark@codesourcery.com>
3942 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3943 R_ARM_RELATIVE on Symbian OS.
3945 2004-11-09 Mark Mitchell <mark@codesourcery.com>
3947 * som.c (som_bfd_print_private_bfd_data): New function.
3948 (som_object_setup): Save the auxiliary header. Don't assume that
3949 zero is an invalid entry point for a shared library.
3950 (som_object_p): Allocate the auxiliary header on the heap.
3952 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3954 (elf32_arm_symbian_modify_segment_map): Likewise.
3956 2004-11-09 Daniel Jacobowitz <dan@debian.org>
3958 From David Poole <daveml@mbuf.com>:
3959 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3960 (elf32_arm_size_dynamic_sections): Call it.
3962 2004-11-09 Alan Modra <amodra@bigpond.net.au>
3964 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3965 (ALL_MACHINES_CFILES): Fix typo.
3966 * Makefile.in: Regenerate.
3967 * po/SRC-POTFILES.in: Regenerate.
3969 2004-11-08 Mark Mitchell <mark@codesourcery.com>
3971 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3972 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3973 symbol in the relocation.
3975 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3976 Vineet Sharma <vineets@noida.hcltech.com>
3978 * coff-maxq.c: New File.
3979 * cpu-maxq.c: New File.
3980 * coffcode.h: Likewise.
3981 * config.bfd: Likewise.
3982 * configure.in (maxqcoff_vec): New target vector.
3983 * Makefile.am: Add support for maxq target.
3984 * configure.in: Likewise.
3985 * archures.c:. Likewise.
3986 * targets.c: Likewise.
3987 * bfd_in2.h : Regenerated.
3988 * Makefile.in: Regenerated.
3989 * configure: Regenerated.
3990 * doc/Makefile.in: Regenerated.
3992 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3994 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3995 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3996 C_NT_WEAK aux entries.
3997 (_bfd_coff_generic_relocate_section): Handle undefined
4000 2004-11-07 Andreas Schwab <schwab@suse.de>
4002 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4003 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4004 non-default visibility.
4006 2004-11-01 Mark Mitchell <mark@codesourcery.com>
4008 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4010 (elf32_arm_symbian_modify_segment_map): Don't
4011 reset includes_filehdr and includes_phdrs here.
4013 2004-11-04 Daniel Jacobowitz <dan@debian.org>
4015 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4016 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4017 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4019 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4020 to a new removed list. Remove normal configuration stanzas.
4021 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4022 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4023 elfarm-nabi.lo with elf32-arm.lo.
4024 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4025 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4026 * elf32-arm.h: Remove.
4027 * elfarm-oabi.c: Remove.
4028 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4029 and bfd_elf32_littlearm_oabi_vec.
4030 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4032 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
4034 * config.bfd: Support crisv32-*-* like cris-*-*.
4035 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4036 (bfd_mach_cris_v10_v32): New macros.
4037 * cpu-cris.c: Tweak formatting.
4038 (get_compatible): New function.
4040 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4041 bfd_arch_info_type:s.
4042 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4043 get_compatible for member compatible and link bfd_cris_arch_v32 as
4045 * elf32-cris.c (cris_elf_pcrel_reloc)
4046 (cris_elf_set_mach_from_flags): New functions.
4047 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4048 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4049 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4050 numbers for bfd_mach_cris_v32.
4051 (PLT_ENTRY_SIZE_V32): New macro.
4052 (elf_cris_plt0_entry): Drop last comma in initializer.
4053 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4054 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4056 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4058 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4059 (elf_cris_finish_dynamic_sections): Similar.
4060 (elf_cris_adjust_dynamic_symbol): Similar.
4061 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4063 <switch with PIC relocs>: Emit error and return FALSE for
4064 bfd_mach_cris_v10_v32.
4065 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4066 Emit warning when generating textrel reloc.
4067 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4068 (cris_elf_final_write_processing): Set flags according to mach.
4069 (cris_elf_print_private_bfd_data): Display
4070 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4071 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4072 new_flags. Don't call cris_elf_final_write_processing. Don't
4073 look at the actual elf header flags at all; use
4074 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4075 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4077 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4078 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4079 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4080 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4081 * bfd-in2.h, libbfd.h: Regenerate.
4083 2004-11-04 Alan Modra <amodra@bigpond.net.au>
4085 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4086 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4088 (struct adjust_toc_info): New.
4089 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4091 2004-11-03 Bob Wilson <bob.wilson@acm.org>
4093 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4094 if there are no segments.
4096 2004-11-02 Daniel Jacobowitz <dan@debian.org>
4098 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4100 2004-11-02 Nick Clifton <nickc@redhat.com>
4102 * elf32-iq2000.c: Convert to ISO C90 formatting.
4104 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
4106 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4108 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4110 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4111 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4112 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4114 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4116 * elf32-sh.c (tpoff): Take alignment into account.
4118 2004-10-28 Nick Clifton <nickc@redhat.com>
4120 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4121 performing a relocatable link.
4122 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4123 for MIPS ports under Irix.
4125 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
4127 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4128 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4129 (elf32_arm_final_link_relocate): Ditto.
4130 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4131 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4132 (elf32_arm_adjust_dynamic_symbol): Ditto.
4133 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4134 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4135 (elf32_arm_r_howto): ... To here.
4136 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4138 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4141 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4142 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4143 and R_IA64_SECREL64LSB.
4145 2004-10-26 Paul Brook <paul@codesourcery.com>
4147 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4148 (bfd_elf_size_dynamic_sections): Create default version definition.
4149 (elf_link_output_extsym): Adjust for default symbol version.
4151 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4153 * mmo.c: Adjust to ISO C.
4155 * mmo.c (mmo_write_section_description): New function broken out
4156 of mmo_internal_write_section.
4157 (mmo_internal_write_section): For each of .text and .data, call
4158 mmo_write_section_description before outputting contents if it has
4159 nontrivially deducible vma or contents.
4160 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4161 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4162 symbols if found within the .data address range.
4164 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4166 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4168 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4170 * mmo.c (File Layout): Correct place of misplaced blurb about
4173 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4175 * config.bfd: Add mips64*-*-openbsd.
4177 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4179 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4182 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4184 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4185 * configure: Regenerate.
4187 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4190 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4191 to linker reloc_overflow callback.
4192 (aout_link_input_section_ext): Likewise.
4193 (aout_link_reloc_link_order): Likewise.
4194 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4195 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4197 (alpha_relocate_section): Likewise.
4198 * coff-arm.c (coff_arm_relocate_section): Likewise.
4199 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4200 * coff-h8500.c (extra_case): Likewise.
4201 * coff-i960.c (coff_i960_relocate_section): Likewise.
4202 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4203 * coff-mips.c (mips_relocate_section): Likewise.
4204 * coff-or32.c (coff_or32_relocate_section): Likewise.
4205 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4206 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4207 * coff-sh.c (sh_relocate_section): Likewise.
4208 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4209 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4210 * coff-z8k.c (extra_case): Likewise.
4211 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4212 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4213 (_bfd_coff_generic_relocate_section): Likewise.
4214 * ecoff.c (ecoff_reloc_link_order): Likewise.
4215 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4216 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4217 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4218 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4219 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4220 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4221 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4222 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4223 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4224 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4225 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4226 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4227 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4228 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4229 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4230 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4231 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4232 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4233 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4234 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4235 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4236 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4237 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4238 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4239 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4240 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4241 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4242 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4243 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4244 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4245 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4246 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4247 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4248 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4249 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4250 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4251 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4252 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4253 * elflink.c (elf_reloc_link_order): Likewise.
4254 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4255 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4256 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4257 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4258 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4259 (aout_link_reloc_link_order): Likewise.
4260 * reloc.c (bfd_generic_get_relocated_section_contents):
4262 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4263 * simple.c (simple_dummy_reloc_overflow): Updated.
4265 2004-10-20 Andreas Schwab <schwab@suse.de>
4267 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4268 (elf_backend_plt_sym_val): Define.
4270 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4272 * config.bfd: Set targ_underscore=yes for PE COFF targets
4274 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4276 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4277 (ppc64_elf_edit_opd): Likewise.
4279 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4281 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4282 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4283 set SEC_ALLOC and SEC_LOAD.
4285 2004-10-18 Nick Clifton <nickc@redhat.com>
4287 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4288 'name' for relocs against both local and global symbols.
4290 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4292 * bfd-in2.h: Regenerate.
4293 * bfd.c (struct bfd): Add no_export.
4294 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4296 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4298 * config.bfd: Whitespace cleanup.
4299 * Makefile.am: Run "make dep-am"
4300 * Makefile.in: Regenerate.
4302 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4304 * elflink.c (struct already_linked_section): Removed.
4305 (try_match_symbols_in_sections, already_linked): Removed.
4306 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4307 prefix of section names when finding already_linked_table
4308 chain. Compare section names. Instead of calling already_linked,
4309 do it inline and only for sections in the same already_linked_list.
4311 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4313 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4314 parameter. If called after _bfd_elf_write_section_eh_frame,
4315 don't allow a -2 return unless need_* bit is already set, and
4316 handle offsets adjusted for output_offset.
4317 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4318 * elf.c (_bfd_elf_section_offset): Update call.
4320 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4323 * coffcode.h (coff_compute_section_file_positions): Cast to
4324 bfd_vma when computing page alignment.
4326 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4328 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4329 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4331 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4333 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4334 relocations use a virtual address, not a section offset.
4336 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4338 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4339 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4340 xtensa_format_encode.
4341 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4342 (ebb_add_proposed_action): Delete.
4344 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4346 * elf32-xtensa.c: Use ISO C90 formatting.
4348 2004-10-12 Paul Brook <paul@codesourcery.com>
4350 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4353 2004-10-12 Paul Brook <paul@codesourcery.com>
4355 * elf32-arm.h: Support EABI version 4 objects.
4357 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4360 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4361 Don't mark as default.
4362 (bfd_x86_64_arch): Don't mark as default.
4364 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4366 * elflink.c (enum action_discarded): New.
4367 (elf_section_complain_discarded): Delete.
4368 (elf_action_discarded): New function subsuming the above and also
4369 controlling reloc behaviour.
4370 (elf_link_input_bfd): Use it.
4372 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4374 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4375 (special_sections): Add .gnu.liblist and .gnu.conflict.
4376 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4378 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4381 * elflink.c (elf_link_input_bfd): Try harder to support
4382 relocations against symbols in removed linkonce sections.
4384 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4386 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4389 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4390 sections do not reference symbols in non-SEC_ALLOC sections.
4392 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4395 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4396 (_bfd_elf_link_omit_section_dynsym): Formatting.
4398 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4400 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4401 * libbfd.h: Regnerate.
4402 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4403 * elf32-frv.c: Likewise.
4404 * elf32-m32r.c: Likewise.
4405 * elf32-ppc.c: Likewise.
4406 * elf64-hppa.c: Likewise.
4407 * elfxx-ia64.c: Likewise.
4408 * opncls.c: Likewise.
4410 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4412 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4413 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4414 offsets stored in struct eh_cie_fde entries before doing other
4417 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4418 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4419 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4420 setting offsets for removed CIEs. Don't set "sec", instead set
4421 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4422 CIE in hdr_info. Only set make_relative and make_lsda_relative
4423 for CIEs. Use pointers rather than array indices.
4424 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4425 make_lsda_relative, need_* on cie_inf for FDEs.
4426 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4427 section output_offset. Delete cie_offset, instead use cie_inf
4428 pointer to CIE entry. Use need_relative and need_lsda_relative on
4429 CIE entry for FDEs. Use pointers rather than array indices.
4431 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4433 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4434 bfd_is_target_special_symbol.
4435 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4436 * som.c (som_bfd_is_target_special_symbol): Define.
4438 2004-10-08 Nick Clifton <nickc@redhat.com>
4440 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4441 * configure: Regenerate.
4442 * bfd-in2.h: Regenerate.
4443 * syms.c (bfd_is_target_special_symbol): New interface function.
4444 Returns true when a symbol should be considered to be special.
4445 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4446 the symbol jump table.
4447 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4448 Return true iff the symbol is a mapping symbol.
4449 (bfd_elf32_bfd_is_target_special_symbol): Define.
4450 * elfxx-target.h: Provide a default definition for
4451 bfd_is_target_special_symbol.
4452 * aout-target.h: Likewise.
4453 * aout-tic30.c: Likewise.
4454 * binary.c: Likewise.
4455 * coffcode.h: Likewise.
4456 * i386msdos.c: Likewise.
4459 * libaout.h: Likewise.
4460 * libbfd-in.h: Likewise
4461 * libecoff.h: Likewise.
4462 * mach-o.c: Likewise.
4464 * nlm-target.h: Likewise.
4465 * oasys.c: Likewise.
4467 * ppcboot.c: Likewise.
4469 * tekhex.c: Likewise.
4470 * versados.c: Likewise.
4472 * xcoff-target.h: Likewise.
4474 * libbfd.h: Regenerate.
4476 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4478 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4479 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4480 (elf_backend_section_from_shdr): Define.
4482 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4484 * syms.c (bfd_is_local_label): Return false for file symbols.
4486 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4487 David Heine <dlheine@tensilica.com>
4489 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4490 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4491 (elf32xtensa_no_literal_movement): New global variable.
4492 (elf_howto_table): Add entries for new relocations.
4493 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4494 (property_table_compare): When addresses are equal, compare sizes and
4495 various property flags.
4496 (property_table_matches): New.
4497 (xtensa_read_table_entries): Extend to read new property tables. Add
4498 output_addr parameter to indicate that output addresses should be used.
4499 Use bfd_get_section_limit.
4500 (elf_xtensa_find_property_entry): New.
4501 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4502 (elf_xtensa_check_relocs): Handle new relocations.
4503 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4504 relocations. Use new xtensa-isa.h functions.
4505 (build_encoding_error_message): Remove encode_result parameter. Add
4506 new target_address parameter used to detect alignment errors.
4507 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4508 error handling. Use new is_operand_relocation function.
4509 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4510 Use underbar macro for error messages. Formatting.
4511 (get_const16_opcode): New.
4512 (get_l32r_opcode): Add a separate flag for initialization.
4513 (get_relocation_opnd): Operand number is no longer explicit in the
4514 relocation. Change to decode the opcode and analyze its operands.
4515 (get_relocation_slot): New.
4516 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4517 Use new xtensa-isa.h functions to handle multislot instructions.
4518 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4519 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4520 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4521 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4522 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4523 get_single_format, init_op_single_format_table): New.
4524 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4525 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4526 (contract_asm_expansion): Add error_message parameter and pass it to
4527 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4528 with R_XTENSA_SLOT0_OP.
4529 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4530 instructions. Use new xtensa-isa.h functions.
4531 (r_reloc struct): Add new virtual_offset field.
4532 (r_reloc_init): Add contents and content_length parameters. Set
4533 virtual_offset field to zero. Add contents to target_offset field for
4534 partial_inplace relocations.
4535 (r_reloc_is_defined): Check for null.
4536 (print_r_reloc): New debug function.
4537 (source_reloc struct): Replace xtensa_operand field with pair of the
4538 opcode and the operand position. Add is_abs_literal field.
4539 (init_source_reloc): Specify operand by opcode/position pair. Set
4540 is_abs_literal field.
4541 (source_reloc_compare): When target_offsets are equal, compare other
4542 fields to make sorting predictable.
4543 (literal_value struct): Add is_abs_literal field.
4544 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4545 (init_literal_value): New.
4546 (is_same_value): Replace with ...
4547 (literal_value_equal): ... this function. Add comparisons of
4548 virtual_offset and is_abs_literal fields.
4549 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4550 failure. Initialize has_last_loc field.
4551 (value_map_hash_table_delete): New.
4552 (hash_literal_value): Rename to ...
4553 (literal_value_hash): ... this. Include is_abs_literal flag and
4554 virtual_offset field in the hash value.
4555 (get_cached_value): Rename to ...
4556 (value_map_get_cached_value): ... this. Update calls to
4557 literal_value_hash and literal_value_equal.
4558 (add_value_map): Check for allocation failure. Update calls to
4559 value_map_get_cached_value and literal_value_hash.
4560 (text_action, text_action_list, text_action_t): New types.
4561 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4562 text_action_add, text_action_add_literal, offset_with_removed_text,
4563 offset_with_removed_text_before_fill, find_insn_action,
4564 print_action_list, print_removed_literals): New.
4565 (offset_with_removed_literals): Delete.
4566 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4567 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4568 allocated_relocs_count fields.
4569 (init_xtensa_relax_info): Initialize new fields.
4570 (reloc_bfd_fix struct): Add new translated field.
4571 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4573 (fix_compare, cache_fix_array): New.
4574 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4575 section via get_xtensa_relax_info. Use cache_fix_array to set up
4576 sorted fix_array and use bsearch instead of linear search.
4577 (section_cache_t): New struct.
4578 (init_section_cache, section_cache_section, clear_section_cache): New.
4579 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4580 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4581 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4582 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4584 (retrieve_contents): Use bfd_get_section_limit.
4585 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4586 to compute_removed_literals. Free value_map_hash_table when no longer
4588 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4589 compute_text_actions for all sections.
4590 (find_relaxable_sections): Mark sections as relaxable if they contain
4591 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4592 call. Increment relax_info src_count field only for appropriate
4593 relocation types. Remove is_literal_section check.
4594 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4595 r_reloc_init and find_associated_l32r_irel. Check
4596 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4597 literals. Pass is_abs_literal flag to init_source_reloc.
4598 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4599 CONST16 instructions. Adjust calls to r_reloc_init and
4600 pcrel_reloc_fits. Handle weak symbols conservatively.
4601 (find_associated_l32r_irel): Add bfd parameter and pass it to
4603 (compute_text_actions, compute_ebb_proposed_actions,
4604 compute_ebb_actions, check_section_ebb_pcrels_fit,
4605 check_section_ebb_reduces, text_action_add_proposed,
4606 compute_fill_extra_space): New.
4607 (remove_literals): Replace with ...
4608 (compute_removed_literals): ... this function. Call
4609 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4610 Call xtensa_read_table_entries to get the property table. Skip
4611 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4612 is_removable_literal, remove_dead_literal, and
4613 identify_literal_placement functions.
4614 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4615 instead of linear search.
4616 (is_removable_literal, remove_dead_literal,
4617 identify_literal_placement): New.
4618 (relocations_reach): Update check for literal not referenced by any
4619 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4620 (coalesce_shared_literal, move_shared_literal): New.
4621 (relax_section): Use bfd_get_section_limit. Call
4622 translate_section_fixes. Update calls to r_reloc_init and
4623 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4624 Add call to pin_internal_relocs. Add special handling for
4625 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4626 info to calculate new addend_displacement variable. Replace code for
4627 deleting literals with more general code to perform the actions
4628 determined by the action_list for the section.
4629 (translate_section_fixes, translate_reloc_bfd_fix): New.
4630 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4631 find_removed_literal only if is_operand_relocation. Update call to
4632 offset_with_removed_text. Use new target_offset and removed_bytes
4634 (move_literal): New.
4635 (relax_property_section): Use bfd_get_section_limit. Set new
4636 is_full_prop_section flag and handle new property tables. Update calls
4637 to r_reloc_init and offset_with_removed_text. Check
4638 is_relaxable_asm_section flag. Handle expansion of zero-sized
4639 unreachable entries, with use of offset_with_removed_text_before_fill.
4640 For relocatable links, combine entries only for literal tables.
4641 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4642 calls to offset_with_removed_text. Translate st_size field for
4644 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4645 failure. Add contents parameter. Update call to get_bfd_fix. Update
4646 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4647 R_XTENSA_ASM_EXPAND relocs.
4648 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4649 call to get_bfd_fix. Include offset from contents for partial_inplace
4651 (is_reloc_sym_weak): New.
4652 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4653 (prop_sec_len): New.
4654 (xtensa_is_property_section): Handle new property sections.
4655 (is_literal_section): Delete.
4656 (internal_reloc_compare): When r_offset matches, compare r_info and
4657 r_addend to make sorting predictable.
4658 (internal_reloc_matches): New.
4659 (xtensa_get_property_section_name): Handle new property sections.
4660 (xtensa_get_property_predef_flags): New.
4661 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4662 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4663 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4664 (xtisa_errno, xtisa_error_msg): New variables.
4665 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4666 (xtensa_insnbuf_alloc): Add error handling.
4667 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4668 use xtensa_format_decode. Add error handling.
4669 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4670 instruction length to find the number of bytes to copy.
4671 (xtensa_isa_init): Add error handling. Replace calls to
4672 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4673 tables in the xtensa_modules structure.
4674 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4675 xtensa_extend_isa): Delete.
4676 (xtensa_isa_free): Change to only free lookup tables.
4677 (opname_lookup_compare): Replace with ...
4678 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4679 (xtensa_insn_maxlength): Rename to ...
4680 (xtensa_isa_maxlength): ... this.
4681 (xtensa_insn_length): Delete.
4682 (xtensa_insn_length_from_first_byte): Replace with ...
4683 (xtensa_isa_length_from_chars): ... this function.
4684 (xtensa_num_opcodes): Rename to ...
4685 (xtensa_isa_num_opcodes): ... this.
4686 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4687 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4688 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4689 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4690 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4691 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4692 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4693 (xtensa_opcode_lookup): Add error handling.
4694 (xtensa_decode_insn): Replace with ...
4695 (xtensa_opcode_decode): ... this function, with new format and
4696 slot parameters. Add error handling.
4697 (xtensa_encode_insn): Replace with ...
4698 (xtensa_opcode_encode): ... this function, which does the encoding via
4699 one of the entries in the "encode_fns" array. Add error handling.
4700 (xtensa_opcode_name): Add error handling.
4701 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4702 xtensa_opcode_is_call): New.
4703 (xtensa_num_operands): Replace with ...
4704 (xtensa_opcode_num_operands): ... this function. Add error handling.
4705 (xtensa_opcode_num_stateOperands,
4706 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4707 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4708 xtensa_operand_is_visible): New.
4709 (xtensa_get_operand, xtensa_operand_kind): Delete.
4710 (xtensa_operand_inout): Add error handling and special-case for
4712 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4713 operate on one slot of an instruction. Added error handling.
4714 (xtensa_operand_encode): Handle default operands with no encoding
4715 functions. Check for success by comparing against decoded value.
4717 (xtensa_operand_decode): Handle default operands. Return decoded value
4718 through argument pointer. Add error handling.
4719 (xtensa_operand_is_register, xtensa_operand_regfile,
4720 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4721 (xtensa_operand_isPCRelative): Rename to ...
4722 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4723 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4724 through argument pointer. Add error handling.
4725 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4726 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4727 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4728 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4729 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4730 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4731 xtensa_state_is_exported, xtensa_sysreg_lookup,
4732 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4733 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4734 xtensa_interface_num_bits, xtensa_interface_inout,
4735 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4736 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4737 * xtensa-modules.c: Rewrite to use new data structures.
4738 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4739 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4740 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4741 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4742 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4743 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4744 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4745 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4746 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4747 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4748 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4749 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4750 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4751 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4752 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4753 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4754 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4755 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4756 * Makefile.in: Regenerate.
4757 * bfd-in2.h: Likewise.
4758 * libbfd.h: Likewise.
4760 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4762 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4763 against the absolute section.
4764 (mips_elf64_write_rela): Likewise.
4766 2004-10-07 Jan Beulich <jbeulich@novell.com>
4768 * elf.c (elf_find_function): Don't generally check for matching
4769 section, just for non-file symbols. Remove redunant comparison
4771 * elf32-arm.h (arm_elf_find_function): Likewise.
4773 2004-10-07 Jeff Baker <jbaker@qnx.com>
4775 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4776 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4779 2004-10-04 Roland McGrath <roland@redhat.com>
4781 * hash.c (bfd_hash_set_default_size): Use const for table.
4782 Use size_t instead of int for variable compared to sizeof results.
4784 2004-10-05 Alan Modra <amodra@bigpond.net.au>
4787 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4789 2004-10-01 Paul Brook <paul@codesourcery.com>
4791 * elf32-arm.h (elf32_arm_fake_sections,
4792 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4794 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4796 2004-10-01 Alan Modra <amodra@bigpond.net.au>
4798 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4800 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4801 need_relative or need_lsda_relative if we are processing an
4802 offset for a reloc on a FDE initial loc or LSDA field
4804 (_bfd_elf_write_section_eh_frame): Test need_relative and
4805 need_lsda_relative in place of corresponding make_* field
4806 when deciding to use pc-relative encodings.
4808 2004-09-30 Paul Brook <paul@codesourcery.com>
4810 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4811 target2 relocation type.
4813 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4816 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4818 2004-09-30 Paul Brook <paul@codesourcery.com>
4820 * reloc.c: Add BFD_RELOC_ARM_SMI.
4821 * bfd-in2.h: Regenerate.
4824 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4826 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4827 vma and output offset to address.
4828 * simple.c (simple_save_output_info): Only set output section
4829 and offset for debug sections, or those not already set up by
4831 (bfd_simple_get_relocated_section_contents): Update comment.
4833 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4835 * elf.c (IS_LOADED): Delete.
4836 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4837 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4840 2004-09-23 Alan Modra <amodra@bigpond.net.au>
4843 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4844 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4845 redundant assignment of EM_SPARC.
4847 2004-09-22 Brian Ford <ford@vss.fsi.com>
4849 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4850 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4852 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4854 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4856 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4857 (elf_backend_modify_segment_map): Don't define.
4859 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4861 * elf.c (IS_LOADED): Define.
4862 (assign_file_positions_for_segments): Don't round up file offset of
4863 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4864 Delete code handling link script adjustment of lma. Do the adjust
4865 in later code handling similar ajustments. Remove dead code error
4866 check. Warn if section lma would require a negative offset
4867 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4868 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4869 update voff in section loop. Change voff in segment loop to be an
4870 adjustment on top of "off". Set sec->filepos and update "off" later.
4871 Test for loadable sections consistently using IS_LOADED. Similarly,
4872 test for alloc-only sections other than .tbss consistently.
4873 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4874 Tidy PT_NOTE handling. Use %B and %A in error messages.
4875 (assign_file_positions_except_relocs): Use %B in error message.
4877 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4879 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4880 (CONFIG_STATUS_DEPENDENCIES): New.
4881 (Makefile): Removed.
4882 (config.status): Likewise.
4883 * Makefile.in: Regenerated.
4885 2004-09-17 Paul Brook <paul@codesourcery.com>
4887 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4888 (bfd_elf32_arm_process_before_allocation): Update prototype.
4889 * bfd-in2.h: Regenerate.
4890 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4891 (elf32_arm_link_hash_table_create): Set it.
4892 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4893 (bfd_elf32_arm_set_target_relocs): New function.
4894 (arm_real_reloc_type): New function.
4895 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4896 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4897 (elf32_arm_gc_sweep_hook): Ditto.
4898 (elf32_arm_check_relocs): Ditto.
4899 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4900 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4902 (elf32_arm_got_prel): New variable.
4903 (elf32_arm_howto_from_type): New function.
4904 (elf32_arm_info_to_howto): Use it.
4905 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4906 BFD_RELOC_ARM_TARGET2.
4907 * libbfd.h: Regenerate.
4908 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4910 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4912 * ecoff.c: Update u.undef.next refs.
4913 * elf64-ppc.c: Likewise.
4914 * elflink.c: Likewise.
4915 * linker.c: Likewise.
4916 * xcofflink.c: Likewise.
4918 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4919 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4920 fields to indirect struct.
4921 * elf-m10300.c: Update u.weakdef refs.
4922 * elf32-arm.h: Likewise.
4923 * elf32-cris.c: Likewise.
4924 * elf32-frv.c: Likewise.
4925 * elf32-hppa.c: Likewise.
4926 * elf32-i370.c: Likewise.
4927 * elf32-i386.c: Likewise.
4928 * elf32-m32r.c: Likewise.
4929 * elf32-m68k.c: Likewise.
4930 * elf32-ppc.c: Likewise.
4931 * elf32-s390.c: Likewise.
4932 * elf32-sh.c: Likewise.
4933 * elf32-sparc.c: Likewise.
4934 * elf32-vax.c: Likewise.
4935 * elf32-xtensa.c: Likewise.
4936 * elf64-alpha.c: Likewise.
4937 * elf64-hppa.c: Likewise.
4938 * elf64-ppc.c: Likewise.
4939 * elf64-s390.c: Likewise.
4940 * elf64-sh64.c: Likewise.
4941 * elf64-sparc.c: Likewise.
4942 * elf64-x86-64.c: Likewise.
4943 * elfxx-ia64.c: Likewise.
4944 * elfxx-mips.c: Likewise.
4945 * elflink.c: Likewise. Also u.elf_hash_value.
4946 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4948 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4949 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4950 (bfd_elf_gc_record_vtentry): Likewise.
4951 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4953 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4955 * Makefile.am: Run "make dep-am".
4956 * Makefile.in: Regenerate.
4957 * bfd-in2.h: Regenerate.
4958 * po/SRC-POTFILES.in: Regenerate.
4959 * po/bfd.pot: Regenerate.
4961 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4963 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4964 with bitfields. Make "type" and "other" bitfields too.
4965 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4966 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4967 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4968 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4969 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4970 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4971 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4972 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4973 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4974 * elf-m10300.c: Likewise.
4976 * elf32-arm.h: Likewise.
4977 * elf32-cris.c: Likewise.
4978 * elf32-frv.c: Likewise.
4979 * elf32-hppa.c: Likewise.
4980 * elf32-i370.c: Likewise.
4981 * elf32-i386.c: Likewise.
4982 * elf32-m32r.c: Likewise.
4983 * elf32-m68k.c: Likewise.
4984 * elf32-ppc.c: Likewise.
4985 * elf32-s390.c: Likewise.
4986 * elf32-sh-symbian.c: Likewise.
4987 * elf32-sh.c: Likewise.
4988 * elf32-sh64.c: Likewise.
4989 * elf32-sparc.c: Likewise.
4990 * elf32-vax.c: Likewise.
4991 * elf32-xtensa.c: Likewise.
4992 * elf64-alpha.c: Likewise.
4993 * elf64-hppa.c: Likewise.
4994 * elf64-ppc.c: Likewise.
4995 * elf64-s390.c: Likewise.
4996 * elf64-sh64.c: Likewise.
4997 * elf64-sparc.c: Likewise.
4998 * elf64-x86-64.c: Likewise.
4999 * elflink.c: Likewise.
5000 * elfxx-ia64.c: Likewise.
5001 * elfxx-mips.c: Likewise.
5002 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5003 * configure: Regenerate.
5004 * aclocal.m4: Regenerate.
5006 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5008 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5009 around uses of R_ARM_TARGET1.
5010 (elf32_arm_check_relocs): Likewise.
5012 2004-09-13 Paul Brook <paul@codesourcery.com>
5014 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5016 * bfd-in2.h: Regenerate.
5017 * libbfd.h: Regenerate.
5018 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5019 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5020 (bfd_elf32_arm_process_before_allocation): Ditto.
5021 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5022 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5023 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5026 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5028 * hpux-core.c (thread_section_p): New function.
5029 (hpux_core_core_file_p): Fix computation of offset in call
5030 to bfd_seek. Create a ".reg" section from an arbitrary
5031 ".reg/<id>" section if none was created after having read
5034 2004-09-11 Andreas Schwab <schwab@suse.de>
5036 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5037 * aclocal.m4: Rebuild.
5038 * configure: Rebuild.
5040 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5042 * section.c (bfd_sections_find_if): Fix parameter name in
5043 comment to match code.
5045 2004-09-10 Alan Modra <amodra@bigpond.net.au>
5047 * elf.c (assign_file_positions_except_relocs): Assign relocs
5048 stored in a bfd section.
5050 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
5052 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5053 h->gotplt_refcount to 0, not -1.
5055 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
5057 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5058 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5060 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5061 handle symbol visibility here.
5063 2004-09-07 Alan Modra <amodra@bigpond.net.au>
5065 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5066 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5068 (ppc_stub_name): Remove trailing "+0" on stub name.
5069 (create_linkage_sections): Create relocations for
5070 branch lookup table when --emit-relocs as well as when --shared.
5071 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5072 relbrlt test. For --emit-stub-syms, always output a sym even when
5073 one already exists on a plt call stub. Put stub type in the stub
5075 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5077 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5078 reloc_count in stub sections. Adjust relbrlt test.
5079 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5080 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5081 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5082 for relocs against discarded symbols. Fix comments.
5084 2004-09-06 Mark Mitchell <mark@codesourcery.com>
5086 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5087 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5089 (map_sections_to_segments): ... here. Use it. Assign a file
5090 position to the .dynamic section if it is not loadable, but part
5091 of the PT_DYNAMIC segment.
5092 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5093 offsets, not VMAs, for the BPABI. Do not fill in the header in
5094 the .got.plt section for the BPABI.
5095 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5097 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5099 2004-09-06 Nick Clifton <nickc@redhat.com>
5101 * elflink.c (elf_link_add_object_symbols): Set the error code to
5102 bfd_error_wrong_format when the input format does not match the
5105 2004-09-06 Alan Modra <amodra@bigpond.net.au>
5107 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5108 (ppc64_elf_check_directives): ..here.
5109 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5110 before accessing ppc64_elf_tdata.
5111 (ppc64_elf_finish_dynamic_sections): And here too.
5113 2004-09-04 Alan Modra <amodra@bigpond.net.au>
5115 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5117 2004-09-03 Mark Mitchell <mark@codesourcery.com>
5119 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5120 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5121 (bfd_elf32_littlearm_symbian_vec): Likewise.
5122 * configure: Regenerated.
5123 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5124 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5125 (PLT_ENTRY_SIZE): Likewise.
5126 (bfd_vma_elf32_arm_symbian_plt_entry): New
5128 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5130 (create_got_section): Don't create sections when generating BPABI
5132 (elf32_arm_create_dynamic_sections): Tidy.
5133 (elf32_arm_link_hash_table_create): Set plt_header_size,
5134 plt_entry_size, and symbian_p.
5135 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5136 generating BPABI objects.
5137 (allocate_dynrelocs): Use htab->plt_header_size, not
5138 PLT_HEADER_SIZE. Do not add to .got.plt when
5139 generating BPABI objects.
5140 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5141 * elfarm-nabi.c: Add SymbianOS target vectors.
5142 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5143 (_bfd_elf_link_create_dynamic_sections): Likewise.
5144 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5145 (elfNN_bed): Use it.
5146 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5147 (bfd_elf32_littlearm_symbian_vec): Likewise.
5148 (_bfd_target_vector): Add them.
5150 2004-09-03 Nick Clifton <nickc@redhat.com>
5153 * coffcode.h (handle_COMDAT): Replace abort with an warning
5154 message and allow the scan to continue.
5156 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5158 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5159 in when reading relocs, not our sorted syms. Remove unnecessary
5162 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5164 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5166 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5168 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5169 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5170 replace uses of *_alias with *_noncanonical.
5171 * aclocal.m4: Rebuild with aclocal 1.4p6.
5172 * Makefile.in: Rebuild with automake 1.4p6.
5173 * doc/Makefile.in: Rebuild with automake 1.4p6.
5174 * configure.in: Autoupdate with autoupdate 2.59.
5175 * config.in: Regenerate with autoheader 2.59.
5176 * configure: Regnerate with autoconf 2.59.
5178 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5180 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5181 symbol pointer arrays before modifying.
5183 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5185 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5186 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5187 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5188 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5189 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5190 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5191 Use both symbol tables on non-relocatable objects. Use a common
5192 error exit. Fix "mid" warning.
5193 * libbfd.h: Regenerate.
5194 * bfd-in2.h: Regenerate.
5196 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5198 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5200 (struct sfpr_def_parms): Save some space.
5201 (sfpr_define): Here too.
5203 * elf64-ppc.c (compare_symbols): Put section syms first.
5204 (sym_exists_at): New function.
5205 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5206 points only for relocatable files. Use .opd section contents
5207 otherwise. Generally clean up the code.
5209 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5211 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5212 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5213 (struct sfpr_def_parms): New.
5214 (sfpr_define): New function.
5215 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5216 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5217 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5218 (savefpr1_tail, restfpr1_tail): New functions.
5219 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5220 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5221 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5222 code. Define all ABI mandated _save and _rest functions.
5224 2004-08-26 Paul Brook <paul@codesourcery.com>
5226 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5228 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5230 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5233 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5235 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5236 that pcrel correction is applied for R_386_PC32.
5238 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5240 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5241 for R_386_32 and R_386_PC32 relocs against symbols defined in
5244 2004-08-25 Dmitry Diky <diwil@spec.ru>
5246 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5247 Add new relocations.
5248 * bfd-in2.h: Regenerate.
5249 * libbfd.h: Regenerate.
5250 * elf32-msp430.c: Clean-up code.
5251 (elf_msp430_howto_table): Add new relocation entries.
5252 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5253 (msp430_elf_relax_section): New function.
5254 (msp430_elf_relax_delete_bytes): New function.
5255 (msp430_elf_symbol_address_p): New function.
5257 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5259 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5260 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5262 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5264 * elflink.c (_bfd_elf_section_already_linked): Handle
5265 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5267 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5269 * config.bfd (arm*-*-symbianelf*): New target.
5270 (arm*-*-eabi*): Likewise.
5272 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5274 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5275 "struct ppc_link_hash_entry *".
5276 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5277 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5279 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5281 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5282 entries (where fd_aux overlaps next entry's fd_func).
5283 Add non_overlapping argument, use it.
5284 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5285 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5286 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5287 as indexes into opd_sym_map/opd_adjust array.
5288 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5290 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5292 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5293 if we can look up their function descriptor in a regular file.
5295 2004-08-18 Nick Clifton <nickc@redhat.com>
5298 * cofflink.c (coff_link_add_symbols): Check that the comdat
5299 pointer in the coff_section_data structure has been initialised
5302 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5305 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5306 changing bfd_link_hash_undefined to bfd_link_hash_new.
5308 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5310 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5312 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5313 (synthetic_opd, synthetic_relocatable): New variables.
5314 (compare_symbols, compare_relocs): New helper routines.
5315 (ppc64_elf_get_synthetic_symtab): New function.
5316 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5318 * bfd-in2.h: Regenerated.
5319 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5320 to relsyms. Return 0 if abfd is relocatable.
5322 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5324 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5326 2004-08-17 Nick Clifton <nickc@redhat.com>
5328 * (is_arm_mapping_symbol_name): New function - return true
5329 when a symbol name matches the requirements for an ARM mapping
5331 (arm_elf_find_function): New function based on
5332 elf_find_function in elf.c but skipping ARM mapping symbols
5333 and including thumb function symbols.
5334 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5335 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5337 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5339 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5340 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5341 (ppc64_elf_brtaken_reloc): Here too.
5343 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5345 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5347 (ppc64_elf_check_directives): Check that we have the right hash
5348 table before proceeding.
5350 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5352 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5353 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5354 the sections that will be discarded.
5356 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5358 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5360 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5362 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5363 free space available.
5365 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5367 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5368 occurrences with bfd_byte * thoughout file.
5370 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5371 (xcoff_write_armap_big): Likewise.
5372 (xcoff_write_archive_contents_old): Likewise.
5373 (xcoff_write_archive_contents_big): Likewise.
5375 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5377 2004-08-13 Nick Clifton <nickc@redhat.com>
5379 * elf32-arm.h: Convert to ISO C90.
5381 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5384 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5387 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5389 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5390 (bfd_archive_filename, bfd_get_section_ident): Delete.
5391 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5392 bfd_archive_filename.
5393 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5394 to warn about symbols in discarded sections. Use _bfd_error_handler.
5395 * aout-adobe.c (aout_adobe_callback): See below.
5396 * aout-cris.c (swap_ext_reloc_in): ..
5397 * coff-arm.c (find_thumb_glue, find_arm_glue,
5398 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5399 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5400 coff_arm_copy_private_bfd_data): ..
5401 * coff-i860.c (i860_reloc_processing): ..
5402 * coff-mcore.c (mcore_coff_unsupported_reloc,
5403 coff_mcore_relocate_section): ..
5404 * coff-ppc.c (coff_ppc_relocate_section): ..
5405 * coff-rs6000.c (xcoff_create_csect_from_smclas
5406 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5407 sh_swap_insns, sh_relocate_section): ..
5408 * coff-tic54x.c (tic54x_reloc_processing): ..
5409 * coff-tic80.c (coff_tic80_relocate_section): ..
5410 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5411 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5412 coff_slurp_symbol_table, coff_classify_symbol,
5413 coff_slurp_reloc_table): ..
5414 * coffgen.c (_bfd_coff_read_string_table): ..
5415 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5416 _bfd_coff_generic_relocate_section): ..
5417 * cpu-arm.c (bfd_arm_merge_machines): ..
5418 * cpu-sh.c (sh_merge_bfd_arch): ..
5419 * elf-hppa.h (elf_hppa_relocate_section): ..
5420 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5421 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5422 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5423 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5424 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5425 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5426 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5427 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5428 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5429 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5430 cris_elf_merge_private_bfd_data
5431 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5432 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5433 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5434 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5435 elf32_hppa_relocate_section): ..
5436 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5437 i370_elf_check_relocs, i370_elf_relocate_section): ..
5438 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5439 elf_i386_relocate_section): ..
5440 * elf32-m32r.c (m32r_elf_relocate_section,
5441 m32r_elf_merge_private_bfd_data): ..
5442 * elf32-m68hc1x.c (m68hc12_add_stub,
5443 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5444 * elf32-m68k.c (elf_m68k_relocate_section): ..
5445 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5446 mcore_elf_relocate_section): ..
5447 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5448 ppc_elf_check_relocs, ppc_elf_relocate_section,
5449 ppc_elf_begin_write_processing): ..
5450 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5451 elf_s390_relocate_section): ..
5452 * elf32-sh-symbian.c (sh_symbian_import_as,
5453 sh_symbian_process_embedded_commands,
5454 sh_symbian_relocate_section): ..
5455 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5456 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5457 sh_elf_merge_private_data): ..
5458 * elf32-sparc.c (elf32_sparc_check_relocs,
5459 elf32_sparc_relocate_section,
5460 elf32_sparc_merge_private_bfd_data): ..
5461 * elf32-v850.c (v850_elf_check_relocs,
5462 v850_elf_merge_private_bfd_data): ..
5463 * elf32-xtensa.c (elf_xtensa_check_relocs,
5464 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5465 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5466 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5467 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5468 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5469 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5470 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5471 ppc64_elf_relocate_section): ..
5472 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5473 elf_s390_relocate_section): ..
5474 * elf64-sh64.c (sh_elf64_relocate_section): ..
5475 * elf64-sparc.c (sparc64_elf_check_relocs,
5476 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5477 sparc64_elf_merge_private_bfd_data): ..
5478 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5479 elf64_x86_64_relocate_section): ..
5480 * elflink.c (_bfd_elf_add_default_symbol,
5481 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5482 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5483 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5484 elf_get_linked_section_vma, elf_fixup_link_order,
5485 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5486 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5487 * elfxx-ia64.c (elfNN_ia64_relax_section,
5488 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5489 * elfxx-mips.c (mips_elf_perform_relocation,
5490 _bfd_mips_elf_check_relocs,
5491 _bfd_mips_elf_merge_private_bfd_data): ..
5492 * ieee.c (ieee_slurp_external_symbols): ..
5493 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5494 * libbfd.c (_bfd_generic_verify_endian_match): ..
5495 * linker.c (_bfd_generic_link_add_one_symbol,
5496 _bfd_generic_section_already_linked): ..
5497 * pdp11.c (translate_to_native_sym_flags): ..
5498 * pe-mips.c (coff_pe_mips_relocate_section): ..
5499 * peicode.h (pe_ILF_build_a_bfd): ..
5500 * srec.c (srec_bad_byte): ..
5501 * stabs.c (_bfd_link_section_stabs): ..
5502 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5503 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5504 with corresponding %B and %A in _bfd_error_handler format string.
5505 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5506 calls to use %A and %B. Fix "against symbol .. from section" and
5507 similar error messages. Combine multiple _bfd_error_handler calls
5508 where they were separated due to bfd_archive_filename deficiencies.
5509 * bfd-in2.h: Regenerate.
5511 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5513 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5516 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5518 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5519 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5520 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5522 (link_hash_newfunc): Init was_undefined.
5523 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5524 Use undefweak instead.
5525 (ppc64_elf_check_directives): Fix undefs chain.
5526 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5528 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5529 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5530 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5532 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5534 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5535 error, test input_section flags rather than sec.
5537 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5539 * elf-bfd.h (struct elf_backend_data): Add
5540 elf_backend_archive_symbol_lookup.
5541 (_bfd_elf_archive_symbol_lookup): Declare.
5542 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5543 (elf_link_add_archive_symbols): ..extracted from here. Call the
5545 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5546 (elfNN_bed): Init new field.
5547 * elf64-ppc.c (elf_backend_check_directives): Define.
5548 (elf_backend_archive_symbol_lookup): Define.
5549 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5550 a ppc_link_hash_entry pointer.
5552 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5553 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5554 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5555 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5556 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5557 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5558 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5561 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5563 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5564 (ppc64_elf_add_symbol_hook): Test for NULL section.
5565 (get_sym_h): Formatting.
5566 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5569 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5570 long branch stubs with code handling plt and r2off branch stubs.
5572 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5574 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5575 * elflink.c (elf_link_input_bfd): Formatting.
5576 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5578 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5579 (link_hash_newfunc): Don't set it.
5580 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5581 (ppc64_elf_mark_entry_syms): Delete.
5582 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5583 sections. Use get_opd_info.
5584 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5586 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5588 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5590 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5591 (func_desc_adjust): Don't set have_undefweak.
5592 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5593 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5595 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5596 "struct ppc_link_hash_entry *". Adjust all references.
5597 (ppc64_elf_hide_symbol): Correct a comment.
5599 * elf64-ppc.c (get_opd_info): New function.
5600 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5601 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5602 before calling get_fdh. Test fdh rather than h before dereferencing
5603 fdh. Mark removed symbols in opd_adjust.
5604 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5605 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5607 (ppc64_elf_output_symbol_hook): Likewise.
5609 2004-08-06 Paul Brook <paul@codesourcery.com>
5611 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5612 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5613 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5614 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5615 and BFD_RELOC_ARM_SBREL32.
5616 * bfd-in2.h, bbfd.h: Regenerate.
5618 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5620 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5621 the dynamic link symbol actually in use.
5623 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5625 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5627 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5628 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5630 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5631 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5633 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5634 Nick Clifton <nickc@redhat.com>
5637 * bfd.c (_bfd_default_error_handler): Make it global.
5639 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5641 * elf.c (assign_section_numbers): Cope gracefully with sections
5642 which have SHF_LINK_ORDER set but no sh_link set up.
5643 * elflink.c (elf_get_linked_section_vma): Likewise.
5645 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5648 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5649 Set it to _bfd_default_error_handler.
5650 (elfNN_bed): Add elf_backend_link_order_error_handler.
5652 * libbfd-in.h (_bfd_default_error_handler): New.
5654 * libbfd.h: Regenerated.
5656 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5658 * archures.c (bfd_mach_sparc_64bit_p): Define.
5659 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5660 * bfd-in2.h: Rebuilt.
5662 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5664 Introduce SH2a support.
5665 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5666 * archures.c (bfd_mach_sh2a_nofpu): New.
5667 * bfd-in2.h: Rebuilt.
5668 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5669 (arch_info_struct): Add sh2a_nofpu.
5670 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5671 2003-12-29 DJ Delorie <dj@redhat.com>
5672 * reloc.c: Add relocs for sh2a.
5673 * bfd-in2.h: Regenerate.
5674 * libbfd.hh: Regenerate.
5675 2003-12-01 Michael Snyder <msnyder@redhat.com>
5676 * archures.c (bfd_mach_sh2a): New.
5677 * bfd-in2.h: Rebuilt.
5678 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5680 (arch_info_struct): Add sh2a.
5681 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5683 2004-07-28 Nick Clifton <nickc@redhat.com>
5684 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5687 * som.c (setup_sections): Improve estimation of space sizes in
5688 relocatable objects.
5690 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5691 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5692 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5694 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5695 * configure: Regenerate.
5696 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5697 case that accepts OSABI=NetBSD and OSABI=SysV.
5698 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5699 the base of .got or .data (if .got does not exist).
5700 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5702 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5703 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5704 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5705 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5707 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5710 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5711 (elf_sec_group): Defined.
5712 (bfd_elf_match_symbols_in_sections): New prototype.
5713 (_bfd_elf_setup_group_pointers): Likewise.
5715 * elf.c (bfd_elf_discard_group): Abort.
5716 (bfd_elf_set_group_contents): Also include relocation sections.
5717 Remove zero-fill for ld -r.
5718 (_bfd_elf_setup_group_pointers): New function.
5719 (elf_sort_elf_symbol): Likewise.
5720 (elf_sym_name_compare): Likewise.
5721 (bfd_elf_match_symbols_in_sections): Likewise.
5723 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5725 * elflink.c (match_group_member): New.
5726 (elf_link_input_bfd): Check group member for discarded section.
5727 (try_match_symbols_in_sections): New function.
5728 (already_linked): Likewise.
5729 (_bfd_elf_section_already_linked): Support mixing comdat group
5730 and linkonce section.
5732 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5733 * linker.c (bfd_section_already_linked_table_traverse): New.
5735 * libbfd.h: Regenerated.
5737 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5739 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5740 BFD_RELOC_CRX_SWITCH32.
5741 * bfd-in2.h: Regenerate.
5742 * libbfd.h: Regenerate.
5743 * elf32-crx.c: Support relocation/relaxation of
5744 BFD_RELOC_CRX_SWITCH* types.
5746 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5748 * elf64-ppc.c: Correct "Linker stubs" comment.
5750 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5752 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5754 (elf_linked_to_section): New.
5756 * elf.c (assign_section_numbers): Set up sh_link for
5759 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5760 to sh_link for SHT_IA_64_UNWIND sections.
5762 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5764 * elflink.c (elf_fixup_link_order): Add _() to error message.
5766 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5768 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5771 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5773 * aout-adobe.c (aout_32_section_already_linked): Defined.
5774 * aout-target.h (MY_section_already_linked): Likewise.
5775 * aout-tic30.c (MY_section_already_linked): Likewise.
5776 * binary.c (binary_section_already_linked): Likewise.
5777 * bout.c (b_out_section_already_linked): Likewise.
5778 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5779 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5780 * coffcode.h (coff_section_already_linked): Likewise.
5781 * i386msdos.c (msdos_section_already_linked): Likewise.
5782 * i386os9k.c (os9k_section_already_linked): Likewise.
5783 * ieee.c (ieee_section_already_linked): Likewise.
5784 * ihex.c (ihex_section_already_linked): Likewise.
5785 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5786 * mmo.c (mmo_section_already_linked): Likewise.
5787 * nlm-target.h (nlm_section_already_linked): Likewise.
5788 * oasys.c (oasys_section_already_linked): Likewise.
5789 * pef.c (bfd_pef_section_already_linked): Likewise.
5790 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5791 * som.c (som_bfd_discard_group): Likewise.
5792 * srec.c (srec_section_already_linked): Likewise.
5793 * tekhex.c (tekhex_section_already_linked): Likewise.
5794 * versados.c (versados_section_already_linked): Likewise.
5795 * vms.c (vms_section_already_linked): Likewise.
5796 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5797 * xsym.c (bfd_sym_section_already_linked): Likewise.
5799 * bfd-in.h (bfd_section_already_linked_table_init): New.
5800 (bfd_section_already_linked_table_free): Likewise.
5802 * coff-rs6000.c (rs6000coff_vec): Add
5803 _bfd_generic_section_already_linked.
5804 (pmac_xcoff_vec): Likewise.
5805 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5806 (aix5coff64_vec): Likewise.
5808 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5809 * elflink.c (_bfd_elf_section_already_linked): New function.
5811 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5813 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5814 (_bfd_generic_section_already_linked): New.
5815 (bfd_section_already_linked_hash_entry): Likewise.
5816 (bfd_section_already_linked): Likewise.
5817 (bfd_section_already_linked_table_lookup): Likewise.
5818 (bfd_section_already_linked_table_insert): Likewise.
5820 * linker.c (bfd_section_already_linked): New.
5821 (_bfd_section_already_linked_table): Likewise.
5822 (bfd_section_already_linked_table_lookup): Likewise.
5823 (bfd_section_already_linked_table_insert): Likewise.
5824 (already_linked_newfunc): Likewise.
5825 (bfd_section_already_linked_table_init): Likewise.
5826 (bfd_section_already_linked_table_free): Likewise.
5827 (_bfd_generic_section_already_linked): Likewise.
5829 * section.c (bfd_section): Remove comdat.
5830 (bfd_comdat_info): Moved to ...
5831 * bfd-in.h (coff_comdat_info): Here.
5832 (bfd_coff_get_comdat_section): New.
5833 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5834 * libcoff-in.h (coff_section_tdata): Add comdat.
5835 * coffcode.h (handle_COMDAT): Updated.
5836 * cofflink.c (coff_link_add_symbols): Likewise.
5837 * ecoff.c (bfd_debug_section): Likewise.
5839 * targets.c (bfd_target): Add _section_already_linked.
5840 (BFD_JUMP_TABLE_LINK): Updated.
5842 * bfd-in2.h: Regenerated.
5843 * libbfd.h: Likewise.
5844 * libcoff.h: Likewise.
5846 2003-07-21 Paul Brook <paul@codesourcery.com>
5848 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5849 elf_fixup_link_order): New functions.
5850 (bfd_elf_final_link): Call elf_fixup_link_order.
5852 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
5854 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5855 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5857 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5858 _bfd_elf_symbol_refs_local_p.
5859 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5862 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5864 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5866 (bfd_elf_get_dyn_lib_class): New prototype.
5867 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5869 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5870 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5871 entry is needed. Issue an error if a DT_NEEDED entry is needed
5872 for a file marked DYN_NO_NEEDED.
5873 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5876 * bfd-in2.h: Regenerated.
5878 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5880 * elflink.c (elf_section_complain_discarded): Don't complain in
5883 2004-07-10 James E Wilson <wilson@specifixinc.com>
5885 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5886 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5887 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5888 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5890 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5891 bfd_put_64 to bfd_putl64.
5892 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5894 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5897 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5898 .init/.fini sections when trying to relax it.
5900 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5902 * elf.c (assign_file_positions_for_segments): Make sure the
5903 .dynamic section is the first section in the PT_DYNAMIC segment.
5905 2004-07-09 Nick Clifton <nickc@redhat.com>
5907 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5908 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5909 sh_elf_get_flags_from_mach functions so that they do not conflict
5910 when this target is built with other sh-elf targets.
5911 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5912 suppression of this function.
5913 (sh_elf_find_flags): Likewise.
5915 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5917 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5918 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5919 (BFD32_BACKENDS): Add elf32-crx.lo.
5920 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5921 (cpu-crx.lo): New target.
5922 (elf32-crx.lo): New target.
5923 * Makefile.in: Regenerate.
5924 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5925 (bfd_archures_list): Add bfd_crx_arch.
5926 * bfd-in2.h: Regenerate.
5927 * config.bfd: Handle crx-*-elf*, crx*.
5928 * configure.in: Handle bfd_elf32_crx_vec.
5929 * configure: Regenerate.
5930 * cpu-crx.c: New file.
5931 * elf32-crx.c: Likewise.
5932 * libbfd.h: Regenerate.
5933 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5934 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5935 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5936 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5937 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5938 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5939 * targets.c (bfd_elf32_crx_vec): Declare.
5940 (bfd_target_vector): Add bfd_elf32_crx_vec.
5942 2004-07-06 Nick Clifton <nickc@redhat.com>
5944 * config.bfd: Add sh-symbian-elf target.
5945 * configure.in: Add bfd_elf32_shl_symbian_vec.
5946 * configure: Regenerate.
5947 * elf-bfd.h (struct elf_backend_data): Add new field
5949 * elflink.c (elf_link_add_object_symbols): Invoke the
5950 check_directives function, if defined.
5951 * elfxx-target.h: Provide a default, NULL definition for
5953 * targets.c: Add bfd_elf32_shl_symbian_vec.
5954 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5956 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5957 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5958 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5959 not already been defined.
5960 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5961 * sh-symbian.c: New file. Provide functions to support the
5962 * sh-symbian-elf target.
5963 * Makefile.am: Add elf32-sh-symbian.c
5964 * Makefile.in: Regenerate.
5966 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5968 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5969 * Makefile.am: Ran make dep-am.
5970 * Makefile.in: Ran make dep-in.
5972 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5974 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5977 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5979 * config.bfd: Add want64 to configuration target s390-*-linux*.
5981 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5983 * bfd.c (bfd_get_section_ident): New.
5985 * elflink.c (elf_link_read_relocs_from_section): Call
5986 bfd_get_section_ident to identify the section when reporting
5988 (_bfd_elf_link_output_relocs): Likewise.
5989 (elf_link_output_extsym): Likewise.
5990 (elf_link_input_bfd): Likewise.
5991 (bfd_elf_gc_record_vtinherit): Likewise.
5993 * bfd-in2.h: Regenerated.
5995 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5996 Nick Clifton <nickc@redhat.com>
5999 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6000 of section symbols to mips_elf_sort_hash_table ().
6002 2004-07-01 Alan Modra <amodra@bigpond.net.au>
6004 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6006 (elf_section_complain_discarded): New function. Handle
6007 .gcc_except_table too.
6008 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6009 in discarded sections.
6010 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6012 2004-06-30 James E Wilson <wilson@specifixinc.com>
6014 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6015 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6017 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6020 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6021 local references to discarded sections and report their
6024 2004-06-30 Alan Modra <amodra@bigpond.net.au>
6026 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6027 sec_info_type, test section name instead.
6029 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6032 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6033 in .init/.fini sections.
6035 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6037 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6038 bfd_get_section_limit.
6040 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6042 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6043 output section size.
6045 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6047 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6049 (mmix_elf_perform_relocation): Adjust for above change.
6050 (mmix_elf_relocate_section): Likewise.
6051 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6052 (mmix_elf_get_section_contents): Delete.
6053 (bfd_elf64_get_section_contents): Delete.
6054 (mmix_elf_relocate_section): Zero stub area.
6055 * linker.c (default_indirect_link_order): Alloc max of section size
6057 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6058 * section.c (bfd_malloc_and_get_section): Likewise.
6059 (struct bfd_section): Update rawsize comment.
6060 * bfd-in2.h: Regenerate.
6062 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6064 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6066 * bfd-in.h (bfd_get_section_limit): Define.
6067 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6068 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6069 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6070 * coff-arm.c (coff_arm_relocate_section): Likewise.
6071 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6072 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6073 (bfd_ns32k_final_link_relocate): Likewise.
6074 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6075 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6076 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6077 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6078 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6079 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6080 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6081 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6082 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6083 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6084 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6085 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6086 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6087 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6088 * elf32-v850.c (v850_elf_reloc): Likewise.
6089 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6090 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6091 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6092 * elf64-mips.c (mips_elf64_gprel32_reloc)
6093 (mips16_gprel_reloc): Likewise.
6094 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6095 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6096 * elf64-sparc.c (init_insn_reloc): Likewise.
6097 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6098 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6099 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6100 (_bfd_mips_elf_generic_reloc): Likewise.
6101 * bfd-in2.h: Regenerate.
6103 2004-06-28 Alan Modra <amodra@bigpond.net.au>
6105 * bfd-in.h (struct stab_info): Move from stabs.c.
6106 * stabs.c (struct stab_link_includes_table): Delete.
6107 (stab_link_includes_lookup): Delete.
6108 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6109 level of indirection from sinfo parm.
6110 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6111 stabstr section. Adjust hash table accesses.
6112 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6113 alloc. Adjust stab_info test.
6114 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6115 (_bfd_coff_final_link): Adjust stab_info test.
6116 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6117 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6119 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6120 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6121 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6122 stabstr section. Adjust stab_info test.
6123 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6124 (_bfd_write_stab_strings): Adjust prototypes.
6125 * libbfd.h: Regenerate.
6126 * libcoff.h: Regenerate.
6127 * bfd-in2.h: Regenerate.
6129 2004-06-27 Mark Kettenis <kettenis@gnu.org>
6131 From Miod Vallat <miod@online.fr>:
6132 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6134 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
6136 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6137 (struct elf32_mn10300_link_hash_entry): Remove
6138 pcrel_relocs_copied.
6139 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6140 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6141 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6142 and gotoff relocations if the symbol doesn't bind locally. Use
6143 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6144 relocation for PCREL32.
6145 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6146 to test whether a symbol binds locally.
6147 (elf32_mn10300_link_hash_newfunc): Don't initialize
6148 pcrel_relocs_copied.
6149 (_bfd_mn10300_elf_discard_copies): Delete.
6150 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6152 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6154 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6156 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6158 * som.c (som_set_reloc_info): Correct small typo.
6160 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6162 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6163 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6164 (m32r_elf_gcsweep_hook): Likewise.
6165 (m32r_elf_check_relocs): Likewise.
6166 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6167 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6168 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6169 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6170 * bfd-in2.h: Regenerated.
6171 * libbfd.h: Regenerated.
6173 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6175 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6177 (elf64_x86_64_relocate_section): Issue an error for
6178 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6179 against global symbols when building shared library.
6181 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6183 * section.c (struct sec): Rename "_cooked_size" to "size".
6184 Rename "_raw_size" to "rawsize".
6185 (STD_SECTION): Adjust comments.
6186 (bfd_set_section_size, bfd_get_section_contents): Use size.
6187 (bfd_malloc_and_get_section): New function.
6188 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6189 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6190 Correctly free reloc and contents memory.
6191 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6192 and fake CIE now that we can shink section size to zero.
6193 (_bfd_elf_write_section_eh_frame): Likewise..
6194 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6195 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6196 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6197 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6198 unneeded indirection.
6199 * elf.c (_bfd_elf_section_offset): .. and update call.
6200 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6201 * libbfd.h: Regenerate.
6202 * bfd-in2.h: Regenerate.
6204 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6205 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6206 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6207 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6208 Similarly use "rawsize", if non-zero, in reloc functions to validate
6209 reloc addresses. Use new bfd_malloc_and_get_section in most places
6210 where bfd_get_section_contents was called. Expand all occurrences of
6211 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6212 grok_prstatus and similar functions to "size".
6213 * aix386-core.c (aix386_core_file_p): ..
6214 * aix5ppc-core.c (xcoff64_core_p): ..
6215 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6216 aout_adobe_set_section_contents): ..
6217 * aout-target.h (callback): ..
6218 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6219 MY_bfd_final_link): ..
6220 * aoutf1.h (sunos4_core_file_p): ..
6221 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6222 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6223 final_link, aout_link_input_section): ..
6224 * binary.c (binary_object_p, binary_canonicalize_symtab,
6225 binary_set_section_contents): ..
6226 * bout.c (b_out_callback, b_out_write_object_contents,
6227 b_out_set_section_contents, b_out_bfd_relax_section,
6228 b_out_bfd_get_relocated_section_contents): ..
6229 * cisco-core.c (cisco_core_file_validate): ..
6230 * coff-alpha.c (alpha_ecoff_object_p,
6231 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6232 * coff-arm.c (coff_arm_relocate_section,
6233 bfd_arm_allocate_interworking_sections): ..
6234 * coff-h8300.c (h8300_reloc16_extra_cases,
6235 h8300_bfd_link_add_symbols): ..
6236 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6237 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6238 ppc_bfd_coff_final_link): ..
6239 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6240 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6241 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6242 * coff64-rs6000.c (xcoff64_write_object_contents,
6243 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6244 * coffcode.h (coff_compute_section_file_positions,
6245 coff_write_object_contents): ..
6246 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6247 coff_section_symbol, build_debug_section): ..
6248 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6249 process_embedded_commands, _bfd_coff_link_input_bfd,
6250 _bfd_coff_write_global_sym): ..
6251 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6252 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6253 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6254 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6255 _bfd_dwarf2_find_nearest_line): ..
6256 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6257 ecoff_compute_section_file_positions,
6258 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6259 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6260 _bfd_elf_discard_section_eh_frame_hdr,
6261 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6262 _bfd_elf_write_section_eh_frame,
6263 _bfd_elf_write_section_eh_frame_hdr): ..
6264 * elf-hppa.h (elf_hppa_sort_unwind): ..
6265 * elf-m10200.c (mn10200_elf_relax_section,
6266 mn10200_elf_relax_delete_bytes,
6267 mn10200_elf_get_relocated_section_contents): ..
6268 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6269 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6270 mn10300_elf_relax_delete_bytes,
6271 mn10300_elf_get_relocated_section_contents,
6272 _bfd_mn10300_elf_adjust_dynamic_symbol,
6273 _bfd_mn10300_elf_discard_copies,
6274 _bfd_mn10300_elf_size_dynamic_sections,
6275 _bfd_mn10300_elf_finish_dynamic_sections): ..
6276 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6277 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6278 bfd_elf_set_group_contents, map_sections_to_segments,
6279 elf_sort_sections, assign_file_positions_for_segments,
6280 SECTION_SIZE, copy_private_bfd_data,
6281 _bfd_elf_get_dynamic_reloc_upper_bound,
6282 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6283 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6284 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6285 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6286 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6287 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6288 bfd_elf32_arm_process_before_allocation,
6289 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6290 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6291 elf32_arm_write_section): ..
6292 * elf32-cris.c (cris_elf_grok_prstatus,
6293 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6294 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6295 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6296 elf_cris_discard_excess_dso_dynamics,
6297 elf_cris_discard_excess_program_dynamics): ..
6298 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6299 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6300 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6301 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6302 elf32_frvfdpic_size_dynamic_sections,
6303 elf32_frvfdpic_modify_segment_map,
6304 elf32_frvfdpic_finish_dynamic_sections): ..
6305 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6306 elf32_h8_get_relocated_section_contents): ..
6307 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6308 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6309 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6310 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6311 elf32_hppa_finish_dynamic_sections): ..
6312 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6313 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6314 i370_elf_finish_dynamic_sections): ..
6315 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6316 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6317 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6318 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6319 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6320 * elf32-ip2k.c (ip2k_is_switch_table_128,
6321 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6322 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6323 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6324 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6325 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6326 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6327 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6328 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6329 m32r_elf_get_relocated_section_contents): ..
6330 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6331 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6332 m68hc11_elf_relax_delete_bytes): ..
6333 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6334 m68hc12_elf_size_one_stub): ..
6335 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6336 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6337 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6338 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6339 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6340 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6341 elf32_mips_grok_prstatus): ..
6342 * elf32-or32.c (or32_elf_consth_reloc): ..
6343 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6344 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6345 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6346 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6347 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6348 ppc_elf_final_write_processing): ..
6349 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6350 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6351 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6352 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6353 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6354 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6355 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6356 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6357 * elf32-sh64-com.c (sh64_address_in_cranges,
6358 sh64_get_contents_type): ..
6359 * elf32-sh64.c (sh64_find_section_for_address,
6360 sh64_elf_final_write_processing): ..
6361 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6362 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6363 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6364 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6365 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6366 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6367 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6368 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6369 elf_vax_finish_dynamic_sections): ..
6370 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6371 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6372 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6373 xstormy16_elf_finish_dynamic_sections): ..
6374 * elf32-xtensa.c (xtensa_read_table_entries,
6375 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6376 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6377 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6378 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6379 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6380 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6381 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6382 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6383 xtensa_callback_required_dependence): ..
6384 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6385 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6386 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6387 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6388 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6389 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6390 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6391 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6392 * elf64-hppa.c (allocate_dynrel_entries,
6393 elf64_hppa_size_dynamic_sections,
6394 elf64_hppa_finish_dynamic_sections): ..
6395 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6396 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6397 elf64_mips_grok_prstatus): ..
6398 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6399 mmix_elf_relocate_section, mmix_elf_final_link,
6400 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6401 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6402 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6403 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6404 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6405 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6406 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6407 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6408 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6409 ppc64_elf_finish_dynamic_sections): ..
6410 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6411 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6412 elf_s390_finish_dynamic_sections): ..
6413 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6414 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6415 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6416 sh64_elf64_finish_dynamic_sections): ..
6417 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6418 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6419 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6420 sparc64_elf_finish_dynamic_symbol,
6421 sparc64_elf_finish_dynamic_sections): ..
6422 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6423 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6424 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6425 elf64_x86_64_finish_dynamic_sections): ..
6426 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6427 * elfcode.h (elf_slurp_reloc_table): ..
6428 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6429 elf_finalize_dynstr, elf_link_add_object_symbols,
6430 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6431 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6432 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6433 elf32_mips_grok_prstatus): ..
6434 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6435 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6436 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6437 elfNN_ia64_finish_dynamic_sections): ..
6438 * elfxx-mips.c (mips_elf_create_procedure_table,
6439 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6440 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6441 mips_elf_global_got_index, mips_elf_multi_got,
6442 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6443 mips_elf_allocate_dynamic_relocations,
6444 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6445 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6446 _bfd_mips_elf_always_size_sections,
6447 _bfd_mips_elf_size_dynamic_sections,
6448 _bfd_mips_elf_finish_dynamic_symbol,
6449 _bfd_mips_elf_finish_dynamic_sections,
6450 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6451 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6452 _bfd_elf_mips_get_relocated_section_contents,
6453 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6454 * hp300hpux.c (callback): ..
6455 * hppabsd-core.c (make_bfd_asection): ..
6456 * hpux-core.c (make_bfd_asection): ..
6457 * i386linux.c (linux_link_create_dynamic_sections,
6458 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6459 * i386msdos.c (msdos_write_object_contents): ..
6460 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6461 os9k_set_section_contents): ..
6462 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6463 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6464 ieee_write_section_part, do_with_relocs, do_as_repeat,
6465 do_without_relocs, ieee_write_debug_part, init_for_output,
6466 ieee_set_section_contents): ..
6467 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6468 * irix-core.c (do_sections, make_bfd_asection): ..
6469 * libaout.h (aout_section_merge_with_text_p): ..
6470 * libbfd.c (_bfd_generic_get_section_contents,
6471 _bfd_generic_get_section_contents_in_window): ..
6472 * linker.c (default_indirect_link_order): ..
6473 * lynx-core.c (make_bfd_asection): ..
6474 * m68klinux.c (linux_link_create_dynamic_sections,
6475 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6476 * mach-o.c (bfd_mach_o_make_bfd_section,
6477 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6478 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6479 bfd_mach_o_scan_read_segment): ..
6480 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6481 _bfd_merge_sections): ..
6482 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6483 mmo_map_set_sizes, mmo_canonicalize_symtab,
6484 mmo_internal_write_section, mmo_write_object_contents): ..
6485 * netbsd-core.c (netbsd_core_file_p): ..
6486 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6487 nlm_alpha_set_public_section): ..
6488 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6489 * nlm32-sparc.c (nlm_sparc_write_import): ..
6490 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6491 nlm_compute_section_file_positions): ..
6492 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6493 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6494 * opncls.c (get_debug_link_info): ..
6495 * osf-core.c (make_bfd_asection): ..
6496 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6497 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6498 final_link, aout_link_input_section): ..
6499 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6500 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6501 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6502 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6503 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6504 * ptrace-core.c (ptrace_unix_core_file_p): ..
6505 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6506 _bfd_final_link_relocate, bfd_generic_relax_section,
6507 bfd_generic_get_relocated_section_contents): ..
6508 * reloc16.c (bfd_coff_reloc16_relax_section,
6509 bfd_coff_reloc16_get_relocated_section_c): ..
6510 * riscix.c (riscix_some_aout_object_p): ..
6511 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6512 * sco5-core.c (make_bfd_asection): ..
6513 * simple.c (bfd_simple_get_relocated_section_contents): ..
6514 * som.c (som_object_setup, setup_sections, som_prep_headers,
6515 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6516 som_set_reloc_info, som_get_section_contents,
6517 som_bfd_link_split_section): ..
6518 * sparclinux.c (linux_link_create_dynamic_sections,
6519 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6520 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6521 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6522 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6523 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6524 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6525 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6526 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6527 sunos_finish_dynamic_link): ..
6528 * syms.c (_bfd_stab_section_find_nearest_line): ..
6529 * tekhex.c (first_phase, tekhex_set_section_contents,
6530 tekhex_write_object_contents): ..
6531 * trad-core.c (trad_unix_core_file_p): ..
6532 * versados.c (process_esd, process_otr, process_otr): ..
6533 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6534 * vms-misc.c (add_new_contents): ..
6535 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6536 * vms.c (vms_set_section_contents): ..
6537 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6538 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6539 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6540 * xsym.c (bfd_sym_scan): .. See above.
6542 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6544 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6545 calling _bfd_merged_section_offset only for section symbols.
6547 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6549 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6550 for handling SEC_MERGE symbols in relax_section.
6552 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6554 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6555 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6556 linked together. Mark the result as h8300sx code.
6558 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6560 * elf-bfd.h (struct elf_backend_data): Added
6561 elf_backend_omit_section_dynsym.
6562 (_bfd_elf_link_omit_section_dynsym): Declare.
6563 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6564 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6565 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6566 (_bfd_elf_link_renumber_dynsyms): ... this function.
6567 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6568 _bfd_elf_link_omit_section_dynsym).
6569 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6571 2004-06-21 Nick Clifton <nickc@redhat.com>
6573 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6576 2004-06-17 Jerome Guitton <guitton@gnat.com>
6578 * bfd-in.h (bfd_cache_close_all): New function declaration.
6579 * bfd-in2.h: Regenerate.
6580 * cache.c (bfd_cache_close_all): New function definition.
6582 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6584 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6586 * configure: Regenerate.
6588 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6590 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6591 the pre-existing section.
6593 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6595 * section.c (struct sec): Remove usused flags. Reorganize a little.
6596 (bfd_get_section_size_before_reloc): Delete.
6597 (bfd_get_section_size_after_reloc): Delete.
6598 (STD_SECTION): Update.
6599 (bfd_get_section_size_now): Delete.
6600 (bfd_set_section_contents): Don't referece reloc_done.
6601 (bfd_get_section_contents): Remove reloc_done comment.
6602 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6604 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6605 * ecoff.c (bfd_debug_section): Update initializer.
6606 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6607 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6608 * bfd-in.h (bfd_section_size): Expand.
6609 (bfd_get_section_size): New macro.
6610 * bfd-in2.h: Regenerate.
6611 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6612 bfd_get_section_size_before_reloc with bfd_get_section_size.
6613 * coffcode.h (coff_write_object_contents): Likewise.
6614 * coffgen.c (build_debug_section): Likewise.
6615 * dwarf1.c (parse_line_table): Likewise.
6616 (_bfd_dwarf1_find_nearest_line): Likewise.
6617 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6618 * i386msdos.c (msdos_write_object_contents): Likewise.
6619 * pdp11.c (squirt_out_relocs): Likewise.
6620 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6621 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6623 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6625 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6626 removal) with updated comment.
6627 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6629 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6630 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6632 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6634 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6635 overflow on branches to undefweaks.
6637 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6639 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6640 as ecoff_section_data() does not return a valid lvalue.
6642 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6644 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6645 (elf_link_add_object_symbols): Likewise.
6647 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6648 (elf_backend_reloc_type_class): New.
6650 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6652 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6654 * configure: Regenerate.
6656 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6658 From: Albert Chin-A-Young <china@thewrittenword.com>
6659 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6662 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6664 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6667 2004-05-28 DJ Delorie <dj@redhat.com>
6669 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6670 for linking, but otherwise adjust reloc for merged sections.
6672 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6674 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6675 _bfd_merged_section_offset for local symbols.
6677 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6679 * Makefile.am: Regenerate dependencies.
6680 * Makefile.in: Regenerate.
6681 * archures.c: Add bfd_mach_sh3_nommu .
6682 * bfd-in2.h: Regenerate.
6683 * cpu-sh.c: Add sh3-nommu architecture.
6684 (bfd_to_arch_table): Create new table.
6685 (sh_get_arch_from_bfd_mach): Create new function.
6686 (sh_get_arch_up_from_bfd_mach): Create new function.
6687 (sh_merge_bfd_arch): Create new function.
6688 * elf32-sh.c (sh_ef_bfd_table): Add table.
6689 (sh_elf_check_relocs): Replace switch statement with
6690 use of sh_ef_bfd_table .
6691 (sh_elf_get_flags_from_mach): Add new function.
6692 (sh_find_elf_flags): Likewise.
6693 (sh_elf_copy_private_data): Replace most of non-elf contents
6694 with a call to sh_merge_bfd_arch() .
6696 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6698 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6699 * Makefile.in: Regenerate.
6701 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6703 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6704 custom calling conventions for dynamic symbols.
6705 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6706 symbol if it's an alias to a global one.
6708 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6710 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6713 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6715 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6718 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6720 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6721 for SHT_GROUP sections.
6723 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6725 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6727 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6728 * merge.c: Formatting. Remove unnecessary casts. Expand
6729 bfd_get_section_alignment macro.
6730 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6731 use throughout file.
6732 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6733 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6734 section name to determine sinfo group, instead test output section
6736 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6737 _bfd_strip_section_from_output rather than just twiddling flags.
6738 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6739 (_bfd_merge_sections): Update prototype.
6740 * libbfd.h: Regenerate.
6742 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6744 * netbsd-core.c: Correctly indent section that sets architecture
6747 From Miod Vallat <miod@online.fr>:
6748 * m88kopenbsd.c: New file.
6749 * targets.c (m88k_openbsd_vec): New.
6750 * config.bfd: Add m88k-*-openbsd*.
6751 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6752 (m88kopenbsd_vec): New.
6753 * configure: Regenerate.
6754 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6755 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6757 * Makefile.in: Regenerate.
6758 * po/SRC-POTFILES.in: Regenerate.
6760 2004-05-24 Nick Clifton <nickc@redhat.com>
6762 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6763 introduced by hash table size patch.
6765 2004-05-22 Ben Elliston <bje@au.ibm.com>
6767 * configure.in (is_release): Remove.
6768 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6769 (AC_OUTPUT): Don't output bfdver.h from version.h.
6770 * configure: Regenerate.
6771 * Makefile.am (RELEASE): New variable.
6772 (bfdver.h): New target.
6773 * Makefile.in: Regenerate.
6774 * doc/Makefile.in: Likewise.
6776 2004-05-22 Ben Elliston <bje@au.ibm.com>
6778 * Makefile.am (config.status): Don't depend on version.h.
6779 * Makefile.in: Regenerate.
6781 2004-05-22 Alan Modra <amodra@bigpond.net.au>
6783 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6784 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6785 * libbfd.h: Regenerate.
6786 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6787 (_bfd_elf_rel_local_sym): Likewise.
6788 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6789 (elf_link_input_bfd): Likewise.
6790 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6791 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6792 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6793 (elfNN_ia64_relocate_section): Likewise.
6795 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
6797 * hash.c (bfd_default_hash_table_size): New variable.
6798 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6799 (bfd_hash_set_default_size): New function. Set the default size
6800 to a selected prime number close to the argument. Document new
6802 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6803 * bfd-in2.h: Regenerate.
6804 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6805 * Makefile.in: Regenerate.
6807 2004-05-21 Mark Kettenis <kettenis@gnu.org>
6809 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6810 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6811 arm, m68k, m88k and hppa core files.
6813 2004-05-21 Nick Clifton <nickc@redhat.com>
6815 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6816 (bfd_bwrite): Likewise.
6817 (bfd_tell): Likewise.
6818 (bfd_flush): Likewise.
6819 (bfd_stat): Likewise.
6820 (bfd_seek): Likewise.
6821 (bfd_get_mtime): Likewise.
6822 (bfd_get_size): Likewise.
6824 2004-05-19 Ben Elliston <bje@au.ibm.com>
6826 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6828 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6830 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6831 (bfd_generic_openr_next_archived_file): Likewise.
6833 2004-05-17 Bob Wilson <bob.wilson@acm.org>
6835 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6836 section names by inserting a new substring after .gnu.linkonce, except
6837 for .gnu.linkonce.t.* where the "t." is replaced.
6839 2004-05-17 Adam Nemet <anemet@lnxw.com>
6841 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6842 (m68-*-lynxos* case): Likewise.
6843 (powerpc-*-lyxnos* case): New case.
6844 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6846 2004-05-17 David Heine <dlheine@tensilica.com>
6848 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6849 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6850 * bfd.c (bfd_copy_private_header_data): Define.
6851 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6853 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6854 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6855 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6856 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6857 segments by calling copy_private_bfd_data.
6858 (_bfd_elf_copy_private_header_data): Define.
6859 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6860 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6861 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6862 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6863 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6864 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6865 * som.c (som_bfd_copy_private_header_data): Define.
6866 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6867 * vms.c (vms_bfd_copy_private_header_data): Define.
6868 * bfd-in2.h: Regenerate.
6869 * libbfd.h: Regenerate.
6871 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6873 * elfxx-mips.c (MINUS_TWO): Define.
6874 (mips_elf_higher, mips_elf_highest,
6875 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6876 some bfd_vma values.
6877 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6879 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6881 * som.c (log2): Rename to exact_log2. Adjust all callers.
6883 2004-05-13 Paul Brook <paul@codesourcery.com>
6885 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6886 dwarf3 format CIE entries. Remove comment about the size of the
6887 ra_column field. It is now correctly deduced.
6889 2004-05-13 Joel Sherrill <joel@oarcorp.com>
6891 * config.bfd (or32-*-rtems*): Switch to elf.
6893 2004-05-13 Nick Clifton <nickc@redhat.com>
6895 * po/fr.po: Updated French translation.
6897 2004-05-11 Jakub Jelinek <jakub@redhat.com>
6899 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6900 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6901 Adjust counting of last_local.
6902 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6903 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6904 created by the linker nor !SHF_ALLOC.
6906 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6907 DT_PLTGOT to the start of the .got.plt section instead of the
6908 .got output section. Set sh_entsize for .got section in addition
6910 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6911 is at sgot->output_section->vma.
6912 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6913 DT_PLTGOT to the start of the .got.plt section instead of the
6914 .got output section.
6915 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6916 is at sgot->output_section->vma. Set sh_entsize for .got section
6917 in addition to .got.plt.
6918 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6919 (bfd_section_from_phdr): Likewise.
6920 (map_sections_to_segments): Likewise.
6921 (assign_file_positions_for_segments): Likewise.
6922 (get_program_header_size): Likewise.
6923 * elflink.c (bfd_elf_size_dynamic_sections): Set
6924 elf_tdata (output_bfd)->relro from info->relro.
6925 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6927 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
6929 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6930 a zero symndx for which we hadn't accounted a dynamic relocation.
6931 (_frvfdpic_add_rofixup): Likewise.
6933 2004-05-07 Brian Ford <ford@vss.fsi.com>
6934 DJ Delorie <dj@redhat.com>
6936 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6937 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6938 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6939 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6941 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
6943 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6944 immediately if there's no link info.
6945 (elf32_frvfdpic_copy_private_bfd_data): New.
6946 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6948 2004-05-06 Zack Weinberg <zack@codesourcery.com>
6950 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6951 filename argument is null; do not call strlen on a null pointer.
6953 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
6955 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6958 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
6960 * configure.in (bfd_elf32_frvfdpic_vec): New.
6961 * configure: Rebuilt.
6962 * targets.c (bfd_elf32_frvfdpic_vec): New.
6963 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6965 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6966 frvfdpic instead of frv. Rearrange elf-target macros such that
6967 the FDPIC-specific ones are only defined for this new target
6969 (bfd_elf32_frvfdpic_vec): Declare.
6971 (elf32_frv_relocate_section): Use it to enable segment checking
6972 and to control rofixup emission. Add output section vma to
6973 applied relocation in non-LOAD non-ALLOC sections. Use
6974 _bfd_error_handler for errors.
6975 (_frv_create_got_section): Create .rel.got and .rofixup only in
6976 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6978 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6979 (elf32_frvfdpic_modify_segment_map): Likewise.
6980 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6981 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6982 error message if we miscompute the rofixup size.
6983 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6984 (frvfdpic_elf_encode_eh_address): Likewise.
6985 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6986 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6987 relocs. Reject unknown relocation types.
6988 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6989 (frv_elf_merge_private_bfd_data): Likewise.
6990 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6991 0x4000 for newly-added elf32-frvfdpic.
6993 2004-05-05 Nick Clifton <nickc@redhat.com>
6996 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6997 returning NULL as most users of this function do not check its
6999 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7000 of bfd_cache_lookup().
7001 * sco5-core.c (sco5_core_file_p): Likewise.
7002 * trad-core.c (trad_unix_core_file_p): Likewise.
7004 2004-05-05 Nick Clifton <nickc@redhat.com>
7006 * cache.c (bfd_cache_lookup): Improve formatting.
7007 * archive.c: Fix formatting.
7009 2004-05-05 Peter Barada <peter@the-baradas.com>
7011 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7012 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7013 * bfd-in2.h(bfd_architecture): Regenerate.
7015 2004-05-03 Alan Modra <amodra@bigpond.net.au>
7017 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7019 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7020 those against discarded link-once and SEC_MERGE section symbols.
7022 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7024 * section.c (bfd_get_section_by_name_if): New.
7025 * bfd-in2.h: Regenerated.
7027 2004-05-02 Alan Modra <amodra@bigpond.net.au>
7029 * som.c (som_bfd_is_group_section): Define.
7031 2004-05-01 Alan Modra <amodra@bigpond.net.au>
7033 * section.c (bfd_make_section_anyway): Copy the whole
7034 bfd_hash_entry, not just "next" from existing entry.
7036 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7038 * elf.c (bfd_section_from_shdr): Maintain the section order in
7040 (special_sections): Add ".note.GNU-stack".
7041 (elf_fake_sections): Handle section group for relocatable
7044 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7046 * section.c (bfd_sections_find_if): New.
7047 * bfd-in2.h: Regenerated.
7049 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7051 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7053 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7054 * elf.c (bfd_elf_is_group_section): New function.
7055 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7056 * section.c (bfd_generic_is_group_section): New function.
7057 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7058 (BFD_JUMP_TABLE_LINK): Adjust.
7059 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7060 * aout-target.h (MY_bfd_is_group_section): Define.
7061 * aout-tic30.c (MY_bfd_is_group_section): Define.
7062 * bfd.c (bfd_is_group_section): Define.
7063 * binary.c (binary_bfd_is_group_section): Define.
7064 * bout.c (b_out_bfd_is_group_section): Define.
7065 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7066 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7067 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7068 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7069 * coffcode.h (coff_bfd_is_group_section): Define.
7070 * i386msdos.c (msdos_bfd_is_group_section): Define.
7071 * i386os9k.c (os9k_bfd_is_group_section): Define.
7072 * ieee.c (ieee_bfd_is_group_section): Define.
7073 * ihex.c (ihex_bfd_is_group_section): Define.
7074 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7075 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7076 * mmo.c (mmo_bfd_is_group_section): Define.
7077 * nlm-target.h (nlm_bfd_is_group_section): Define.
7078 * oasys.c (oasys_bfd_is_group_section): Define.
7079 * pef.c (bfd_pef_bfd_is_group_section): Define.
7080 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7081 * srec.c (srec_bfd_is_group_section): Define.
7082 * tekhex.c (tekhex_bfd_is_group_section): Define.
7083 * versados.c (versados_bfd_is_group_section): Define.
7084 * vms.c (vms_bfd_is_group_section): Define.
7085 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7086 * bfd-in2.h: Regenerate.
7087 * libbfd.h: Regenerate.
7089 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7091 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7093 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
7095 * configure.in: Update version to 2.15.91.
7096 * configure: Regenerate.
7098 2004-04-29 Brian Ford <ford@vss.fsi.com>
7100 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7101 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7102 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7103 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7104 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7105 .gnu.linkonce.wi. sections.
7106 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7107 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7109 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7110 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7112 2004-04-28 Chris Demetriou <cgd@broadcom.com>
7114 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7115 * bfd-in2.h: Regenerate.
7116 * libbfd.h: Likewise.
7118 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7120 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7122 (setup_sections): Use som_subspace_dictionary_record struct instead
7123 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7124 is_comdat, is_common or dup_common.
7125 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7126 is_comdat, is_common and dup_common in section subspace_dict from
7128 (som_begin_writing): Use som_subspace_dictionary_record struct.
7129 (som_finish_writing): Likewise.
7130 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7131 is_common and dup_common flags in info for symbol. Add comment
7132 regarding linker support for these fields. Slightly reorganize
7134 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7135 dup_common fields in symbol table from symbol info.
7136 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7137 arguments. Set corresponding fields in copy_data. Change all callers.
7138 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7140 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7141 * som.h (som_subspace_dictionary_record): Define.
7142 (som_copyable_section_data_struct): Add is_comdat, is_common and
7144 (som_section_data_struct): Use som_subspace_dictionary_record struct
7145 instead of subspace_dictionary_record.
7146 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7148 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7150 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7151 if set. Check reloc_done flag before applying relocations. Use
7152 output addresses, both when applying relocations and when comparing
7153 against the specified section.
7154 (elf_xtensa_relocate_section): Use output address to check if dynamic
7155 reloc is in a literal pool. Set section's reloc_done flag.
7157 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7159 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7160 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7162 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7165 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7167 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7168 structure field removed in 2004-04-24 patch.
7169 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7171 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7173 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7174 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7175 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7176 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7177 field before calling elf_backend_section_flags.
7179 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7181 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7182 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7183 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7184 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7185 and BFD_RELOC_32_PCREL.
7186 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7187 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7188 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7189 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7190 (mips_elf_next_relocation): Move comment about matching HI/LO
7192 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7193 R_MIPS_GNU_REL_HI16.
7195 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7197 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7198 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7199 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7200 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7201 and update comments to reflect current usage.
7202 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7203 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7205 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7206 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7207 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7208 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7209 type number to be MIPS_R_PCREL16.
7210 (mips_relocate_section): Remove support for link-time relaxation
7211 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7212 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7213 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7214 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7215 relaxation of branches used by embedded-PIC.
7216 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7217 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7218 related members, update comment.
7219 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7220 code related to embedded-PIC.
7221 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7222 initialization of now-removed 'adjust' member of
7223 'struct ecoff_debug_info'.
7225 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7227 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7229 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7231 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7232 relocs for locally defined symbols during -shared final link.
7233 (elf32_arm_final_link_relocate): Likewise.
7235 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7237 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7238 ELF_LINK_POINTER_EQUALITY_NEEDED.
7239 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7240 if r_type is not R_X86_64_PC32.
7241 (elf64_x86_64_finish_dynamic_symbol): If
7242 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7245 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7247 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7248 (elf_backend_plt_sym_val): Define.
7250 2004-04-22 Andrew Cagney <cagney@redhat.com>
7252 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7254 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7256 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7258 * som.c (som_set_section_contents): Constantify second argument.
7259 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7260 (som_object_setup): Rework to avoid warning.
7261 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7264 2004-04-22 Andrew Cagney <cagney@redhat.com>
7266 * cache.c (bfd_cache_close): Check for a previously closed file.
7268 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7270 * bfd.c (bfd_get_synthetic_symtab): Define.
7271 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7272 NAME##_get_synthetic_symtab.
7273 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7274 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7275 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7277 (_bfd_elf_get_synthetic_symtab): New prototype.
7278 * elfcode.h (elf_get_synthetic_symtab): Define.
7279 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7280 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7281 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7282 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7283 * bfd-in2.h: Rebuilt.
7284 * libbfd.h: Rebuilt.
7285 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7286 (elf_backend_plt_sym_val): Define.
7287 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7288 (elf_backend_plt_sym_val): Define.
7289 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7290 (elf_backend_plt_sym_val): Define.
7291 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7292 (elf_backend_plt_sym_val): Define.
7293 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7294 (elf_backend_plt_sym_val): Define.
7295 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7296 (elf_backend_plt_sym_val): Define.
7297 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7298 (elf_backend_plt_sym_val): Define.
7299 * aout-target.h (MY_get_synthetic_symtab): Define.
7300 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7301 * coff-rs6000.c (rs6000coff_vec): Add
7302 _bfd_nodynamic_get_synthetic_symtab.
7303 (pmac_xcoff_vec): Likewise.
7304 * coff64-rs6000.c (rs6000coff64_vec): Add
7305 _bfd_nodynamic_get_synthetic_symtab.
7306 (aix5coff64_vec): Likewise.
7307 * sunos.c (MY_get_synthetic_symtab): Define.
7308 * vms.c (vms_get_synthetic_symtab): Define.
7310 2004-04-22 Nick Clifton <nickc@redhat.com>
7312 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7314 2004-04-22 Peter Barada <peter@the-baradas.com>
7316 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7317 * bfd2-in.h: Regenerate.
7318 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7320 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7322 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7323 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7324 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7325 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7326 * bfd-in2.h: Regenerate.
7328 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7330 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7331 require relocations against a weak symbol to reference the same
7332 symbol hash entry if not a final, static link.
7333 (get_cached_value, add_value_map): Add final_static_link argument.
7334 (remove_literals): Pass final_static_link argument as needed.
7336 2004-04-21 Andrew Cagney <cagney@redhat.com>
7338 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7339 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7340 (opncls_bwrite, opncls_bclose, opncls_bflush)
7341 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7342 bfd iovec that uses function callbacks.
7343 (bfd_close): Use the iovec's bclose.
7344 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7345 (cache_bclose, cache_bflush, cache_bstat)
7346 (cache_iovec): New functions and global variable, implement a
7347 cache "iovec", where applicable set bfd_error.
7348 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7349 * bfdio.c (struct bfd_iovec): Define.
7350 (real_read): Delete function.
7351 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7352 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7353 assume that bread and bwrite set bfd_error.
7354 * bfd.c (struct bfd): Add "iovec", update comments.
7355 * bfd-in2.h, libbfd.h: Re-generate.
7357 2004-04-21 Andrew Cagney <cagney@redhat.com>
7359 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7361 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7363 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7364 (bfd_elf_gc_sections): Fail if a shared object is being created.
7365 Do not fail if dynamic sections have been created. Instead call
7366 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7367 dynamically referenced symbols. Do not mark the whole graph
7368 rooted at .eh_frame, only the section proper.
7370 2004-04-20 DJ Delorie <dj@redhat.com>
7372 * reloc.c: Add BFD_RELOC_32_SECREL.
7373 * bfd-in2.h: Regenerate.
7374 * libbfd.h: Likewise.
7375 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7376 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7377 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7379 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7381 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7382 relocs against hidden/protected undefweak symbols properly.
7383 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7385 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7387 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7388 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7391 2004-04-17 Brian Ford <ford@vss.fsi.com>
7393 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7394 filepos for the SizeOfHeaders field.
7395 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7397 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7399 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7401 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7402 change reloc_done. Set and restore _cooked_size.
7405 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7407 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7410 2004-04-15 Nick Clifton <nickc@redhat.com>
7412 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7414 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7416 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7418 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7420 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7421 when it is a definition.
7423 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7425 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7426 when statically linking PIC code.
7427 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7429 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7431 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7432 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7433 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7434 * configure: Regenerate.
7436 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7438 * elflink.c: Include libiberty.h.
7439 * Makefile.am (elflink.lo): Depend on libiberty.h.
7440 * Makefile.in: Regenerate.
7442 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7444 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7447 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7449 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7450 reserve the memory for dynamic linker
7452 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7454 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7455 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7457 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7459 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7460 RELOC_FOR_GLOBAL_SYMBOL.
7461 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7463 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7465 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7466 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7468 2004-04-01 Paul Brook <paul@codesourcery.com>
7470 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7471 * elf32-arm.h (struct elf32_elf_section_map): New.
7472 (struct _arm_elf_section_data): New.
7473 (elf32_arm_section_data): Define.
7474 (struct elf32_arm_link_hash_table): Add byteswap_code.
7475 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7476 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7477 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7478 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7479 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7480 (bfd_elf32_new_section_hook, elf_backend_write_section,
7481 elf_backend_link_output_symbol_hook): Define.
7483 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7485 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7486 that keeps the characters in a B_INCL..B_EINCL range.
7487 (_bfd_link_section_stabs): When computing the sum of the
7488 characters in a B_INCL..B_EINCL range also keep a copy of those
7489 characters. Use this information to distinguish between
7490 include sections that have the same sum and the same length
7491 but which are nevertheless unique.
7493 2004-03-31 Paul Brook <paul@codesourcery.com>
7495 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7496 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7498 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7500 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7501 to 'sum_chars' and add field 'num_chars'.
7502 (_bfd_link_section_stabs): When computing the sum of the
7503 characters in a B_INCL..B_EINCL range also keep a count of the
7504 number of characters. Use this information to help distinguish
7505 between include sections when have the same sum but which
7506 nevertheless are still unique.
7508 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7510 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7512 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7513 Tomer Levi <Tomer.Levi@nsc.com>
7515 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7516 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7517 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7518 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7519 (cpu-cr16c.lo): New target.
7520 (elf32-cr16c.lo): Likewise.
7521 * Makefile.in: Regenerate.
7522 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7523 (bfd_archures_list): Add bfd_cr16c_arch.
7524 * config.bfd: Handle cr16c-*-elf*.
7525 * configure.in: Handle bfd_elf32_cr16c_vec.
7526 * configure: Regenerate.
7527 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7528 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7529 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7530 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7531 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7532 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7533 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7534 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7535 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7536 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7537 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7538 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7539 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7540 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7541 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7542 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7543 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7544 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7545 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7546 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7547 * targets.c (bfd_elf32_cr16c_vec): Declare.
7548 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7549 * cpu-cr16c.c: New file.
7550 * elf32-cr16c.c: Likewise.
7551 * libbfd.h: Regenerate.
7552 * bfd-in2.h: Likewise.
7554 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7556 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7558 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7560 * Makefile.am: Remove all mention of elflink.h.
7561 * Makefile.in: Regenerate.
7562 * bfd-in.h (bfd_elf_discard_info): Declare.
7563 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7564 * bfd-in2.h: Regenerate.
7565 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7566 bfd_elf32_link_record_dynamic_symbol,
7567 bfd_elf64_link_record_dynamic_symbol,
7568 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7569 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7570 _bfd_elf32_link_record_local_dynamic_symbol,
7571 _bfd_elf64_link_record_local_dynamic_symbol,
7572 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7573 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7574 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7575 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7576 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7577 _bfd_elf32_reloc_symbol_deleted_p,
7578 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7579 (bfd_elf_link_record_dynamic_symbol,
7580 bfd_elf_link_record_local_dynamic_symbol,
7581 bfd_elf_final_link, bfd_elf_gc_sections,
7582 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7583 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7584 bfd_elf_reloc_symbol_deleted_p): Declare.
7585 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7586 * elf32-arm.h: Update for changed function names. Remove local
7587 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7588 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7589 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7590 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7591 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7592 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7593 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7594 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7595 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7596 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7597 (bfd_elfNN_print_symbol): Define.
7598 * elfcode.h: Don't include elflink.h.
7599 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7600 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7601 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7602 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7603 elf_link_record_local_dynamic_symbol): Don't define.
7604 * elflink.c: Update for changed function names. Move elflink.h
7606 * elflink.h: Delete file.
7607 * po/SRC-POTFILES.in: Regenerate.
7608 * po/bfd.pot: Regenerate.
7610 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7612 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7613 "name" for global syms accidentally removed in 2004-03-20 change.
7615 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7617 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7618 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7619 where Elf_External_* is different for 64 and 32 bit, with
7620 corresponding elf_size_info field.
7621 (struct elf_final_link_info): Use "bfd_byte *" instead
7622 of "Elf_External_Sym *" for external_syms and symbuf.
7623 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7624 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7625 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7626 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7627 (elf_link_sort_cmp2): Adjust.
7628 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7629 using ELF_R_SYM macro. Set u.sym_mask.
7630 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7631 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7632 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7633 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7634 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7635 swap_syn_out functions. Rearrange dyn swap in/out switch.
7636 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7637 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7638 (elf_link_flush_output_syms): Add elf_backend_data arg.
7639 (elf_link_check_versioned_symbol): Likewise.
7640 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7641 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7642 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7643 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7644 ELF_R_TYPE and ELF_R_INFO macros.
7645 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7646 based on size rather than using ELF_R_INFO.
7647 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7649 (struct alloc_got_off_arg): New.
7650 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7651 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7652 (elf_gc_allocate_got_offsets): Adjust.
7653 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7654 ELF_R_SYM. Use bfd_section_from_elf_index.
7655 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7656 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7657 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7659 2004-03-26 Stan Shebs <shebs@apple.com>
7661 Remove MPW support, no longer used.
7662 * config.bfd (powerpc-*-mpw*): Remove configuration.
7663 * mpw-config.in, mpw-make.sed: Remove files.
7664 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7666 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7668 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7669 (ppc64_elf_add_symbol_hook): New function.
7670 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7671 const from Elf_Internal_Sym param.
7672 * elflink.c (elf_link_add_object_symbols): Adjust.
7673 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7674 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7675 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7676 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7677 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7678 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7679 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7680 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7681 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7682 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7683 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7684 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7685 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7686 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7687 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7688 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7690 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7692 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7693 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7694 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7695 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7696 (bfd_elf64_bfd_link_add_symbols): Delete.
7697 (bfd_elf_link_add_symbols): Declare.
7698 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7699 * elflink.c: Include safe-ctype.h.
7700 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7702 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7703 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7705 (elf_link_add_archive_symbols): Rename from
7706 _bfd_elf_link_add_archive_symbols, make static.
7707 (elf_link_add_object_symbols): New function. Corresponding
7708 elflink.h function converted to use elf_size_info.
7709 (bfd_elf_link_add_symbols): Likewise.
7710 (bfd_elf_size_dynamic_sections): Adjust.
7711 * elflink.h (elf_bfd_link_add_symbols): Delete.
7712 (elf_link_add_object_symbols): Delete.
7713 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7714 bfd_elf_link_add_symbols.
7715 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7717 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7719 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7720 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7722 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7723 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7724 (_bfd_elf_add_dt_needed_tag): Declare.
7725 (_bfd_elf_sort_symbol): Declare.
7726 (_bfd_elf_finalize_dynstr): Declare.
7727 (RELOC_FOR_GLOBAL_SYM): Formatting.
7728 * elfcode.h (elf_add_dynamic_entry): Delete.
7729 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7730 elflink.h function converted to use elf_size_info.
7731 (_bfd_elf_add_dt_needed_tag): Likewise.
7732 (_bfd_elf_sort_symbol): Likewise.
7733 (_bfd_elf_finalize_dynstr): Likewise.
7734 (compute_bucket_count): Likewise.
7735 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7736 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7737 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7738 * elflink.h: ..here.
7739 (sort_symbol, add_dt_needed_tag): Delete.
7740 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7741 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7743 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7744 * elf32-cris.c (add_dynamic_entry): Likewise.
7745 * elf32-hppa.c (add_dynamic_entry): Likewise.
7746 * elf32-i370.c (add_dynamic_entry): Likewise.
7747 * elf32-i386.c (add_dynamic_entry): Likewise.
7748 * elf32-m32r.c (add_dynamic_entry): Likewise.
7749 * elf32-m68k.c (add_dynamic_entry): Likewise.
7750 * elf32-ppc.c (add_dynamic_entry): Likewise.
7751 * elf32-s390.c (add_dynamic_entry): Likewise.
7752 * elf32-sh.c (add_dynamic_entry): Likewise.
7753 * elf32-sparc.c (add_dynamic_entry): Likewise.
7754 * elf32-vax.c (add_dynamic_entry): Likewise.
7755 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7756 * elf64-alpha.c (add_dynamic_entry): Likewise.
7757 * elf64-hppa.c (add_dynamic_entry): Likewise.
7758 * elf64-ppc.c (add_dynamic_entry): Likewise.
7759 * elf64-s390.c (add_dynamic_entry): Likewise.
7760 * elf64-sparc.c (add_dynamic_entry): Likewise.
7761 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7762 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7763 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7764 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7765 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7766 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7768 2004-03-23 Paul Brook <paul@codesourcery.com>
7770 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7772 2004-03-22 Bob Wilson <bob.wilson@acm.org>
7774 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7775 literal tables and check for relocs outside of literal pools.
7776 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7777 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7779 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7780 (elf_xtensa_relocate_section): Read literal tables and check for
7781 dynamic relocations in read-only sections and not in literal pools.
7783 2004-03-23 Alan Modra <amodra@bigpond.net.au>
7786 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7788 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
7790 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7791 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7792 not defined by the executable, or defined in a DSO.
7793 <eliding run-time relocation of .got>: Initialize GOT entry for a
7794 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7796 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7797 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7798 a PLT reloc to GOT for an executable.
7799 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7800 .got for a DSO and explain why.
7801 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7802 and unreferenced symbols for which a PLT is defined. Adjust
7803 dynamic-symbol pruning correspondingly, to make sure we don't lose
7804 a dynamic symbol also defined by a DSO.
7806 2004-03-22 Alan Modra <amodra@bigpond.net.au>
7808 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7809 and rel args. Group input and output args. Wrap to 80 columns.
7810 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7811 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7812 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7813 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7814 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7815 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7816 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7817 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7818 RELOC_FOR_GLOBAL_SYMBOL invocation.
7820 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7822 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7823 unresolved symbols in objects aren't allowed.
7825 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7827 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7828 (elf_hppa_unmark_useless_dynamic_symbols):
7829 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7830 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7831 (elf32_hppa_relocate_section): Likewise.
7832 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7833 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7834 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7835 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7836 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7838 * elf-m10200.c (mn10200_elf_relocate_section): Use
7839 RELOC_FOR_GLOBAL_SYMBOL.
7840 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7841 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7842 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7843 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7844 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7845 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7846 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7847 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7848 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7849 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7850 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7851 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7853 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7855 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7856 (final_link_relocate): Likewise.
7857 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7858 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7860 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7862 * Makefile.am: Run "make dep-am".
7863 * Makefile.in: Regenerate.
7864 * aclocal.m4: Regenerate.
7865 * config.in: Regenerate.
7866 * po/bfd.pot: Regenerate.
7868 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7869 H.J. Lu <hongjiu.lu@intel.com>
7871 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7872 type and size change code to where it was previously. Remove
7873 dt_needed param. Treat old weak syms as strong if new sym is
7874 from a shared lib, even when old sym is from another shared
7875 lib. Remove unnecessary tests of oldweak and newweak. Correct
7877 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7878 _bfd_elf_merge_symbol calls.
7879 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7880 dt_needed local var. Update comments.
7881 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7882 (_bfd_elf_add_default_symbol): Likewise.
7884 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7885 strong syms in one shared object overriding weak syms in another.
7887 2004-03-18 Alan Modra <amodra@bigpond.net.au>
7889 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7890 dyn_lib_class field. Rearrange for better packing.
7891 (elf_dt_soname): Delete.
7892 (elf_dyn_lib_class): Define.
7893 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7894 (bfd_elf_set_dt_needed_soname): Delete.
7895 (bfd_elf_set_dyn_lib_class): New function.
7896 * elflink.h (add_dt_needed_tag): New function. Split out from..
7897 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7898 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7899 initialization of soname.
7900 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7902 * bfd-in.h (enum dynamic_lib_link_class): New.
7903 (bfd_elf_set_dt_needed_soname): Delete.
7904 (bfd_elf_set_dyn_lib_class): Declare.
7905 * bfd-in2.h: Regenerate.
7907 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7908 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7909 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7910 symbol loop. Instead use add_needed to flag tag as written.
7912 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7914 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7915 logic for null_input_bfd detection.
7917 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7919 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7921 2004-03-16 Mark Kettenis <kettenis@gnu.org>
7923 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7926 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7928 * elflink.c (elf_link_read_relocs_from_section): Don't use
7929 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7930 (_bfd_elf_link_read_relocs): ..to here.
7931 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7933 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7935 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7936 values selected in configure.host. Require both to be defined
7937 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7938 corresponding BFD_HOST vars with quotes.
7939 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7940 Always require BFD_HOST_64_BIT_DEFINED.
7941 <file_ptr type>: Find off_t size before emitting message. Combine
7942 off_t and ftello64 conditional.
7943 * configure: Regenerate.
7945 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7947 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7948 aliasing warning. Remove trailing whitespace throughout file.
7950 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7952 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7953 input_section in calls to get_dyn_name.
7954 * 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
7956 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7958 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7960 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7961 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7962 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7963 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7964 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7965 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7966 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7968 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7969 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7970 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7971 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7972 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7973 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7974 (read_8_bytes, read_indirect_string, read_address): Likewise.
7975 (read_abbrevs, parse_comp_unit): Likewise.
7976 * targets.c (struct bfd_target): Likewise.
7977 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7978 * hppabsd-core.c: Likewise. Formatting.
7979 * hpux-core.c: Likewise.
7980 * irix-core.c: Likewise.
7981 * netbsd-core.c: Likewise.
7982 * osf-core.c: Likewise.
7983 * ptrace-core.c: Likewise.
7984 * sco5-core.c: Likewise.
7985 * trad-core.c: Likewise.
7986 * configure: Regenerate.
7987 * bfd-in2.h: Regenerate.
7989 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7991 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7992 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7993 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7994 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7995 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7996 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7997 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7998 * libbfd.c: Likewise in function definitions.
7999 (bfd_put_8): Mask with 0xff rather than casting to char.
8000 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8001 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8002 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8003 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8004 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8005 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8006 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8007 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8008 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8009 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8010 * archive.c (do_slurp_coff_armap): Update swap prototype.
8011 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8012 (tic54x_getl_signed_32): Likewise.
8013 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8014 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8015 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8016 (bfd_getp_signed_32, bfd_putp32): Likewise.
8017 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8018 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8019 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8020 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8021 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8022 bfd_h_getx_signed_16, bfd_h_putx16.
8023 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8024 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8025 * hpux-core.c: Likewise.
8026 * irix-core.c: Likewise.
8027 * netbsd-core.c: Likewise.
8028 * osf-core.c: Likewise.
8029 * ptrace-core.c: Likewise.
8030 * sco5-core.c: Likewise.
8031 * trad-core.c: Likewise.
8032 * bfd-in2.h: Regenerate.
8034 2004-03-15 Matt Thomas <matt@3am-software.com>
8036 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8039 2004-03-13 Mark Kettenis <kettenis@gnu.org>
8041 * config.bfd: Add x86_64-*-openbsd*.
8042 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8044 * configure: Regenerate.
8046 2004-03-12 Nick Clifton <nickc@redhat.com>
8047 Dave Murphy <wintermute2k4@ntlworld.com>
8049 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8050 if the input bfd does not contain any code.
8052 2004-03-09 Steve Ellcey <sje@cup.hp.com>
8054 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8056 2004-03-05 Fred Fish <fnf@redhat.com>
8058 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8059 mips16 symbols to be even rather than testing first for even/odd.
8060 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8062 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8064 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8067 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
8069 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8070 undefined symbols as hash_new.
8072 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8074 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8076 * elf32-sh.c: Ditto.
8077 * bfd-in2.h: Regenerate.
8079 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
8081 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8083 (_frv_count_got_plt_entries): Initialize them.
8084 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8086 (frv_pic_relocs_info_for_global): Likewise.
8087 (frv_pic_relocs_info_for_local): Likewise.
8088 (frv_pic_merge_early_relocs_info): New.
8089 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8091 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8092 Check that we don't exceed the allocated count for entry.
8093 (_frv_add_rofixup): Likewise.
8094 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8095 (elf32_frv_finish_dynamic_sections): Improve error message in case
8096 we emit too few rofixup entries.
8098 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
8100 * archures.c (bfd_mach_fr450): New.
8101 * bfd-in2.h: Regenerate.
8102 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8103 (arch_info_500): Link to it.
8104 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8105 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8106 (frv_elf_arch_extension_p): New function.
8107 (frv_elf_merge_private_bfd_data): Use it.
8109 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8111 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8113 * elflink.h (is_global_data_symbol_definition): Moved to
8115 (elf_link_is_defined_archive_symbol): Likewise.
8116 (elf_link_add_archive_symbols): Likewise. Renamed to
8117 _bfd_elf_link_add_archive_symbols.
8119 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8120 of ELF symbol table entry from backend.
8121 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8122 instead of elf_link_add_object_symbols.
8124 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8126 * elf-bfd.h (struct elf_backend_data): Added
8127 elf_backend_can_make_relative_eh_frame,
8128 elf_backend_can_make_lsda_relative_eh_frame and
8129 elf_backend_encode_eh_address.
8130 (_bfd_elf_encode_eh_address): Declare.
8131 (_bfd_elf_can_make_relative): Declare.
8132 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8133 hooks to decide whether to attempt to make_relative and
8135 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8136 (_bfd_elf_can_make_relative): New.
8137 (_bfd_elf_encode_eh_address): New.
8138 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8139 (frv_elf_encode_eh_address): New.
8140 (elf_backend_can_make_relative_eh_frame): Define.
8141 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8142 (elf_backend_encode_eh_address): Define.
8144 (elf_backend_can_make_relative_eh_frame): Define.
8145 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8146 (elf_backend_encode_eh_address): Define.
8147 (elfNN_bed): Add them.
8149 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8151 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8152 complain_on_overflow to signed.
8154 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8156 * elflink.h (sort_symbol): New.
8157 (elf_link_add_object_symbols): Use a sorted symbol array for
8160 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8162 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8163 for pc relative relocs.
8164 (elf_s390_relocate_section): Likewise.
8165 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8166 for pc relative relocs.
8167 (elf_s390_relocate_section): Likewise.
8169 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8171 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8174 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8176 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8177 field to track if a relocation is against readonly section.
8178 (count_dyn_reloc): Take a new argument for rent->reltext.
8179 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8180 (get_reloc_section): Don't set ia64_info->reltext here.
8181 (allocate_dynrel_entries): Set ia64_info->reltext here.
8183 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8185 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8186 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8187 function's descriptor to symbol+offset, and map local undefweak
8188 symbol to NULL function descriptor.
8189 (elf32_frv_relocate_section): Likewise.
8191 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8193 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8195 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8196 (netbsd_core_file_p): Set architecture from machine ID for
8199 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8201 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8202 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8204 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8206 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8207 symbols with non-default visibility.
8209 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8211 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8212 IMAGE_SCN_MEM_WRITE on known sections only.
8214 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8216 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8217 symbols used in PIE relocs.
8219 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8221 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8224 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8226 * configure.in: Update version to 2.15.90.
8227 * configure: Regenerate.
8229 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8230 Richard Sandiford <rsandifo@redhat.com>
8232 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8233 _bfd_elf_symbol_refs_local_p to decide whether to decay
8234 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8235 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8236 relocs if the symbol wasn't defined by a regular object file.
8237 Don't check the symbol's dynindx.
8239 2004-02-16 Andrew Cagney <cagney@redhat.com>
8241 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8243 * bfd-in2.h: Re-generate.
8245 2004-02-14 Andrew Cagney <cagney@redhat.com>
8247 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8248 _LARGEFILE64_SOURCE.
8250 2004-02-13 Andrew Cagney <cagney@redhat.com>
8252 * elf.c (vma_page_aligned_bias): New function.
8253 (assign_file_positions_except_relocs)
8254 (assign_file_positions_for_segments): Replace broken modulo
8255 arithmetic with call to vma_page_aligned_bias.
8257 2004-02-11 Andrew Cagney <cagney@redhat.com>
8259 * bfd-in.h: Update copyright.
8260 (bfd_tell): Change return type to file_ptr.
8261 * bfd-in2.h: Re-generate.
8262 * cache.c: Update copyright.
8263 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8265 (close_one): Use real_ftell.
8266 * bfdio.c: Update copyright.
8267 (real_ftell, real_fseek): New functions.
8268 (bfd_tell): Use real_fseek and real_ftell, change return type to
8270 (bfd_seek): Use real_ftell and real_fseek, change type of
8271 file_position to a file_ptr.
8272 * libbfd-in.h: Update copyright.
8273 (real_ftell, real_fseek): Declare.
8274 * libbfd.h: Re-generate.
8276 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8277 fseeko and fseeko64. Determine bfd_file_ptr.
8278 * configure: Re-generate.
8279 * config.in: Re-generate.
8281 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8283 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8284 * elf32-h8300.c: Likewise.
8286 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8287 Nick Clifton <nickc@redhat.com>
8289 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8290 GOT entries with no associated GOT subsection.
8292 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8294 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8295 * elf.c (swap_out_syms): Use it to decide whether local section
8296 symbols should be named.
8297 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8298 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8299 (elf_backend_name_local_section_symbols): Define.
8300 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8302 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8304 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8305 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8308 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8310 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8311 to bfd_link_hash_entry passed by reference to
8312 _bfd_generic_link_add_one_symbol.
8314 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8316 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8317 relocations against dynamic symbols.
8319 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8321 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8324 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8326 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8327 * bfd-in2.h, libbfd.h: Rebuilt.
8329 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8331 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8332 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8333 flag has been cleared.
8335 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8337 * coff-h8300.c: Add and adjust comments about relaxation.
8338 * elf32-h8300.c: Likewise.
8340 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8342 * coff-h8300.c: Fix comment typos.
8343 * elf32-h8300.c: Likewise.
8345 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8347 * coff-h8300.c: Add comments about relaxation.
8348 * elf32-h8300.c: Likewise.
8350 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8352 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8354 * aclocal.m4: Regenerate.
8355 * configure: Regenerate.
8357 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8359 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8360 mips_elf64_rtype_to_howto instead of using howto_table.
8362 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8364 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8366 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8367 relocs which would not use the PLT.
8369 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8371 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8372 (ppc64_elf_gc_sweep_hook): Likewise.
8373 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8375 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8377 Adds linker relaxation support for bit manipulation insns like
8378 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8380 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8381 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8382 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8383 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8385 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8387 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8389 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8391 * elf32-h8300.c: Fix formatting.
8393 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8395 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8396 dynamic object is present. Declare r_symndx and h in an inner
8398 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8400 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8402 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8403 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8404 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8405 identically. Do not emit PC24 relocations for shared libraries.
8406 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8407 identically. Don't adjust pc_count.
8408 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8409 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8410 adjust count for branch relocations.
8411 (allocate_dynrelocs): Correct typo in call to
8412 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8413 PC24 or PLT32 relocs when linking.
8415 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8417 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8418 relocation howto with ARM_26 one for consistency.
8419 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8420 that will be converted to ARM_26D ones, since we always want 'done'
8421 relocations to be reflected in section's data.
8422 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8424 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8427 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8429 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8430 are not partial_inplace during a relocatable link.
8432 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8434 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8435 if no dynamic object is present. Declare r_symndx and h in an
8438 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8440 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8441 trampoline if it is known out of range.
8443 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8445 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8446 * elf32-frv.c (_frv_osec_readonly_p): New.
8447 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8449 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8450 (elf32_frv_relocate_section): Likewise. Error out if attempting
8451 to emit rofixups or dynamic relocs in read-only segments. Use
8452 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8453 dynamic relocations.
8454 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8455 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8456 relocations or fixups involving merged sections correctly. Avoid
8457 crash when undefined symbol is referenced by R_FRV_32 or
8458 R_FRV_FUNCDESC_VALUE.
8459 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8460 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8461 input section holding local symbol to addend of R_FRV_32 or
8462 R_FRV_FUNCDESC_VALUE dynamic relocation.
8463 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8464 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8465 (elf32_frv_always_size_sections): Don't store pointer to
8466 __stacksize symbol in sec_info.
8467 (elf32_frv_modify_segment_map): Look it up here.
8468 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8469 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8470 of the lazy PLT entry, not only its offset, as the low word of a
8471 function descriptor.
8472 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8473 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8474 if a hash table entry already exists but is not a definition.
8475 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8476 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8477 (_frv_add_rofixup): Don't inline.
8478 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8479 for undefweak symbols.
8480 (elf32_frv_relocate_section): Avoid crash while computing
8481 relocation when linking with shared library. Only emit rofixups
8482 and dynamic relocations for alloc&load sections. Mark binaries
8483 with inter-segment relocations for relocation as a unit.
8484 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8485 (DEFAULT_STACK_SIZE): New.
8486 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8487 emit rofixups or dynamic relocs when linking dynamic non-PIE
8489 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8490 shared libs too. Reserve the last entry for the GOT pointer.
8491 (elf32_frv_finish_dynamic_sections): Emit it.
8492 (elf32_frv_always_size_sections): New.
8493 (elf32_frv_modify_segment_map): New.
8494 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8496 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8497 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8498 (elf_backend_always_size_sections): New.
8499 (elf_backend_modify_segment_map): New.
8500 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8501 * config.bfd: Added frv-*-*linux*.
8502 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8503 ABS section, instead of crashing.
8504 (elf32_frv_relocate_section): Don't crash before warning about
8505 different segments in non-PIC relocation.
8506 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8507 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8508 relocs to undefweak symbols.
8509 (elf32_frv_relocate_section): Ditto for undefined symbols.
8510 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8511 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8512 gotfixup section was created.
8513 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8514 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8515 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8516 complain_overflow_signed.
8517 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8518 have not been allocated.
8519 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8520 privfd only if dynamic sections were created.
8521 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8522 for GPREL relocs. When linking relocatable FDPIC executables,
8523 emit warnings for relocations that would be illegal on PIE or
8524 shared libraries. Emit rofixup for R_FRV_32 only if input object
8526 (_frv_create_got_section): Define _gp symbol in the rofixup
8528 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8529 dynamic sections missing, error out requesting -melf32frvfd.
8530 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8531 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8532 computation of addends from section and global or local symbol
8533 value. Change return type to bfd_boolean, and return a failure if
8534 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8535 nonzero addend is required.
8536 (elf32_frv_relocate_section): Likewise. Print error for
8537 unsupported nonzero addends.
8538 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8539 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8540 force everything local.
8541 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8542 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8543 (frv_gotfixup_section): New.
8544 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8545 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8547 (_frv_add_rofixup): New.
8548 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8549 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8550 improve some ugly conditions.
8551 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8552 relocations in fdpic.
8553 (_frv_create_got_section): Create .rofixup.got section.
8554 (struct _frv_dynamic_got_info): Added fixups.
8555 (_frv_count_got_plt_entries): Account in-GOT relocations into
8556 relocs32, relocsfd and relocsfdv. Account them into relocs or
8557 fixups, as appropriate.
8558 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8560 (elf32_frv_finish_dynamic_sections): Verify that the right number
8561 of relocations and fixups was generated.
8562 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8564 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8565 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8566 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8567 descriptor of a (formerly-)global symbol is local.
8568 (struct frv_pic_relocs_info): Adjust comments.
8569 (_frv_emit_got_relocs_plt_entries): Adjust.
8570 (elf32_frv_relocate_section): Likewise.
8571 (_frv_count_got_plt_entries): Likewise.
8572 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8573 symbol's value to addend in the common preamble. Decay dynamic
8574 symbols to section+offset if they bind or call locally, for GOT
8575 and FUNCDESC_VALUE, respectively.
8576 (elf32_frv_relocate_section): Likewise.
8577 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8578 internal or hidden visibility.
8579 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8580 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8581 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8582 (elf32_frv_relocate_section): Pass relocation addend in. Use
8583 original relocation addend to look up the got relocs/plt entries
8584 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8585 processing relocations that reference .scommon symbols.
8586 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8587 Introduce support for dynamic linking.
8588 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8589 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8590 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8591 (frv_reloc_type_lookup): Return REL howtos for executables and
8593 (frv_info_to_howto_rel): New.
8594 (struct frv_elf_link_hash_table): New.
8595 (frv_hash_table, frv_got_section, frv_gotrel_section,
8596 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8597 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8598 (frv_elf_link_hash_table_create): New.
8599 (struct frv_pic_relocs_info): New.
8600 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8601 (frv_pic_relocs_info_find): New.
8602 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8604 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8605 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8606 (_frv_emit_got_relocs_plt_entries): New.
8607 (elf32_frv_relocate_section): Add support for dynamic linking.
8608 Handle new relocations.
8609 (_frv_create_got_section): New.
8610 (elf32_frv_create_dynamic_sections): New.
8611 (ELF_DYNAMIC_INTERPRETER): New.
8612 (struct _frv_dynamic_got_info): New.
8613 (_frv_count_got_plt_entries): New.
8614 (struct _frv_dynamic_got_plt_info): New.
8615 (_frv_compute_got_alloc_data): New.
8616 (_frv_get_got_entry, _frv_get_fd_entry): New.
8617 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8618 (_frv_resolve_final_relocs_info): New.
8619 (elf32_frv_size_dynamic_sections): New.
8620 (elf32_frv_finish_dynamic_sections): New.
8621 (elf32_frv_adjust_dynamic_symbol): New.
8622 (elf32_frv_finish_dynamic_symbol): New.
8623 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8625 (elf_info_to_howto_rel): Define.
8626 (bfd_elf32_bfd_link_hash_table_create): Define.
8627 (elf_backend_create_dynamic_sections): Define.
8628 (elf_backend_adjust_dynamic_symbol): Define.
8629 (elf_backend_size_dynamic_sections): Define.
8630 (elf_backend_finish_dynamic_symbol): Define.
8631 (elf_backend_finish_dynamic_sections): Define.
8632 (elf_backend_want_got_sym): Define.
8633 (elf_backend_got_header_size): Define.
8634 (elf_backend_want_got_plt): Define.
8635 (elf_backend_plt_readonly): Define.
8636 (elf_backend_want_plt_sym): Define.
8637 (elf_backend_plt_header_size): Define.
8638 (elf_backend_may_use_rel_p): Define.
8639 (elf_backend_may_use_rela_p): Define.
8640 (elf_backend_default_use_rela_p): Define.
8641 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8642 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8643 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8644 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8645 (frv_reloc_map): Map the corresponding BFD relocs to them.
8646 (frv_reloc_type_lookup): ... and back to BFD relocs.
8647 * reloc.c: New relocs.
8648 * bfd-in2.h, libbfd.h: Rebuilt.
8649 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8650 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8651 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8652 R_FRV_FUNCDESC_GOTLO): New.
8653 (frv_reloc_map): Map the corresponding BFD relocs to them.
8654 (frv_reloc_type_lookup): ... and back to BFD relocs.
8655 * reloc.c: New relocs.
8656 * bfd-in2.h, libbfd.h: Rebuilt.
8658 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8660 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8661 targets to support pages of up to 64kB.
8662 (elf32_bed): Redefine to get a separate backend data structure for
8663 traditional targets.
8664 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8665 targets to support pages of up to 64kB.
8666 (elf64_bed): Redefine to get a separate backend data structure for
8667 traditional targets.
8668 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8669 targets to support pages of up to 64kB.
8670 (elf32_bed): Redefine to get a separate backend data structure for
8671 traditional targets.
8673 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8675 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8677 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8679 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8680 (elf_i386_grok_psinfo): Likewise.
8682 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8684 * config.bfd: Add m68k-uClinux target.
8686 2004-01-01 Grant Edwards <grante@visi.com>
8688 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8689 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8690 (elf32_h8_gc_sweep_hook): New function.
8691 (elf_backend_gc_mark_hook): Define.
8692 (elf_backend_gc_sweep_hook): Define.
8693 (elf_backend_can_gc_sections): Define.
8695 For older changes see ChangeLog-0203
8701 version-control: never