1 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
4 info->executable instead of !info->shared where appropriate.
6 2005-07-04 Alan Modra <amodra@bigpond.net.au>
9 * elf.c (assign_file_positions_for_segments): Remove excluded
10 sections from the segment map.
12 2005-07-04 Alan Modra <amodra@bigpond.net.au>
15 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
17 (_bfd_elf_get_special_section): Declare.
18 (bfd_elf_special_section): Update prototype.
19 * elf.c (special_sections): Remove unused outer entries.
20 (get_special_section): Delete.
21 (_bfd_elf_get_special_section): New function.
22 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
23 special_sections indexing.
24 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
25 * elf32-arm.c (symbian_special_sections_d): Delete.
26 (symbian_special_sections_g, symbian_special_sections_h): Delete.
27 (symbian_special_sections_i, symbian_special_sections_f): Delete.
28 (symbian_special_sections_p): Delete.
29 (elf32_arm_symbian_special_sections): Merge above to here.
30 (elf32_arm_symbian_get_sec_type_attr): New function.
31 (elf_backend_special_sections): Don't define.
32 (elf_backend_get_sec_type_attr): Define.
33 * elf32-m32r.c: Similarly to elf32-arm.c.
34 * elf32-m68hc11.c: Likewise.
35 * elf32-m68hc12.c: Likewise.
36 * elf32-mcore.c: Likewise.
37 * elf32-sh64.c: Likewise.
38 * elf32-v850.c: Likewise.
39 * elf32-xtensa.c: Likewise.
40 * elf64-alpha.c: Likewise.
41 * elf64-hppa.c: Likewise.
42 * elf64-ppc.c: Likewise.
43 * elf64-sh64.c: Likewise.
44 * elfxx-ia64.c: Likewise.
45 * elfxx-mips.c: Likewise.
46 * elf32-ppc.c: Likewise.
47 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
48 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
49 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
50 (elf_backend_get_sec_type_attr): Define.
51 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
52 (elf_backend_special_sections): Don't define.
55 2005-07-01 Nick Clifton <nickc@redhat.com>
57 * cpu-d10v.c: Update to ISO C90 style function declarations and
59 * cpu-d30v.c: Likewsie.
60 * cpu-i370.c: Likewsie.
61 * cpu-xstormy16.c: Likewsie.
62 * elf32-arc.c: Likewsie.
63 * elf32-d10v.c: Likewsie.
64 * elf32-d30v.c: Likewsie.
65 * elf32-dlx.c: Likewsie.
66 * elf32-i370.c: Likewsie.
67 * elf32-i960.c: Likewsie.
68 * elf32-ip2k.c: Likewsie.
69 * elf32-m32r.c: Likewsie.
70 * elf32-mcore.c: Likewsie.
71 * elf32-openrisc.c: Likewsie.
72 * elf32-or32.c: Likewsie.
73 * elf32-pj.c: Likewsie.
74 * elf32-v850.c: Likewsie.
75 * elf32-xstormy16.c: Likewsie.
77 2005-07-01 Alan Modra <amodra@bigpond.net.au>
79 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
81 (elf64_alpha_create_dynamic_sections): Always make new sections
82 by using bfd_make_section_anyway_with_flags. Check that .got not
84 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
87 2005-06-30 Alan Modra <amodra@bigpond.net.au>
89 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
90 _SDA_BASE_ and _SDA2_BASE_ symbols.
91 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
92 sym if not def_regular.
93 (_bfd_elf_provide_section_bound_symbols): Similarly.
95 2005-06-30 Ben Elliston <bje@gnu.org>
97 * config.bfd: Mark as obsolete:
102 2005-06-29 Alan Modra <amodra@bigpond.net.au>
104 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
105 .eh_frame specially..
106 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
107 Don't recheck sections we have already marked.
108 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
109 * section.c (struct bfd_section): Add gc_mark_from_eh.
110 (STD_SECTION): Adjust.
111 * ecoff.c (bfd_debug_section): Adjust.
112 * bfd-in2.h: Regenerate.
114 2005-06-29 Alan Modra <amodra@bigpond.net.au>
116 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
117 not been processed by check_relocs.
119 2005-06-29 Paul Brook <paul@codesourcery.com>
121 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
122 * bfd-in2.h: Regenerate.
123 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
125 * elflink.c (bfd_elf_set_symbol): Add section argument.
126 (_bfd_elf_provide_symbol): Ditto.
127 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
129 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
131 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
133 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
134 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
135 (struct elf32_hppa_link_hash_table): Use etab and bstab.
136 (stub_hash_newfunc): Use hh.
137 (hppa_link_hash_newfunc): Use hsh_cache.
138 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
139 (elf32_hppa_link_hash_table_free): Use bstab.
140 (hppa_stub_name): Use eh.
141 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
142 (hppa_add_stub): Use bstab.
143 (hppa_type_of_stub): Use eh.
144 (hppa_build_one_stub): Use hh and bh_root.
145 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
146 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
147 (elf32_hppa_gc_sweep_hook): Use hdh_next.
148 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
149 (allocate_plt_static): Use etab.
150 (allocate_dynrelocs): Use etab, and hdh_next.
151 (readonly_dynrelocs): Use hdh_next.
152 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
153 (get_local_syms): Use eh, bstab, and hh.
154 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
155 (elf32_hppa_set_gp): Use etab.
156 (elf32_hppa_build_stubs): Use bstab.
157 (final_link_relocate): Use eh, bh_root.
158 (elf32_hppa_relocate_section): Use elf, etab.
159 (elf32_hppa_finish_dynamic_sections): Use etab.
161 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
163 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
166 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
168 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
169 (hppa_stub_hash_entry): Define.
170 (stub_hash_newfunc): Rename variables.
171 (hppa_link_hash_newfunc): Likewise.
172 (elf32_hppa_link_hash_table_free): Likewise.
173 (hppa_stub_name): Likewise.
174 (hppa_get_stub_entry): Likewise.
175 (hppa_add_stub): Likewise.
176 (hppa_type_of_stub): Likewise.
177 (hppa_build_one_stub): Likewise.
178 (hppa_size_one_stub): Likewise.
179 (elf32_hppa_create_dynamic_sections): Likewise.
180 (elf32_hppa_copy_indirect_symbol): Likewise.
181 (elf32_hppa_check_relocs): Likewise.
182 (elf32_hppa_gc_mark_hook): Likewise.
183 (elf32_hppa_gc_sweep_hook): Likewise.
184 (elf32_hppa_grok_psinfo): Likewise.
185 (elf32_hppa_hide_symbol): Likewise.
186 (elf32_hppa_adjust_dynamic_symbol): Likewise.
187 (allocate_dynrelocs): Likewise.
188 (clobber_millicode_symbols): Likewise.
189 (readonly_dynrelocs): Likewise.
190 (elf32_hppa_size_dynamic_sections): Likewise.
191 (get_local_syms): Likewise.
192 (elf32_hppa_size_stubs): Likewise.
193 (hppa_record_segment_addr): Likewise.
194 (final_link_relocate): Likewise.
195 (elf32_hppa_relocate_section): Likewise.
196 (elf32_hppa_finish_dynamic_symbol): Likewise.
198 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
201 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
203 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
204 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
205 * elf32-cris.c (cris_elf_check_relocs): Likewise.
206 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
207 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
208 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
209 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
210 * elf32-i370.c (i370_elf_check_relocs): Likewise.
211 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
212 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
213 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
214 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
215 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
216 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
217 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
218 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
219 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
220 * elf32-s390.c (elf_s390_check_relocs): Likewise.
221 * elf32-sh.c (sh_elf_check_relocs): Likewise.
222 * elf32-v850.c (v850_elf_check_relocs): Likewise.
223 * elf32-vax.c (elf_vax_check_relocs): Likewise.
224 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
225 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
226 * elf64-s390.c (elf_s390_check_relocs): Likewise.
227 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
228 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
229 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
231 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
234 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
237 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
240 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
241 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
243 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
245 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
246 BFD_RELOC_X86_64_GOTPC32.
247 * bfd-in2.h: Regenerated.
249 2005-06-17 Jakub Jelinek <jakub@redhat.com>
251 * elf.c (bfd_section_from_shdr): Kill bogus warning.
253 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
254 symbol, relocation, group or versym sections.
256 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
258 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
259 doesn't point into the section.
261 2005-06-17 Jan Beulich <jbeulich@novell.com>
263 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
264 and BFD_RELOC_X86_64_GOTPC32.
265 * libbfd.h (bfd_reloc_code_real_names): Likewise.
266 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
267 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
268 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
269 and R_X86_64_GOTPC32.
270 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
271 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
272 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
273 (elf64_x86_64_relocate_section): Likewise.
274 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
276 2005-06-15 Mark Kettenis <kettenis@gnu.org>
278 * archive.c: Include "libiberty.h".
280 2005-06-15 Nick Clifton <nickc@redhat.com>
282 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
283 produced by the GreenHills toolchain can be assimilated.
285 2005-06-14 Steve Ellcey <sje@cup.hp.com>
287 * som.c (som_find_inliner_info): New.
289 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
291 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
293 2005-06-14 Jakub Jelinek <jakub@redhat.com>
295 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
296 Prevent endless recursion on broken objects.
298 * archive.c (do_slurp_coff_armap): Check for overflows.
300 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
302 * elfcode.h (elf_write_relocs): Do nothing if there are no
305 2005-06-10 Alan Modra <amodra@bigpond.net.au>
307 * dwarf2.c (decode_line_info): Revert last change. Instead set
308 initial low_pc to -1 to avoid need to test whether loc_pc has
311 2005-06-09 Christopher Faylor <cgf@timesys.com>
313 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
314 either SEC_ALLOC OR SEC_LOAD.
316 2005-06-09 Christopher Faylor <cgf@timesys.com>
318 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
319 section header. Do not add STYP_NOLOAD since it does not appear to be
322 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
325 * dwarf2.c (lookup_address_in_line_info_table): Restore code
326 handling NULL function info, removed with 2005-04-03 change.
328 2005-06-08 Mark Mitchell <mark@codesourcery.com>
330 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
332 2005-06-09 Alan Modra <amodra@bigpond.net.au>
334 * elflink.c (elf_mark_used_section): Delete.
335 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
336 * reloc.c (bfd_mark_used_section): New function.
337 (bfd_generic_gc_sections): Call bfd_mark_used_section.
339 2005-06-08 Alan Modra <amodra@bigpond.net.au>
341 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
344 2005-06-07 Mark Mitchell <mark@codesourcery.com>
346 * opncls.c (bfd_fdopenr): Add missing break statements.
348 2005-06-07 Mark Mitchell <mark@codesourcery.com>
350 * opncls.c (bfd_fopen): New API.
352 (bfd_fdopenr): Likewise.
353 * bfd-in2.h: Regenerated.
355 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
356 Michael Snyder <msnyder@redhat.com>
357 Stan Cox <scox@redhat.com>
359 * Makefile.am (ALL_MACHINES): Add ms1 support.
360 (ALL_MACHINES_CFILES): Same.
361 (BFD32_BACKENDS): Same.
362 (BFD32_BACKENDS_CFILES): Same.
364 * Makefile.in: Regenerate.
366 * archures.c (bfd_architecture): Add ms1 entries.
367 Externalize bfd_ms1_arch.
368 (bfd_archures_list): Add bfd_ms1_arch.
370 * bfd-in2.h: Regenerate.
372 * cpu-ms1.c: New file.
374 * elf32-ms1.c: New file.
376 * targets.c: Define extern of bfd_elf32_ms1_vec.
377 Add bfd_elf32_ms1_vec to _bfd_target_vector.
379 * configure.in: Add bfd_elf32_ms1_vec case.
381 * configure: Regenerate.
383 * config.bfd: Add ms1-*-elf to table.
385 2005-06-07 Zack Weinberg <zack@codesourcery.com>
387 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
389 2005-06-07 Alan Modra <amodra@bigpond.net.au>
391 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
392 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
394 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
397 * bfd.c (bfd_find_line): New.
399 * dwarf2.c (comp_unit): Add variable_table.
400 (funcinfo): Add file, line, and sec.
402 (lookup_symbol_in_function_table): New.
403 (lookup_symbol_in_variable_table): New.
404 (scan_unit_for_functions): Renamed to ...
405 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
407 (comp_unit_find_nearest_line): Updated.
408 (comp_unit_find_line): New.
409 (_bfd_dwarf2_find_line): New.
411 * elf-bfd.h (_bfd_elf_find_line): New.
412 (_bfd_generic_find_line): New. Defined.
414 * elf.c (_bfd_elf_find_line): New.
416 * libbfd-in.h (_bfd_dwarf2_find_line): New.
417 (_bfd_generic_find_line): New.
419 * bfd-in2.h: Regenerated.
420 * libbfd.h: Likewise.
422 * libbfd.c (_bfd_generic_find_line): New.
424 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
425 with _bfd_generic_find_line.
426 (bfd_target): Add _bfd_find_line.
428 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
430 * dwarf2.c (decode_line_info): Properly set low_pc.
432 2005-06-06 Alan Modra <amodra@bigpond.net.au>
434 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
435 case, include addend when indexing .opd section map.
436 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
437 clear opd_adjust array if no_opd_opt set. Tidy code.
438 Ignore zero size .opd. Check bfd_alloc return value.
439 (ppc_stub_name): Return immediately on bfd_malloc fail.
440 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
442 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
444 * dwarf2.c (comp_unit): Fix a typo in comment.
446 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
448 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
449 (reloc_type_lookup): Dito.
450 (elf_vax_discard_copies): Dito.
451 (elf_vax_instantiate_got_entries): Dito.
452 (elf_vax_link_hash_traverse): Dito.
453 (elf_vax_link_hash_newfunc): Dito.
454 (elf_vax_link_hash_table_create): Dito.
455 (elf32_vax_set_private_flags): Dito.
456 (elf32_vax_merge_private_bfd_data): Dito.
457 (elf32_vax_print_private_bfd_data): Dito.
458 (elf_vax_check_relocs): Dito.
459 (elf_vax_gc_mark_hook): Dito.
460 (elf_vax_gc_sweep_hook): Dito.
461 (elf_vax_size_dynamic_sections): Dito.
462 (elf_vax_discard_copies): Dito.
463 (elf_vax_instantiate_got_entries): Dito.
464 (elf_vax_relocate_section): Dito.
465 (elf_vax_finish_dynamic_symbol): Dito.
466 (elf_vax_finish_dynamic_sections): Dito.
467 (elf_vax_hash_table): Break-up of line isn't needed.
468 (elf_vax_check_relocs): Remove leading whitespace
469 (elf_vax_relocate_section): Remove redundant whitespace
470 (elf_vax_link_hash_newfunc): Don't cast NULL.
471 (elf_vax_link_hash_table_create): Dito.
472 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
474 2005-06-03 Alan Modra <amodra@bigpond.net.au>
477 * configure.in: Bump version
478 * configure: Regenerate.
479 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
480 discarded section sym refs and kill linker output.
481 * simple.c (simple_dummy_einfo): New function.
482 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
484 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
487 2005-06-02 Alan Modra <amodra@bigpond.net.au>
489 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
490 restrictive of func code and func descr for undefined syms as well
493 2005-05-31 Jim Blandy <jimb@redhat.com>
495 * Makefile.am: Regenerate dependencies with 'make dep-am'.
496 * Makefile.in: Regenerate.
498 2005-05-31 Richard Henderson <rth@redhat.com>
500 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
501 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
502 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
503 (elf64_alpha_want_plt): Update to match.
504 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
505 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
507 2005-05-31 Zack Weinberg <zack@codesourcery.com>
509 * elf32-arm.c (elf32_arm_reloc_type_lookup)
510 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
511 Use ISO C90 function declaration style.
513 2005-05-31 James E Wilson <wilson@specifixinc.com>
515 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
516 header PF_R flag on PT_LOAD segments.
518 2005-05-30 Richard Henderson <rth@redhat.com>
520 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
521 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
523 2005-05-29 Richard Henderson <rth@redhat.com>
525 * configure.in (--enable-secureplt): New.
526 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
527 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
528 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
529 (elf64_alpha_use_secureplt): New.
530 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
531 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
532 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
533 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
534 (struct alpha_elf_link_hash_entry): Add plt_offset.
535 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
536 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
537 (PLT_ENTRY_WORD3): Remove.
538 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
539 on .plt and create .got.plt.
540 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
541 (get_got_entry): Initialize plt_offset.
542 (elf64_alpha_want_plt): New.
543 (elf64_alpha_check_relocs): Use it.
544 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
546 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
548 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
550 (elf64_alpha_size_plt_section): Size .got.plt section.
551 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
553 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
554 Add PLTRO DYNAMIC entry.
555 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
556 (elf64_alpha_finish_dynamic_sections): Likewise.
558 2005-05-28 David Daney <ddaney@avtrex.com>
560 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
561 calculation of DT_RELSZ to occur after all dynamic relocations
564 2005-05-28 Eli Zaretskii <eliz@gnu.org>
566 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
567 * config.in, configure: Regenerate.
569 2005-05-26 Mark Kettenis <kettenis@gnu.org>
570 Maciej W. Rozycki <macro@linux-mips.org>
572 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
573 stop processing of options if one of invalid size is
575 (_bfd_mips_elf_section_from_shdr): Likewise.
576 (_bfd_mips_elf_fake_sections): Reset the type of empty special
579 2005-05-26 Richard Henderson <rth@redhat.com>
581 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
582 plt_old_section, plt_old_value.
583 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
584 (elf64_alpha_size_plt_section_1): Don't use it.
586 2005-05-26 Jakub Jelinek <jakub@redhat.com>
588 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
589 first shdr has sh_size == 0. Fail if e_shnum is large to cause
590 arithmetic overflow when allocating the i_shdr array.
591 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
593 2005-05-25 Richard Henderson <rth@redhat.com>
595 * elf64-alpha.c: Update all function definitions to ISO C. Remove
596 all function prototypes; rearrange functions into def-use order.
598 2005-05-25 Richard Henderson <rth@redhat.com>
600 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
601 in the presence of deleting elements.
602 (elf64_alpha_size_got_sections): Zero dead got section size.
604 2005-05-23 Fred Fish <fnf@specifixinc.com>
606 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
607 (struct funcinfo): Add caller_func, caller_file, caller_line.
608 tag, and nesting_level members.
609 (lookup_address_in_function_table): Change first passed parameter
610 from "struct funcinfo *" to "struct comp_unit *".
611 (lookup_address_in_function_table): Dereference unit to find function
613 (lookup_address_in_function_table): Traverse the function list to
614 create a chain of inlined functions back to the first non inlined
616 (scan_unit_for_functions): Remember tag and nesting level. Handle
617 DW_AT_call_file and DW_AT_call_line.
618 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
619 call to pass unit pointer instead of function table pointer. For
620 inlined functions, save pointer to the inliner chain.
621 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
622 (_bfd_dwarf2_find_inliner_info): New function that returns information
623 from the inliner chain after a call to bfd_find_nearest_line.
625 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
626 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
627 NAME##_find_inliner_info.
628 (bfd_target): Add _bfd_find_inliner_info.
629 * bfd-in2.h: Regenerate.
631 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
632 macro that always returns bfd_false.
633 (_bfd_dwarf2_find_inliner_info): Declare.
634 * libbfd.h: Regenerate.
636 * elf32-arm.c (elf32_arm_find_inliner_info): New function
637 that calls _bfd_dwarf2_find_inliner_info.
638 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
640 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
641 that calls _bfd_dwarf2_find_inliner_info.
642 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
643 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
644 _bfd_mips_elf_find_inliner_info.
645 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
646 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
648 * elf.c (_bfd_elf_find_inliner_info): New function that calls
649 _bfd_dwarf2_find_inliner_info.
650 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
651 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
652 _bfd_elf_find_inliner_info.
654 * coffgen.c (coff_find_inliner_info): New function that
655 calls _bfd_dwarf2_find_inliner_info.
656 * libcoff-in.h (coff_find_inliner_info): Declare.
657 * libcoff.h: Regenerate.
658 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
659 (pmac_xcoff_vec) Ditto.
660 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
661 (aix5coff64_vec): Ditto.
663 * aout-target.h (MY_find_inliner_info): Define as
664 _bfd_nosymbols_find_inliner_info.
665 * aout-tic30.c (MY_find_inliner_info): Ditto.
666 * binary.c (binary_find_inliner_info): Ditto.
667 * i386msdos.c (msdos_find_inliner_info): Ditto.
668 * ihex.c (ihex_find_inliner_info): Ditto.
669 * libaout.h (aout_32_find_inliner_info): Ditto.
670 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
671 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
672 * mmo.c (mmo_find_inliner_info): Ditto.
673 * nlm-target.h (nlm_find_inliner_info): Ditto.
674 * pef.c (bfd_pef_find_inliner_info): Ditto.
675 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
676 * srec.c (srec_find_inliner_info): Ditto.
677 * tekhex.c (tekhex_find_inliner_info): Ditto.
678 * versados.c (versados_find_inliner_info): Ditto.
679 * xsym.c (bfd_sym_find_inliner_info): Ditto.
681 * ieee.c (ieee_find_inliner_info): New function that always
683 * oasys.c (oasys_find_inliner_info): Ditto.
684 * vms.c (vms_find_inliner_info): Ditto.
686 2005-05-24 Alan Modra <amodra@bigpond.net.au>
688 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
689 force old plt layout.
691 2005-05-22 Richard Henderson <rth@redhat.com>
693 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
695 (elf64_alpha_check_relocs): Likewise.
696 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
697 non-allocated sections.
699 2005-05-22 Richard Henderson <rth@redhat.com>
701 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
702 undefweak to use zero register. Call elf64_alpha_relax_got_load
703 if not all uses removed.
704 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
705 (elf64_alpha_relax_section): Handle undefweak symbols.
706 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
707 (elf64_alpha_size_rela_got_1): Likewise.
708 (elf64_alpha_relocate_section): Likewise.
710 2005-05-22 Richard Henderson <rth@redhat.com>
712 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
713 on SEC_CODE sections.
715 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
717 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
719 (som_write_space_strings): Change type of tmp_space and p to char *.
720 (som_write_symbol_strings): Likewise. Also change type of comp to
722 (som_begin_writing): Change type of strings_size to unsigned int.
723 (som_finish_writing): Likewise.
724 (som_slurp_reloc_table): Change type of external_relocs to unsigned
726 * som.h (struct som_section_data_struct): Change type of reloc_stream
727 field to unsigned char *.
729 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
731 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
732 copy relocations for VxWorks.
734 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
736 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
738 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
739 (ppc_elf_check_relocs): Set has_sda_refs.
740 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
741 copy relocations. Use has_sda_refs to place variables in .sbss.
742 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
745 2005-05-20 Bob Wilson <bob.wilson@acm.org>
747 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
748 xtensa_default_isa is initialized.
750 2005-05-20 Alan Modra <amodra@bigpond.net.au>
752 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
753 for second and subsequent list entries. Only allocate multiple
754 glink stubs when shared or pie.
755 (ppc_elf_finish_dynamic_symbol): Break out early when only one
756 glink stub is needed.
758 2005-05-19 Zack Weinberg <zack@codesourcery.com>
760 * Makefile.am: Have 'all' depend on 'info'.
761 * Makefile.in: Regenerate.
763 2005-05-19 Alan Modra <amodra@bigpond.net.au>
765 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
766 init_offset. Add init_got_refcount, init_plt_refcount,
767 init_got_offset and init_plt_offset.
768 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
769 (_bfd_elf_link_hash_hide_symbol): Likewise.
770 (_bfd_elf_link_hash_table_init): Likewise.
771 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
772 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
773 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
774 (bfd_elf_size_dynamic_sections): Likewise.
775 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
776 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
777 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
778 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
779 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
780 (struct plt_entry): New.
781 (ppc_elf_link_hash_table_create): Set new init_plt fields.
782 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
783 use _bfd_elf_link_hash_copy_indirect.
784 (update_plt_info, find_plt_ent): New functions.
785 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
786 and adjust for use of plt list rather than refcount.
787 (ppc_elf_gc_sweep_hook): Likewise.
788 (ppc_elf_tls_optimize): Likewise.
789 (ppc_elf_adjust_dynamic_symbol): Likewise.
790 (allocate_dynrelocs): Likewise.
791 (ppc_elf_relax_section): Likewise.
792 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
793 when performing a relocatable link.
794 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
795 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
798 2005-05-19 Alan Modra <amodra@bigpond.net.au>
800 * elf.c (assign_file_positions_for_segments): Use maximum of
801 maxpagesize and section alignment when adjusting initial
802 segment offset and section offsets.
804 2005-05-18 Zack Weinberg <zack@codesourcery.com>
806 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
809 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
811 * elf.c (group_signature): Undo the last change. Check if the
812 symbol table section is correct.
814 2005-05-17 Zack Weinberg <zack@codesourcery.com>
816 * elf32-arm.c: Wherever possible, use official reloc names
818 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
819 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
820 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
821 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
822 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
823 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
824 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
825 Add many new relocations from AAELF.
826 (elf32_arm_howto_from_type): Update to match.
827 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
828 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
829 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
830 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
831 (elf32_arm_final_link_relocate): Add support for
832 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
833 case entries redundant with default.
835 * reloc.c: Reorganize ARM relocations. Add Thumb
836 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
837 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
838 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
839 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
840 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
841 * bfd-in2.h, libbfd.h: Regenerate.
843 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
845 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
847 * format.c (bfd_check_format_matches): Set output_has_begun
849 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
850 special case for both_direction.
852 2005-05-17 Nick Clifton <nickc@redhat.com>
854 * elf.c (group_signature): Check for a group section which is
855 actually a (corrupt) symbol table section in disguise and prevent
856 an infinite loop from occurring.
858 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
860 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
863 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
865 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
866 predicate on slot 0 only if slot 0 isn't br.
868 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
871 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
872 empty sdynbss section.
873 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
875 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
877 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
880 2005-05-17 Alan Modra <amodra@bigpond.net.au>
882 * elf32-ppc.c (LIS_11. LIS_12): Define.
883 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
884 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
885 for --data-plt when building non-pie executables.
887 2005-05-17 Nick Clifton <nickc@redhat.com>
889 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
890 the situation where a symbols's section is not known but a section
891 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
894 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
895 the presence of a symbol table to just before the symbol table is
898 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
901 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
902 (elfNN_ia64_relax_section): Use it.
904 2005-05-14 Mark Kettenis <kettenis@gnu.org>
906 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
909 2005-05-14 Alan Modra <amodra@bigpond.net.au>
911 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
913 (ppc_elf_finish_dynamic_sections): Likewise.
915 2005-05-13 Fred Fish <fnf@specifixinc.com>
917 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
920 2005-05-13 Bob Wilson <bob.wilson@acm.org>
922 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
923 periods in linkonce_kind values.
925 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
927 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
928 against protected function when building executable.
930 2005-05-12 Alan Modra <amodra@bigpond.net.au>
932 * elf32-ppc.c (LWZU_0_X_11): Delete.
933 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
934 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
935 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
937 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
939 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
940 Generate .glink branch table and updated stubs.
942 2005-05-11 Alan Modra <amodra@bigpond.net.au>
944 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
945 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
946 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
947 (CROR_151515, CROR_313131): Delete.
948 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
949 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
950 LWZU_0_X_11): Define.
951 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
952 and R_PPC_REL16_HA entries.
953 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
954 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
955 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
956 new_plt, and old_plt.
957 (ppc_elf_create_dynamic_sections): Create .glink section.
958 (ppc_elf_check_relocs): Set new_plt and old_plt.
959 (ppc_elf_select_plt_layout): New function.
960 (ppc_elf_tls_setup): Set plt output section elf type and flags.
961 (allocate_got): Handle differences between old and new got layout.
962 (allocate_dynrelocs): Likewise for plt.
963 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
964 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
965 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
966 destination of R_PPC_PLTREL24 relocs.
967 (ppc_elf_relocate_section): Handle new relocs and changed destination
969 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
970 differences in layout.
971 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
972 put a blrl in new got. Write glink contents.
973 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
974 * libbfd.h: Regenerate.
975 * bfd-in2.h: Regenerate.
977 2005-05-11 Andreas Schwab <schwab@suse.de>
979 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
982 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
984 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
985 section if SEC_ALLOC isn't set.
987 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
989 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
990 * acinclude.m4: Don't sinclude accross.m4.
991 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
993 2005-05-09 Alan Modra <amodra@bigpond.net.au>
995 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
996 (ppc64_elf_add_symbol_hook): Set has_dotsym.
997 (ppc64_elf_check_directives): Only process syms when has_dotsym.
998 (func_desc_adjust): Hide fake function descriptors when function
999 code entry is defined.
1000 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1002 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1004 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1006 2005-05-08 Dave Korn <dave.korn@artimi.com>
1008 * coff-tic80.c: Undefine _CONST after system headers to prevent
1009 clash with tic80-specific definition in include/coff/tic80.h
1011 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1014 * elflink.c (elf_link_output_extsym): Use output_bfd if
1015 h->root.u.def.section is bfd_abs_section_ptr when reporting
1018 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1020 * elf-bfd.h (elf_backend_data): Update special_sections to
1021 array of pointer to bfd_elf_special_section.
1022 * elf.c (special_sections): Likewise.
1023 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1024 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1025 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1026 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1027 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1028 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1029 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1030 * elf32-v850.c (v850_elf_special_sections): Likewise.
1031 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1032 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1033 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1034 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1035 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1036 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1037 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1038 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1040 * elf.c (get_special_section): Updated.
1042 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1044 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1045 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1046 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1048 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1049 * elf32-frv.c (_frv_create_got_section): Likewise.
1050 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1051 (elf_backend_got_symbol_offset): Don't define.
1052 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1053 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1055 (ppc_elf_create_got): Tidy.
1056 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1057 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1058 (ppc_elf_gc_sweep_hook): Likewise.
1059 (ppc_elf_relocate_section): Likewise.
1060 (ppc_elf_finish_dynamic_symbol): Likewise.
1061 (allocate_got): New function.
1062 (allocate_dynrelocs): Use allocate_got.
1063 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1064 so that local got can refcount it. Set got_header_size.
1065 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1067 (ppc_elf_finish_dynamic_sections): Likewise.
1068 (elf_backend_got_symbol_offset): Don't define.
1069 (elf_backend_got_header_size): Ditto.
1071 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1073 * configure.in (ACX_HEADER_STRING): New.
1074 * configure: Regenerate.
1075 * config.in: Regenerate.
1076 * sysdep.h (STRING_WITH_STRINGS): Use.
1078 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1080 * elf.c (_bfd_elf_close_and_cleanup): Only call
1081 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1083 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1085 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1086 "__bss_start" instead of "_edata" as fallback.
1088 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1090 * bfd-in2.h: Regenerated.
1092 2005-05-05 Paul Brook <paul@codesourcery.com>
1094 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1095 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1097 * configure: Regenerate.
1098 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1099 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1100 (elf32-i386.lo): Depend on elf-vxworks.h.
1101 (elf-vxworks.lo): New rule.
1102 * Makefile.in: Regenerate.
1103 * elf-bfd.h (elf_backend_data): Update type of
1104 elf_backend_emit_relocs.
1105 (_bfd_elf_link_output_relocs): Update prototype.
1106 * elflink.c (_bfd_elf_link_output_relocs): Always use
1107 bed->elf_backend_emit_relocs when outputting relocations.
1108 * elfxx-target.h (elf_backend_emit_relocs): Default to
1109 _bfd_elf_link_output_relocs.
1110 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1111 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1112 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1113 (elf_i386_plt0_entry): Remove padding.
1114 (elf_i386_pic_plt0_entry): Ditto.
1115 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1116 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1117 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1118 plt0_pad_byte fields.
1119 (elf_i386_link_hash_table_create): Zero them.
1120 (elf_i386_create_dynamic_sections): Create static relocation section.
1121 (allocate_dynrelocs): Allocate space for static PLT relocations.
1122 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1123 symbols. Give PLT symbols function type. Don't strip PLT sections
1124 if we have exported symbols from them.
1125 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1126 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1128 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1129 Add relocation for GOT location. Fill in PLT static relocations.
1130 (elf_i386_vxworks_link_hash_table_create): New function.
1131 (elf_i386_vxworks_link_output_symbol_hook): New function.
1132 * elf-vxworks.h: New file.
1134 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1136 * section.c (bfd_make_section_anyway_with_flags): New.
1137 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1138 (bfd_make_section_with_flags): New.
1139 (bfd_make_section): Call bfd_make_section_with_flags.
1141 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1142 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1143 instead of bfd_make_section/bfd_make_section and don't call
1144 bfd_set_section_flags.
1145 (mn10300_elf_check_relocs): Likewise.
1146 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1147 * elf32-arm.c (create_got_section): Likewise.
1148 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1149 (elf32_arm_check_relocs): Likewise.
1150 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1151 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1152 (_frv_create_got_section): Likewise.
1153 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1154 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1155 (elf32_hppa_check_relocs): Likewise.
1156 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1157 (i370_elf_check_relocs): Likewise.
1158 * elf32-i386.c (create_got_section): Likewise.
1159 (elf_i386_check_relocs): Likewise.
1160 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1161 (create_got_section): Likewise.
1162 (m32r_elf_create_dynamic_sections): Likewise.
1163 (m32r_elf_check_relocs): Likewise.
1164 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1165 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1166 (ppc_elf_create_dynamic_sections): Likewise.
1167 (ppc_elf_add_symbol_hook): Likewise.
1168 (ppc_elf_check_relocs): Likewise.
1169 * elf32-s390.c (create_got_section): Likewise.
1170 (elf_s390_check_relocs): Likewise.
1171 * elf32-sh.c (create_got_section): Likewise.
1172 (sh_elf_create_dynamic_sections): Likewise.
1173 (sh_elf_check_relocs): Likewise.
1174 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1175 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1176 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1177 (add_extra_plt_sections): Likewise.
1178 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1179 (elf64_alpha_create_got_section): Likewise.
1180 (elf64_alpha_create_dynamic_sections): Likewise.
1181 (elf64_alpha_check_relocs): Likewise.
1182 * elf64-hppa.c (get_reloc_section): Likewise.
1183 (get_opd): Likewise.
1184 (get_plt): Likewise.
1185 (get_dlt): Likewise.
1186 (get_stub): Likewise.
1187 (elf64_hppa_create_dynamic_sectionso): Likewise.
1188 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1189 * elf64-ppc.c (create_linkage_sections): Likewise.
1190 (ppc64_elf_check_relocs): Likewise.
1191 * elf64-s390.c (create_got_section): Likewise.
1192 (elf_s390_check_relocs): Likewise.
1193 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1194 (sh64_elf64_create_dynamic_sections): Likewise.
1195 * elf64-x86-64.c (create_got_section): Likewise.
1196 (elf64_x86_64_check_relocs): Likewise.
1197 * elflink.c (_bfd_elf_create_got_section): Likewise.
1198 (_bfd_elf_link_create_dynamic_sections): Likewise.
1199 (elf_link_add_object_symbols): Likewise.
1200 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1201 (elfNN_ia64_create_dynamic_sections): Likewise.
1202 (get_fptr): Likewise.
1203 (get_pltoff): Likewise.
1204 (get_reloc_section): Likewise.
1205 (elfNN_ia64_object_p): Likewise.
1206 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1207 (mips_elf_create_compact_rel_section): Likewise.
1208 (mips_elf_create_got_section): Likewise.
1209 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1210 * elfxx-sparc.c (create_got_section): Likewise.
1211 (_bfd_sparc_elf_check_relocs): Likewise.
1213 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1214 on linker created sections.
1216 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1219 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1220 script on executable.
1222 2005-05-05 John Levon <levon@movementarian.org>
1224 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1225 allocated memory before returning.
1226 (decode_line_info): Likewise.
1227 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1228 allocated by functions in this file.
1229 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1230 * elf.c (_bfd_elf_close_and_cleanup): Call
1231 _bfd_dwarf2_cleanup_debug_info.
1233 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1235 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1236 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1237 * configure, config.in, Makefile.in: Regenerate.
1238 * sysdep.h (stpcpy): Revert last change.
1240 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
1242 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1244 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1246 * elfxx-ia64.c (ARCH_SIZE): New.
1247 (LOG_SECTION_ALIGN): Likewise.
1248 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1249 align relocation sections.
1250 (get_fptr): Likewise.
1251 (get_reloc_section): Likewise.
1252 (elfNN_ia64_tprel_base): Likewise.
1253 (elfNN_ia64_check_relocs): Support 32bit relocations.
1254 (allocate_global_fptr_got): Likewise.
1255 (allocate_dynrel_entries): Likewise.
1256 (set_got_entry): Likewise.
1257 (set_pltoff_entry): Likewise.
1258 (elfNN_ia64_relocate_section): Likewise.
1260 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1262 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1263 * configure: Regenerate.
1264 * config.in: Likewise.
1266 * sysdep.h (stpcpy): New.
1268 2005-05-04 Nick Clifton <nickc@redhat.com>
1270 * Update the address and phone number of the FSF organization in
1271 the GPL notices in the following files:
1272 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1273 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1274 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1275 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1276 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1277 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1278 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1279 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1280 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1281 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1282 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1283 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1284 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1285 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1286 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1287 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1288 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1289 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1290 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1291 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1292 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1293 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1294 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1295 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1296 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1297 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1298 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1299 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1300 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1301 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1302 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1303 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1304 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1305 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1306 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1307 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1308 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1309 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1310 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1311 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1312 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1313 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1314 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1315 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1316 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1317 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1318 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1319 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1320 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1321 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1322 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1323 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1324 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1325 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1326 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1327 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1328 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1329 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1330 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1331 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1332 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1333 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1334 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1335 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1336 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1337 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1338 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1339 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1340 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1341 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1344 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1346 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1347 * bfd-in2.h: Regenerated.
1349 * elflink.c (bfd_elf_set_symbol): New.
1350 (_bfd_elf_provide_symbol): Call it.
1351 (_bfd_elf_provide_section_bound_symbols): New.
1353 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1355 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1356 at the end, if a strong definition has already been seen.
1358 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1360 * section.c (struct bfd_section): Replace link_order_head and
1361 link_order_tail with map_head and map_tail union.
1362 (STD_SECTION): Update.
1363 (_bfd_strip_section_from_output): Delete.
1364 * aoutx.h: Update throughout for above changes.
1365 * coff-ppc.c: Likewise.
1366 * cofflink.c: Likewise.
1367 * ecoff.c: Likewise.
1368 * elf-eh-frame.c: Likewise.
1369 * elf-m10300.c: Likewise.
1371 * elf32-arm.c: Likewise.
1372 * elf32-cris.c: Likewise.
1373 * elf32-hppa.c: Likewise.
1374 * elf32-i386.c: Likewise.
1375 * elf32-m32r.c: Likewise.
1376 * elf32-m68hc1x.c: Likewise.
1377 * elf32-m68k.c: Likewise.
1378 * elf32-ppc.c: Likewise.
1379 * elf32-s390.c: Likewise.
1380 * elf32-sh.c: Likewise.
1381 * elf32-vax.c: Likewise.
1382 * elf32-xtensa.c: Likewise.
1383 * elf64-alpha.c: Likewise.
1384 * elf64-hppa.c: Likewise.
1385 * elf64-ppc.c: Likewise.
1386 * elf64-s390.c: Likewise.
1387 * elf64-sh64.c: Likewise.
1388 * elf64-x86-64.c: Likewise.
1389 * elflink.c: Likewise.
1390 * elfxx-ia64.c: Likewise.
1391 * elfxx-mips.c: Likewise.
1392 * elfxx-sparc.c: Likewise.
1393 * linker.c: Likewise.
1394 * merge.c: Likewise.
1395 * pdp11.c: Likewise.
1396 * xcofflink.c: Likewise.
1397 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1398 out from bfd_elf_size_dynamic_sections.
1399 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1400 * bfd-in2.h: Regenerate.
1402 2005-05-04 Alan Modra <amodra@bigpond.net.au>
1404 * section.c (bfd_section_list_remove): Don't clear s->next.
1405 (bfd_section_list_append): Always init s->prev.
1406 (bfd_section_list_prepend): Define.
1407 (bfd_section_list_insert_after): Minor optimization.
1408 (bfd_section_removed_from_list): Rewrite.
1409 * elf.c (assign_section_numbers): Simplify list traversal now that
1410 bfd_section_list_remove doesn't destroy removed section next ptr.
1411 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1412 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1413 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1414 * bfd-in2.h: Regenerate.
1416 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1418 * bfd.c (bfd): Remove section_tail and add section_last.
1419 (bfd_preserve): Likewise.
1420 (bfd_preserve_save): Likewise.
1421 (bfd_preserve_restore): Likewise.
1422 * opncls.c (_bfd_new_bfd): Likewise.
1424 * coffcode.h (coff_compute_section_file_positions): Updated.
1425 (coff_compute_section_file_positions): Likewise.
1426 * elf.c (assign_section_numbers): Likewise.
1427 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1428 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1429 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1430 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1431 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1432 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1434 * ecoff.c (bfd_debug_section): Initialize prev.
1436 * section.c (bfd_section): Add prev.
1437 (bfd_section_list_remove): Updated.
1438 (bfd_section_list_append): New.
1439 (bfd_section_list_insert_after): New.
1440 (bfd_section_list_insert_before): New.
1441 (bfd_section_list_insert): Removed.
1442 (bfd_section_removed_from_list): Updated.
1443 (STD_SECTION): Initialize prev.
1444 (bfd_section_init): Updated.
1445 (bfd_section_list_clear): Updated.
1447 * bfd-in2.h: Regenerated.
1449 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1451 * elf.c (_bfd_elf_new_section_hook): Don't call
1452 _bfd_elf_get_sec_type_attr on sections from input files.
1454 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1456 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1457 hash table size 16699 instead of bfd_hash_table_init.
1459 2005-05-01 Paul Brook <paul@codesourcery.com>
1461 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1462 definition has already been seen.
1464 2005-05-01 Paul Brook <paul@codesourcery.com>
1466 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1467 R_ARM_PLT32 the same as R_ARM_PC24.
1468 (arm_add_to_rel): Ditto.
1470 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1472 * config.bfd: Add h8300*-*-rtemscoff.
1473 Switch h8300*-*-rtems* to elf.
1475 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1477 * aclocal.m4, Makefile.in: Regnerated.
1479 2005-04-28 Paul Brook <paul@codesourcery.com>
1481 Merge changes only applied to Makefile.in.
1482 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1483 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1484 (elfxx-sparc.lo): New rule.
1485 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1486 (elf64-sparc.lo): Likewise.
1488 2005-04-28 Julian Brown <julian@codesourcery.com>
1490 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1493 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1495 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1497 * elf.c (bfd_elf_sym_name): Updated.
1498 (group_signature): Likewise.
1499 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1500 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1501 (ppc64_elf_edit_toc): Likewise.
1502 (ppc64_elf_relocate_section): Likewise.
1503 * elfcode.h (elf_slurp_symbol_table): Likewise.
1504 * elflink.c (elf_link_input_bfd): Likewise.
1506 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1507 bfd_elf_sym_name to get local symbol name when reporting errors.
1509 2005-04-27 Nick Clifton <nickc@redhat.com>
1511 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1512 formatted input file results in a reloc which has no associated
1515 2005-04-26 Jerome Guitton <guitton@gnat.com>
1517 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1519 2005-04-25 David S. Miller <davem@davemloft.net>
1521 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1522 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1523 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1526 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1529 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1530 to discarded section an error.
1532 2005-04-21 Jerome Guitton <guitton@gnat.com>
1534 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1535 corresponding AC_CHECK_DECLS.
1536 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1538 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1539 * configure: Regenerate.
1542 2005-04-21 Andreas Schwab <schwab@suse.de>
1544 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1545 unsigned from type of dynamic_interpreter.
1546 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1549 * elf.c (assign_section_numbers): Fix comment.
1551 2005-04-21 Jerome Guitton <guitton@gnat.com>
1553 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1554 for struct som_exec_auxhdr fields.
1556 2005-04-21 Nick Clifton <nickc@redhat.com>
1558 * aout-adobe.c: Convert to ISO C and fix formatting.
1559 * aout-arm.c: Convert to ISO C and fix formatting.
1560 * aout-cris.c: Convert to ISO C and fix formatting.
1561 * aout-ns32k.c: Convert to ISO C and fix formatting.
1562 * aout-tic30.c: Convert to ISO C and fix formatting.
1563 * coffcode.h: Convert to ISO C and fix formatting.
1564 * coffswap.h: Convert to ISO C and fix formatting.
1565 * i386aout.c: Convert to ISO C and fix formatting.
1566 * libaout.h: Convert to ISO C and fix formatting.
1567 * libcoff-in.h: Convert to ISO C and fix formatting.
1568 * libcoff.h: Convert to ISO C and fix formatting.
1569 * libecoff.h: Convert to ISO C and fix formatting.
1570 * libnlm.h: Convert to ISO C and fix formatting.
1571 * libpei.h: Convert to ISO C and fix formatting.
1572 * libxcoff.h: Convert to ISO C and fix formatting.
1573 * nlm-target.h: Convert to ISO C and fix formatting.
1574 * nlm.c: Convert to ISO C and fix formatting.
1575 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1576 * nlm32-i386.c: Convert to ISO C and fix formatting.
1577 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1578 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1579 * nlmcode.h: Convert to ISO C and fix formatting.
1580 * nlmswap.h: Convert to ISO C and fix formatting.
1581 * pe-mips.c: Convert to ISO C and fix formatting.
1582 * peXXigen.c: Convert to ISO C and fix formatting.
1583 * peicode.h: Convert to ISO C and fix formatting.
1584 * vms-gsd.c: Convert to ISO C and fix formatting.
1585 * vms-hdr.c: Convert to ISO C and fix formatting.
1586 * vms-misc.c: Convert to ISO C and fix formatting.
1587 * vms-tir.c: Convert to ISO C and fix formatting.
1588 * vms.c: Convert to ISO C and fix formatting.
1589 * vms.h: Convert to ISO C and fix formatting.
1591 * coffgen.c (coff_print_symbol): Restore correct formatting of
1594 2005-04-20 David S. Miller <davem@davemloft.net>
1596 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1597 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1598 (allocate_dynrelocs): Likewise.
1600 2005-04-20 Jerome Guitton <guitton@gnat.com>
1602 * configure.in: Fix the check for basename declaration. Add check
1603 for declarations of ftello, ftello64, fseeko, fseeko64.
1604 * configure: Regenerate.
1606 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1608 2005-04-19 David S. Miller <davem@davemloft.net>
1610 * elfxx-sparc.c: New file.
1611 * elfxx-sparc.h: New file.
1612 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1613 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1614 (elfxx-sparc.lo): New rule.
1615 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1616 (elf64-sparc.lo): Likewise.
1617 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1618 (bfd_elf64_sparc_vec): Likewise.
1619 * configure: Regenerate.
1620 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1621 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1622 which is more consistent with elf32-sparc.c
1624 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1626 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1627 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1629 2005-04-19 Alan Modra <amodra@bigpond.net.au>
1631 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1632 dynamic relocs in non-SEC_ALLOC sections.
1633 (ppc_elf_gc_sweep_hook): Likewise.
1634 (ppc_elf_relax_section): Likewise.
1635 (ppc_elf_relocate_section): Likewise.
1637 2005-04-18 Nick Clifton <nickc@redhat.com>
1639 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1640 assigning a value to return_value.
1642 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1645 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1648 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1651 * elf.c (setup_group): Properly handle zero group count.
1653 2005-04-17 Mark Kettenis <kettenis@gnu.org>
1655 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1656 (som_is_subspace, compare_subspaces, som_compute_checksum)
1657 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1659 (hppa_som_reloc, compare_syms, compare_subspaces)
1660 (som_print_symbol, som_get_section_contents)
1661 (som_set_section_contents): Remove space after 'void *'.
1662 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1663 (som_bfd_merge_private_bfd_data)
1664 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1667 2004-04-15 Julian Brown <julian@codesourcery.com>
1669 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1670 * bfd-in2.h: Regenerate.
1671 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1672 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1673 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1674 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1675 relocations if requested to.
1676 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1677 use_blx rather than symbian_p.
1678 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1679 use_blx is in effect.
1680 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1683 2005-04-15 Nick Clifton <nickc@redhat.com>
1685 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1688 2005-04-15 Alan Modra <amodra@bigpond.net.au>
1691 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1692 used as a list pointer.
1694 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1696 * Makefile.am (NO_WERROR): Define.
1697 * warning.m4: New file
1698 * acinclude.m4: Include warning.m4.
1699 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1700 * Makefile.in: Regenerate.
1701 * configure: Regenerate.
1703 2005-04-14 Alan Modra <amodra@bigpond.net.au>
1705 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1706 Write trailing padding.
1708 * merge.c (merge_strings): Round up section size for alignment.
1710 2005-04-14 David S. Miller <davem@davemloft.net>
1712 Add TLS support for 64-bit Sparc ELF.
1713 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1714 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1715 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1716 sparc64_elf_hash_entry, sparc64_elf_tdata,
1717 sparc64_elf_local_got_tls_type): New defines.
1718 (sparc64_elf_mkobject): New function.
1719 (sparc64_elf_link_hash_table): Add members for dynamic linker
1720 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1721 uion to track TLS GOT references. Add sym_sec to cache
1722 mappings from local sym to section.
1723 (link_hash_newfunc): New function.
1724 (sparc64_elf_bfd_link_hash_table_create): Rename to
1725 sparc64_elf_link_hash_table_create for consistency.
1726 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1727 (sparc64_elf_create_dynamic_sections): Initialize new section
1728 members of sparc64_elf_link_hash_table. Only init srelbss
1730 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1732 (SPARC_NOP): Define.
1733 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1734 sparc64_elf_plt_ptr_offset): Delete.
1735 (sparc64_plt_entry_build): New function to build PLT entries
1736 gradually instread of all at once at the end of linking.
1737 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1738 local vars. Get them from sparc64_elf_hash_table instead.
1739 Check early on if r_symndx is in bounds. Handle TLS transitions.
1740 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1741 For TLS relocs, record the tls_type in either
1742 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1743 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1744 to the __tls_get_addr symbol. For PLT relocs, track references
1745 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1746 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1747 symbol references, count the number of relocations needed for
1748 that symbol. For default switch case, don't error, this lets
1749 the TLS relocs not explicitly handled by this function get
1751 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1752 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1753 it from sparc64_elf_hash_table. Store the real PLT offset
1754 in h->plt.offset, and build PLT entries one at a time. Also
1755 get .dynbss section pointer from htab.
1756 (allocate_dynrelocs, readonly_dynrelocs,
1757 sparc64_omit_section_dynsym): New functions.
1758 (sparc64_elf_omit_section_dynsym): Use these new functions as
1760 (dtpoff_base, tpoff): New functions.
1761 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1762 locals, get them from sparc64_elf_hash_table. Handle TLS
1763 relocations and refcounting in main relocation loop.
1764 (sparc64_elf_finish_dynamic_symbol): Use
1765 sparc64_elf_link_hash_table. Build PLT entries as we see
1766 them. Handle TLS GOT relocations.
1767 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1768 from sparc64_elf_hash_table. Initialize only PLT header
1769 not all entries since we not build PLT entries one by one.
1770 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1771 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1772 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1774 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1776 * elflink.c (elf_link_input_bfd): Update check for removed
1779 2005-04-12 Alan Modra <amodra@bigpond.net.au>
1781 * Makefile.am: Run "make dep-am".
1782 * Makefile.in: Regenerate.
1783 * aclocal.m4: Regenerate.
1784 * libcoff.h: Regenerate.
1786 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1788 * linker.c (_bfd_generic_link_output_symbols): Also check if
1789 the output section of an input section has been removed from
1792 * section.c (bfd_section_list_remove): Clear the next field
1793 of the removed section.
1794 (bfd_section_removed_from_list): New.
1795 * bfd-in2.h: Regenerated.
1797 2005-04-11 David S. Miller <davem@davemloft.net>
1799 * elf32-sparc.c (elf32_sparc_relocate_section,
1800 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1801 R_SPARC_TLS_LE_{HIX22,LOX10}.
1802 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1803 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1804 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1805 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1807 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1809 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1811 2005-04-11 Nick Clifton <nickc@redhat.com>
1813 * aout-target.h: Convert to ISO C.
1814 * aoutf1.h: Convert to ISO C.
1815 * aoutx.h: Convert to ISO C.
1816 * bout.c: Convert to ISO C.
1817 * dwarf1.c: Convert to ISO C.
1818 * ecoffswap.h: Convert to ISO C.
1819 * freebsd.h: Convert to ISO C.
1820 * genlink.h: Convert to ISO C.
1821 * ieee.c: Convert to ISO C.
1822 * ihex.c: Convert to ISO C.
1823 * libcoff-in.h: Convert to ISO C.
1824 * mach-o.c: Convert to ISO C.
1825 * mach-o.h: Convert to ISO C.
1826 * netbsd.h: Convert to ISO C.
1827 * ns32k.h: Convert to ISO C.
1828 * ns32knetbsd.c: Convert to ISO C.
1829 * oasys.c: Convert to ISO C.
1830 * pdp11.c: Convert to ISO C.
1831 * pef-traceback.h: Convert to ISO C.
1832 * pef.c: Convert to ISO C.
1833 * pef.h: Convert to ISO C.
1834 * riscix.c: Convert to ISO C.
1835 * som.c: Convert to ISO C.
1836 * som.h: Convert to ISO C.
1837 * srec.c: Convert to ISO C.
1838 * stabs.c: Convert to ISO C.
1839 * sunos.c: Convert to ISO C.
1840 * tekhex.c: Convert to ISO C.
1841 * versados.c: Convert to ISO C.
1842 * version.h: Convert to ISO C.
1843 * xcoff-target.h: Convert to ISO C.
1844 * xcofflink.c: Convert to ISO C.
1845 * xsym.c: Convert to ISO C.
1846 * xsym.h: Convert to ISO C.
1848 2005-04-08 Paul Brook <paul@codesourcery.com>
1850 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1851 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1852 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1853 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1854 (elf32_arm_to_thumb_stub): Create PIC stubs.
1855 (record_arm_to_thumb_glue): Use different stub size for relocatable
1858 2005-04-05 Alan Modra <amodra@bigpond.net.au>
1860 * elf64-ppc.c (dec_dynrel_count): New function split out from
1861 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1862 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1863 (ppc64_elf_tls_optimize): Likewise.
1865 2005-04-05 Mark Kettenis <kettenis@gnu.org>
1867 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1868 CORE_WCOOKIE_OFFSET.
1869 (SPARC64_WCOOKIE_OFFSET): New.
1870 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1872 2005-04-05 Nick Clifton <nickc@redhat.com>
1874 * po/rw.po: New translation: Kinyarwanda
1875 * configure.in (ALL_LINGUAS): Add rw
1876 * configure: Regenerate.
1878 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1880 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1881 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1882 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1884 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1885 to check for SHT_MIPS_OPTIONS sections.
1886 (_bfd_mips_elf_set_section_contents): Likewise.
1888 2005-04-04 Eric Christopher <echristo@redhat.com>
1890 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1891 Clean up gp handling code.
1893 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1895 * elf.c (bfd_elf_set_group_contents): Ignore linker created
1897 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1898 sections for relocatable files only. Remove the linker created
1900 (_bfd_elf_compute_section_file_positions): Pass link_info to
1901 assign_section_numbers.
1903 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1904 (elf_backend_object_p): Defined.
1906 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1908 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1910 2005-04-03 Fred Fish <fnf@specifixinc.com>
1912 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1913 dwarf_ranges_size members.
1914 (struct comp_unit): Add base_address member.
1915 (struct funcinfo): Replace low/high members with an arange.
1916 (arange_add): Replace incoming "unit" parameter with "abfd" and
1917 "first_arange" pointers. Reorganize/rewrite function body.
1918 (decode_line_info): Change arange_add call to pass bfd and arange
1920 (lookup_address_in_line_info_table): Use arange list instead of
1921 individual low/high members. Walk function's arange list to find
1922 lowest PC in list, to test for overlapping functions.
1923 (read_debug_ranges): New function, reads the debug_ranges section.
1924 (lookup_address_in_function_table): Use arange list instead of
1925 individual low/high members. Rewrite to find smallest range that
1927 (read_rangelist): Read a given rangelist from debug_ranges.
1928 (scan_unit_for_functions): Use arange list instead of individual
1929 low/high members. Handle a DW_AT_ranges attribute.
1930 (parse_comp_unit): Use arange list instead of individual low/high
1931 members. Save comp unit base address. Handle a DW_AT_ranges
1934 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1936 * elf.c (assign_section_numbers): Really use the kept section.
1938 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1942 * elf.c (assign_section_numbers): When sh_link points to a
1943 discarded section, call _bfd_elf_check_kept_section to see if
1944 the kept section can be used. Otherwise reject sh_link
1945 pointing to discarded section.
1947 * elflink.c (_bfd_elf_check_kept_section): New.
1948 (elf_link_input_bfd): Use it.
1950 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1952 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1953 that we no longer need.
1955 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1957 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1959 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
1961 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1963 * elf.c (assign_section_numbers): Fix a typo.
1965 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1967 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1969 (_bfd_elf_section_already_linked): Likewise.
1971 2005-03-31 Jerome Guitton <guitton@gnat.com>
1973 * config.in: Regenerate.
1975 2005-03-31 Jerome Guitton <guitton@gnat.com>
1977 * config.in (HAVE_DECL_BASENAME): New configure macro.
1978 * configure.in: Check for basename.
1979 * configure: Regenerate.
1981 2005-03-30 Julian Brown <julian@codesourcery.com>
1983 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1984 bfd_elf32_is_arm_mapping_symbol_name.
1985 * bfd-in2.h: Regenerate.
1986 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1987 bfd_elf32_is_arm_mapping_symbol_name.
1988 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1989 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1990 (arm_elf_find_function): Likewise.
1991 (elf32_arm_output_symbol_hook): Likewise.
1993 2005-03-30 Julian Brown <julian@codesourcery.com>
1995 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1996 * bfd-in2.h: Regenerate.
1997 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1998 bfd_elf32_is_arm_mapping_symbol_name.
1999 (elf32_arm_output_symbol_hook): Likewise.
2000 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2002 (is_arm_mapping_symbol_name): Function moved from here...
2003 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2006 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2008 * configure.in: Check for ffs decl and alphabetize.
2009 * config.in: Regenerate.
2010 * configure: Regenerate.
2011 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2013 2005-03-29 Fred Fish <fnf@specifixinc.com>
2015 * dwarf2.c (struct comp_unit): Fix typo.
2016 (scan_unit_for_functions): Remove unused local variable "name"
2017 and dead code that set it.
2019 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2020 Phil Blundell <philb@gnu.org>
2022 * bfd-in2.h, libbfd.h: Regenerated.
2023 * reloc.c: Add ARM TLS relocations.
2024 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2026 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2027 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2028 (elf32_arm_tls_ie32_howto): New.
2029 (elf32_arm_howto_from_type): Support TLS relocations.
2030 (elf32_arm_reloc_map): Likewise.
2031 (elf32_arm_reloc_type_lookup): Likewise.
2033 (struct elf32_arm_obj_tdata): New.
2034 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2035 (elf32_arm_mkobject): New function.
2036 (struct elf32_arm_relocs_copied): Add pc_count.
2037 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2038 (GOT_TLS_IE): Define.
2039 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2040 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2041 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2042 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2043 (dtpoff_base, tpoff): New functions.
2044 (elf32_arm_final_link_relocate): Handle TLS relocations.
2045 (IS_ARM_TLS_RELOC): Define.
2046 (elf32_arm_relocate_section): Warn about TLS mismatches.
2047 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2048 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2049 TLS relocations and pc_count.
2050 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2051 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2053 (elf32_arm_size_dynamic_sections): Handle TLS.
2054 (elf32_arm_finish_dynamic_symbol): Likewise.
2055 (bfd_elf32_mkobject): Define.
2057 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2059 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2060 relocation types. Don't count relocations which will use a PLT.
2062 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2064 * elf.c (elfcore_grok_nto_status): Print tid as long.
2065 (elfcore_grok_nto_regs): Likewise.
2067 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2069 * irix-core.c: Remove some unnecessary prototypes.
2071 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2073 * irix-core.c: Convert to ISO C.
2075 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2077 * irix-core.c (do_sections): Replace + by | in expression.
2078 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2079 to unused parameters to avoid a compiler warning.
2081 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2083 * netbsd-core.c: Convert to ISO C. Fix formatting.
2085 2005-03-24 Eric Christopher <echristo@redhat.com>
2087 * elfxx-mips.c: Revert previous patch.
2089 2005-03-24 Nick Clifton <nickc@redhat.com>
2091 * targets.c (_bfd_target_vector): Only include the
2092 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2093 all targets enabled.
2095 2005-03-24 James E Wilson <wilson@specifixinc.com>
2097 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2098 (BFD64_BACKENDS): Add elf32-ia64.lo.
2099 * Makefile.in: Regenerate.
2101 2005-03-23 Eric Christopher <echristo@redhat.com>
2103 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2104 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2105 after emitting relocation.
2106 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2107 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2110 2005-03-23 Mike Frysinger <vapier@gentoo.org>
2111 Nick Clifton <nickc@redhat.com>
2113 * config.bfd: Accept any C library to accompany a GNU Linux
2114 implementation, not just the GNU C library.
2115 * configure.in: Likewise.
2116 * configure: Regenerate.
2118 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2120 * bfd-in.h (_bfd_elf_provide_symbol): New.
2121 * bfd-in2.h: Regenerated.
2123 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2124 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2127 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2130 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
2132 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2134 2005-03-22 Bob Wilson <bob.wilson@acm.org>
2136 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2137 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2138 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2139 (xtensa_opcode_decode): Rearrange code.
2141 2005-03-22 Nick Clifton <nickc@redhat.com>
2143 * binary.c: Convert to ISO C90 formatting.
2144 * coff-arm.c: Convert to ISO C90 formatting.
2145 * coffgen.c: Convert to ISO C90 formatting.
2146 * elf32-gen.c: Convert to ISO C90 formatting.
2147 * elf64-gen.c: Convert to ISO C90 formatting.
2148 * hash.c: Convert to ISO C90 formatting.
2149 * ieee.c: Convert to ISO C90 formatting.
2151 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2153 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2154 unresolved symbols in R_ARM_NONE relocations.
2156 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2158 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2159 UNRESOLVED_RELOC_P argument. Set it appropriately.
2160 (elf32_arm_relocate_section): Update call to
2161 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2162 unresolved_reloc instead.
2164 2005-03-23 Alan Modra <amodra@bigpond.net.au>
2166 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2167 .gnu.warning.* sections.
2169 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2171 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2173 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2174 (elf_create_pointer_linker_section): Delete info parm. Don't make
2175 h dynamic. Don't set written_address_p.
2176 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2177 (bfd_put_ptr): Delete.
2178 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2179 Always write section contents. Assert global sym is def_regular.
2180 Use offset bottom bit as a written flag.
2181 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2184 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2186 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2187 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2190 2005-03-21 Nick Clifton <nickc@redhat.com>
2192 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2194 (t2a1_bx_pc_insn): Likewise.
2195 (t2a2_noop_insn): Likewise.
2196 (t2a3_b_insn): Likewise.
2197 (t2a1_push_insn): Likewise.
2198 (t2a2_ldr_insn): Likewise.
2199 (t2a3_mov_insn): Likewise.
2200 (t2a4_bx_insn): Likewise.
2201 (t2a5_pop_insn): Likewise.
2202 (t2a6_bx_insn): Likewise.
2203 (coff_arm_relocate_section): Only declare the high_address
2204 variable for non WINCE targets.
2206 2005-03-22 Alan Modra <amodra@bigpond.net.au>
2208 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2209 SEC_LINKER_CREATED. Attach to dynobj.
2210 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2212 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2214 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2215 sym_offset. Add name, bss_name, sym_name, sym_val.
2216 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2217 Add sdata array of elf_linker_section_t.
2218 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2219 (enum elf_linker_section_enum): Delete.
2220 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2221 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2222 the special sections are needed. Adjust htab->sdata refs.
2223 Ensure dynobj is set in sreloc code.
2224 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2225 (ppc_elf_set_sdata_syms): New function.
2226 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2227 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2228 sym_val instead of sym_hash.
2229 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2231 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2233 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2234 (ppc_elf_merge_private_bfd_data): Likewise.
2236 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2238 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2239 (ppc_elf_create_linker_section): Don't create rel_section.
2240 (elf_create_pointer_linker_section): Don't size relocs.
2241 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2242 Don't generate relocs.
2243 (ppc_elf_relocate_section): Adjust calls to
2244 elf_finish_pointer_linker_section.
2246 2005-03-21 Alan Modra <amodra@bigpond.net.au>
2248 * elf32-ppc.c (is_ppc_elf_target): New function.
2249 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2250 for bfd_target_elf_flavour. Do this test before endian check.
2251 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2252 (ppc_elf_size_dynamic_sections): Likewise.
2254 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2256 * elf-bfd.h (elf_backend_data): Add int to
2257 elf_backend_section_from_shdr.
2258 (bfd_elf_section_data): Update comment for this_idx.
2259 (_bfd_elf_make_section_from_shdr): Add int.
2260 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2262 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2263 and use it to set this_idx in bfd_elf_section_data.
2264 (bfd_section_from_shdr): Pass shindex to
2265 _bfd_elf_make_section_from_shdr.
2266 (_bfd_elf_section_from_bfd_section): Use this_idx in
2267 bfd_elf_section_data to find section index.
2269 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2270 index and pass it to _bfd_elf_make_section_from_shdr.
2271 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2272 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2273 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2274 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2275 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2276 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2277 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2278 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2279 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2281 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2282 Ross Ridge <rridge@csclub.uwaterloo.ca>
2284 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2285 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2288 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2290 * elflink.c (elf_mark_used_section): Remove check for special
2293 2005-03-18 Andreas Schwab <schwab@suse.de>
2295 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2296 from bfd_vma to ia64_insn, remove broken cast.
2298 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2300 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2301 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2302 elf_m68k_finish_dynamic_sections): Use it.
2304 2005-03-17 Paul Brook <paul@codesourcery.com>
2305 Dan Jacobowitz <dan@codesourcery.com>
2306 Mark Mitchell <mark@codesourcery.com>
2308 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2309 (elf32_arm_additional_program_headers): Likewise.
2310 (elf_backend_modify_segment_map): Define.
2311 (elf_backend_additional_program_headers): Likewise.
2312 (elf32_arm_symbian_modify_segment_map): Use
2313 elf32_arm_modify_segment_map.
2315 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2317 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2318 for special sections.
2320 2005-03-18 Alan Modra <amodra@bigpond.net.au>
2322 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2323 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2324 section_sym_count param, and return number of section symbols.
2325 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2326 .dynsym contents. Don't bother calling swap_symbol_out on the
2327 first all-zero dynsym.
2328 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2329 special sections like bfd_abs_section.
2330 (bfd_elf_gc_sections): Spelling fix.
2332 2005-03-16 Fred Fish <fnf@specifixinc.com>
2335 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2336 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2338 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2340 * elflink.c (elf_mark_used_section): New.
2341 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2342 non-relocatable link if we don't do GC.
2344 2005-03-16 Nick Clifton <nickc@redhat.com>
2345 Ben Elliston <bje@au.ibm.com>
2347 * configure.in (werror): New switch: Add -Werror to the
2348 compiler command line. Enabled by default. Disable via
2350 * configure: Regenerate.
2352 2005-03-16 Nick Clifton <nickc@redhat.com>
2354 * ecoff.c: Convert to ISO C90 formatting.
2356 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2358 * elf32-ppc.c: Divide file into general and linker specific
2359 functions. Sort linker functions into roughly the order in which
2360 they are called by the ELF linker code.
2362 2005-03-16 Alan Modra <amodra@bigpond.net.au>
2364 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2365 on section. Correct comment, and add FIXME.
2366 (ppc_elf_additional_program_headers): Don't bump header count for
2367 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2368 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2369 do allocate memory if they need it.
2371 2005-03-15 Mikkel Krautz <krautz@gmail.com>
2373 * config.bfd (x86_64-elf): Add target.
2375 2005-03-15 Alan Modra <amodra@bigpond.net.au>
2377 * po/es.po: Commit new Spanish translation.
2379 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2381 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2382 for global symbol when reporting overflow.
2384 2005-03-11 Jakub Jelinek <jakub@redhat.com>
2386 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2387 * libbfd.h: Rebuilt.
2388 * archive.c (_bfd_ar_spacepad): New function.
2389 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2390 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2391 coff_write_armap): Use it.
2392 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2394 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2396 2005-03-10 Mark Kettenis <kettenis@gnu.org>
2398 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2399 has_table to the start of the function.
2401 2005-03-10 Ben Elliston <bje@au.ibm.com>
2403 * archive.c: Include hashtab.h.
2404 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2405 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2406 (hash_file_ptr): New function.
2407 (eq_file_ptr): Likewise.
2408 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2409 * libbfd-in.h: Include hashtab.h.
2410 (struct artdata): Change `cache' member type to htab_t.
2411 * libbfd.h: Rebuild.
2413 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2415 * configure.in: Bump version to 2.16.90.
2416 * configure: Regenerated.
2418 2005-03-07 Jakub Jelinek <jakub@redhat.com>
2420 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2421 close is a function like macro in system headers.
2423 2005-03-07 Alan Modra <amodra@bigpond.net.au>
2426 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2427 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2429 2005-03-06 Alan Modra <amodra@bigpond.net.au>
2431 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2433 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2435 * po/bfd.pot: Regenerate.
2437 2005-03-05 Alan Modra <amodra@bigpond.net.au>
2439 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2441 (func_desc_adjust): Force dot-syms local in executables as well
2444 2005-03-04 David Daney <ddaney@avtrex.com>
2446 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2447 '__gnu_local_gp' symbol used by gas -mno-shared.
2449 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2451 * elf-bfd.h (elf_backend_data): Add "const char *" to
2452 elf_backend_section_from_phdr.
2454 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2455 elf_backend_section_from_phdr hook.
2457 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2458 Joseph Myers <joseph@codesourcery.com>
2460 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2461 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2463 (struct mips_elf_got_per_bfd_arg): Add global_count.
2464 (struct mips_elf_count_tls_arg): New.
2465 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2466 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2467 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2468 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2469 (TLS_RELOC_P): Define.
2470 (TP_OFFSET, DTP_OFFSET): Define.
2471 (dtprel_base, tprel_base): New functions.
2472 (mips_elf_link_hash_newfunc): Initialize tls_type.
2473 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2474 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2476 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2477 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2478 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2479 (mips_tls_got_index): New functions.
2480 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2481 arguments. Pass them to mips_elf_create_local_got_entry. Use
2483 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2485 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2486 mips_elf_create_local_got_entry.
2487 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2488 arguments. Handle TLS entries.
2489 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2490 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2492 (mips_elf_record_global_got_symbol): Likewise.
2493 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2495 (mips_elf_merge_gots): Handle TLS entries when merging.
2496 (mips_elf_initialize_tls_index): New function.
2497 (mips_elf_set_global_got_offset): Handle TLS entries.
2498 (mips_elf_adjust_gp): Handle TLS.
2499 (mips_elf_multi_got): Remove redundant call to
2500 mips_elf_resolve_final_got_entries. Initialize global_count.
2501 Correct a comment. Initialize new TLS members of mips_got_info.
2502 Assign TLS GOT indexes for new GOTs.
2503 (mips_elf_create_got_section): Initialize new TLS members of
2505 (mips_elf_calculate_relocation): Handle TLS relocs.
2506 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2508 (_bfd_mips_elf_always_size_sections): Handle TLS.
2509 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2510 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2512 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2513 (_bfd_mips_elf_hide_symbol): Handle TLS.
2514 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2515 (mips_reloc_map): Add TLS relocs.
2516 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2517 * elf64-mips.c (mips_elf64_howto_table_rel)
2518 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2519 * reloc.c: Define new MIPS TLS relocations.
2520 * libbfd.h, bfd-in2.h: Regenerated.
2522 2005-03-02 Jan Beulich <jbeulich@novell.com>
2524 * Makefile.am: Add dependency of cache.o on libiberty.h.
2525 * cache.c: Include libiberty.h.
2526 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2528 2005-03-01 Zack Weinberg <zack@codesourcery.com>
2530 * elf.c (bfd_section_from_shdr <default case>): Call
2531 elf_backend_section_from_shdr hook unconditionally, and return
2533 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2534 * elfxx-target.h (elf_backend_section_from_shdr)
2535 (elf_backend_section_from_phdr): Default to
2536 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2539 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2541 * targets.h: Typo fix.
2542 * bfd-in2.h: Regenerate.
2544 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2545 structs to size on-disk structures.
2546 (b_out_set_section_contents): Size the external struct, not the
2547 internal one for on-disk size.
2548 (b_out_sizeof_headers): Likewise.
2550 2005-03-01 Alan Modra <amodra@bigpond.net.au>
2552 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2553 entry points with the func descriptor as well as undefweak.
2555 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2557 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2558 present when IMPORT_NAME_UNDOECRATE is used.
2560 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2563 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2566 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2567 to _bfd_elf_merge_symbol.
2569 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2570 unsigned int to return the alignment of the old common symbol
2571 in the dynamic object.
2572 (_bfd_elf_add_default_symbol): Pass NULL to
2573 _bfd_elf_merge_symbol.
2574 (elf_link_add_object_symbols): Pass &old_alignment to
2575 _bfd_elf_merge_symbol. Get the alignment of the new common
2576 symbol in the dynamic object.
2578 2005-02-24 Ben Elliston <bje@au.ibm.com>
2580 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2581 * format.c (bfd_check_format_matches): Likewise.
2582 * archive.c (BFD_GNU960_ARMAG): Likewise.
2583 (bfd_generic_archive_p): Likewise.
2584 (_bfd_write_archive_contents): Likewise.
2586 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2588 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2589 * configure: Regenerate.
2591 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2593 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2594 COMDAT group sections to have default visibility.
2596 2005-02-24 Alan Modra <amodra@bigpond.net.au>
2598 * coffcode.h (coff_print_aux): Warning fix.
2599 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2600 instead of section pointer to identify.
2601 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2602 the correct size buffer for local sym mangling too.
2603 (h8300_bfd_link_add_symbols): Likewise.
2604 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2606 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2607 * elf32-xtensa.c (literal_value_hash): Warning fix.
2608 * versados.c (process_otr): Warning fix.
2609 (versados_canonicalize_reloc): Likewise.
2610 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2611 * vms.c (fill_section_ptr): Warning fix.
2613 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2615 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2616 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2618 2005-02-23 Nick Clifton <nickc@redhat.com>
2620 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2621 the relvaddr field of the Elf32_crinfo structure.
2623 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2624 variables that are passed by reference to
2625 m68hc11_get_relocation_value in case that function does not
2628 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2629 return statements and replace with a single return at the end of
2630 the function. This helps pacify the flow analysis code in gcc 4.0.
2632 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2633 strtab to avoid compile time warning.
2635 2005-02-23 Ben Elliston <bje@au.ibm.com>
2637 * opncls.c (bfd_zalloc): Document this function.
2639 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2641 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2642 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2643 Replace SEC_SHARED with SEC_COFF_SHARED.
2644 (styp_to_sec_flags): Likewise.
2646 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2647 (TARGET_LITTLE_SYM): Likewise.
2649 * section.c (SEC_ARCH_BIT_0): Removed.
2650 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2651 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2652 (SEC_SHARED): Renamed to ...
2653 (SEC_COFF_SHARED): This.
2654 (SEC_BLOCK): Renamed to ...
2655 (SEC_TIC54X_BLOCK): This.
2656 (SEC_CLINK): Renamed to ...
2657 (SEC_TIC54X_CLINK): This.
2658 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2659 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2661 * bfd-in2.h: Regenerated.
2663 2005-02-21 Fred Fish <fnf@specifixinc.com>
2665 * dwarf2.c (find_abstract_instance_name): Call recursively
2666 to handle a DW_AT_specification.
2668 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2670 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2671 mips_elf_create_dynamic_relocation,
2672 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2673 Remove #if 0'd code.
2675 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2677 * Makefile.am: Run "make dep-am"
2678 * Makefile.in: Regenerate.
2680 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2682 * coffgen.c (bfd_coff_get_comdat_section): Check that
2683 coff_section_data isn't NULL.
2685 2005-02-21 Alan Modra <amodra@bigpond.net.au>
2687 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2688 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2689 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2690 useless assignments.
2691 (xcoff_write_archive_contents_big): Likewise.
2692 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2693 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2694 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2695 * cofflink.c (process_embedded_commands): Warning fixes.
2696 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2698 * dwarf2.c: Warning fixes.
2699 * elf-bfd.h: Likewise.
2700 * elf-eh-frame.c: Likewise.
2701 * elf-strtab.c: Likewise.
2703 * elf32-m68k.c: Likewise.
2704 * elf32-ppc.c: Likewise.
2705 * elf32-sh-symbian.c: Likewise.
2706 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2707 * elf64-sh64.c: Likewise.
2708 * peicode.h: Likewise.
2709 * elf64-mmix.c: Warning fixes.
2710 * elfcode.h: Likewise.
2711 * elfxx-mips.c: Likewise.
2712 * libbfd-in.h: Likewise.
2713 * libbfd.c: Likewise.
2714 * mach-o.c: Likewise.
2715 * merge.c: Likewise.
2717 * opncls.c: Likewise.
2720 * vms-hdr.c: Likewise.
2721 * vms-tir.c: Likewise.
2722 * xtensa-isa.c: Likewise.
2723 * xtensa-modules.c: Likewise.
2725 (pstrcmp): Use correct choice of string lengths. Fix return value.
2726 (bfd_sym_module_name): Correct string length.
2727 * bfd-in2.h: Regenerate.
2728 * libbfd.h: Regenerate.
2730 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
2732 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2733 uninitialized check_segment[1] in TLSMOFF case.
2734 Reported by Alan Modra.
2735 (elf32_frv_relocate_section): Improve errors and warnings.
2737 2005-02-17 Alan Modra <amodra@bigpond.net.au>
2739 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2741 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2743 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2744 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2745 * pef.c (bfd_pef_scan): Don't ignore return value of
2746 bfd_pef_scan_start_address.
2747 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2748 bfd_mach_o_scan_start_address.
2749 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2750 * elfxx-mips.c: Remove unnecessary prototypes.
2751 (sort_dynamic_relocs_64): Abort if not BFD64.
2753 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2755 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2756 Skip toc reloc adjust if reloc_count is zero.
2758 2005-02-15 Nigel Stephens <nigel@mips.com>
2759 Maciej W. Rozycki <macro@mips.com>
2761 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2762 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2763 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2764 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2765 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2767 (mips16_gprel_reloc): Remove bit shuffling; call
2768 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2769 and _bfd_mips16_elf_reloc_shuffle() instead.
2770 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2771 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2773 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2774 elf_mips16_howto_table_rel.
2775 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2776 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2777 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2778 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2779 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2781 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2782 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2783 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2785 (mips16_gprel_reloc): Remove bit shuffling; call
2786 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2787 and _bfd_mips16_elf_reloc_shuffle() instead.
2788 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2789 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2791 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2792 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2793 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2794 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2795 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2796 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2797 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2799 (mips16_gprel_reloc): Remove bit shuffling; call
2800 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2801 and _bfd_mips16_elf_reloc_shuffle() instead.
2802 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2803 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2805 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2806 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2807 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2808 handle bit shuffling for MIPS16 relocs.
2809 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2810 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2811 and _bfd_mips16_elf_reloc_shuffle().
2812 (_bfd_mips_elf_generic_reloc): Likewise.
2813 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2815 (mips_elf_obtain_contents): Remove bit shuffling.
2816 (mips_elf_perform_relocation): Likewise; call
2817 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2819 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2821 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2822 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2823 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2824 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2825 (BFD_RELOC_MIPS16_LO16): Likewise.
2826 * bfd-in2.h: Regenerate.
2827 * libbfd.h: Regenerate.
2829 2005-02-15 Jan Beulich <jbeulich@novell.com>
2831 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2832 R_IA64_DTPMOD64[LM]SB.
2834 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2836 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2837 backward branch in the same section.
2838 (elfNN_ia64_relocate_section): Inform users that the input
2839 section is too big to relax br instruction when overflow
2840 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2841 and R_IA64_PCREL21F.
2843 2005-02-14 Orjan Friberg <orjanf@axis.com>
2845 * elfcore.h (elf_core_file_p): Move the call to
2846 elf_backend_object_p to allow the correct machine to be set before
2847 processing the program headers.
2849 2005-02-14 Nick Clifton <nickc@redhat.com>
2852 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2853 aware flag from the input bfd to the output bfd.
2855 2005-02-11 Maciej W. Rozycki <macro@mips.com>
2857 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2858 R_MIPS_LITERAL relocations for external symbols.
2859 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2860 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2862 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2864 * bfd-in2.h: Rebuilt.
2866 2005-02-11 Paul Brook <paul@codesourcery.com>
2868 * elf-bfd.h (struct elf_link_hash_table): Add
2869 is_relocatable_executable.
2870 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2871 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2872 symbols in relocatable executables.
2873 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2874 relocatable executables.
2875 (_bfd_elf_link_renumber_dynsyms): Ditto.
2876 (bfd_elf_final_link): Ditto.
2877 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2878 relocations into relocatable executables.
2879 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2880 executables. Also copy absolute relocations.
2881 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2882 in relocatable executables.
2883 (allocate_dynrelocs): Copy relocations for relocatable executables.
2884 Output dynamic symbols for symbols defined in linker scripts.
2886 2005-02-11 Nick Clifton <nickc@redhat.com>
2888 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2889 to avoid a compile time warning.
2891 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2894 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2895 inclusion of coffcode.h so that it is actually picked up.
2897 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2898 case it is not used.
2900 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2901 structure and macro.
2903 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2906 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2907 to protect the declaration of this array.
2909 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2910 Avoid call to memcpy with a size of 0.
2912 2005-02-12 Alan Modra <amodra@bigpond.net.au>
2914 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2915 old-style branches to undefined dot-symbols which will be
2916 satisfied by a plt call.
2918 2005-02-11 Alan Modra <amodra@bigpond.net.au>
2920 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2921 (ppc64_elf_copy_indirect_symbol): ..here.
2922 (func_desc_adjust): Use move_plt_plist.
2924 2005-02-10 Paul Brook <paul@codesourcery.com>
2926 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2928 2005-02-10 Paul Brook <paul@codesourcery.com>
2930 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2932 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2933 (elf_link_renumber_local_hash_table_dynsyms): New function.
2934 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2936 2005-02-10 Jakub Jelinek <jakub@redhat.com>
2938 * bfd-in.h (BFD_LINKER_CREATED): Define.
2939 * bfd-in2.h: Rebuilt.
2940 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2941 BFD_LINKER_CREATED bfds when determining input bfds without
2942 .note.GNU-stack section.
2944 2005-02-10 Maciej W. Rozycki <macro@mips.com>
2946 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2947 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2948 relocations against external symbols unchanged.
2950 2005-02-08 Paul Brook <paul@codesourcery.com>
2952 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2955 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
2957 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2960 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2962 * elf64-mips.c: Fix formatting throughout.
2964 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2966 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2968 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
2970 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2971 *ABS*/*UND* sections.
2972 (elf32_frv_relocate_section): Move zero-addend-required error...
2973 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2974 missing needed TLS section.
2976 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
2978 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2979 being the last symbol.
2980 (aout_link_add_symbols): Just return TRUE if a warning
2983 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2985 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2986 R_MIPS_GPREL32 relocations against external symbols.
2987 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2990 2005-02-07 Alan Modra <amodra@bigpond.net.au>
2992 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2993 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2994 elf_string_from_elf_strtab.
2995 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2996 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2997 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2998 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2999 looking at cached symtab info first, before iterating over headers.
3000 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3001 * elfcode.h (elf_object_p): Don't load section header stringtab
3004 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3006 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3007 against protected function when building shared library.
3010 * elf64-x86-64.c (is_32bit_relative_branch): New.
3011 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3012 protected function symbol when building shared library for
3013 32bit relative branch instruction.
3015 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3017 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3018 syms when doing a relocatable link.
3019 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3021 (ppc64_elf_tls_setup): Likewise.
3022 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3024 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3026 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3027 (link_hash_newfunc): Clear all locals using memset.
3028 (make_fdh): Remove flags param. Always create fake func desc
3029 weak. Link the descriptor with the code entry sym.
3030 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3031 (add_symbol_adjust): Adjust make_fdh call.
3032 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3033 descriptor to strong undefined if code entry is strong.
3035 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3037 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3038 lookup here. Set to new before calling bfd_link_repair_undef_list.
3039 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3041 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3043 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3045 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3047 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3048 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3049 before the as-needed lib was loaded. Abort on unexpected refs.
3051 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3053 * elflink.c (elf_smash_syms): Expand comments.
3054 (elf_link_add_object_symbols): Only call elf_smash_syms for
3055 as-needed dynamic objects.
3057 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3058 everything, just the field specific to ia64.
3059 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3061 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3063 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3064 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3066 (struct add_symbol_adjust_data): New.
3067 (add_symbol_adjust): Make an undefweak func desc for old ABI
3068 objects to link with --as-needed shared libs. Return fail status.
3069 Don't adjust old ABI func entry sym to weak if func desc syms
3071 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3074 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3076 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3079 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3081 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3082 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3083 remove anything but new and undefweak.
3084 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3086 (_bfd_elf_create_dynamic_sections): Formatting.
3087 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3088 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3089 (struct elf_smash_data): New.
3090 (elf_smash_syms): New function.
3091 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3092 unneeded dynamic objects to loaded list.
3093 (elf_link_output_extsym): Don't handle as-needed here. Strip
3094 bfd_link_hash_new symbols.
3095 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3096 delref when dynindx is already -1.
3097 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3099 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3101 2005-02-01 Ben Elliston <bje@au.ibm.com>
3103 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3105 2005-02-01 Ben Elliston <bje@au.ibm.com>
3107 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3108 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3109 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3110 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3111 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3112 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3113 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3114 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3115 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3116 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3117 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3118 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3119 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3120 throughout. Similarly, collapse #if 1'd code.
3122 2005-02-01 Ben Elliston <bje@au.ibm.com>
3124 * elf-bfd.h (bfd_elf_discard_group): Remove.
3125 * elf.c (bfd_elf_discard_group): Likewise.
3126 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3128 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
3130 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3131 (_bfd_elf_eh_frame_address_size): Declare.
3132 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3133 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3134 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3135 (elf_backend_eh_frame_address_size): Define.
3136 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3137 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3138 size from the new backend hook.
3139 (_bfd_elf_write_section_eh_frame): Likewise.
3140 (_bfd_elf_eh_frame_address_size): New function.
3142 2005-01-31 Andrew Cagney <cagney@gnu.org>
3144 * configure: Regenerate to track ../gettext.m4.
3146 2005-01-31 Mark Mitchell <mark@codesourcery.com>
3148 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3149 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3151 2005-01-31 Nick Clifton <nickc@redhat.com>
3153 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3154 sparc-lynxos, vax-vms) be obsolete.
3156 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3158 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3159 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3160 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3161 * elfcode.h (elf_object_p): Use minpagesize instead of
3163 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3164 (elfNN_bed): Include ELF_MINPAGESIZE.
3166 2005-01-28 Julian Brown <julian@codesourcery.com>
3168 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3169 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3170 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3171 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3172 passing flag value from ld. Set flag value in global hash table entry.
3173 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3176 2005-01-27 Andrew Cagney <cagney@gnu.org>
3178 * configure: Regenerate to track ../gettext.m4 change.
3180 2005-01-25 Mark Mitchell <mark@codesourcery.com>
3182 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3185 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
3187 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3188 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3190 * reloc.c: Add R_FRV_TLSMOFF.
3191 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3192 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3193 (elf32_frv_relocate_section): Handle it.
3194 (elf32_frv_check_relocs): Likewise.
3195 * libbfd.h, bfd-in2.h: Rebuilt.
3196 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3197 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3198 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3199 such that they return the constant in gr9.
3200 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3202 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3203 too, such that they shrink on relaxation.
3204 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3205 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3206 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3207 if we can guarantee the use of 16-bit constants.
3208 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3209 Introduce TLS support for FR-V FDPIC.
3210 * reloc.c: Add TLS relocations.
3211 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3212 (elf32_frv_rel_tlsdesc_value_howto): New.
3213 (elf32_frv_rel_tlsoff_howto): New.
3214 (frv_reloc_map): Add new mappings.
3215 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3217 (frvfdpic_dynamic_got_plt_info): New.
3218 (frvfdpic_plt_tls_ret_offset): New.
3219 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3220 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3221 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3222 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3224 (struct frvfdpic_relocs_info): Add TLS fields.
3225 (frvfdpic_relocs_info_hash): Warning clean up.
3226 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3227 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3228 (FRVFDPIC_TLS_BIAS): Define.
3229 (tls_biased_base): New.
3230 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3232 (frv_reloc_type_lookup): Likewise.
3233 (frvfdpic_info_to_howto_rel): Likewise.
3234 (elf32_frv_relocate_section): Likewise.
3235 (_frv_create_got_section): Create the PLT section here.
3236 (elf32_frvfdpic_create_dynamic_sections): Not here.
3237 (_frvfdpic_count_nontls_entries): Move out of...
3238 (_frvfdpic_count_got_plt_entries): ... here.
3239 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3240 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3242 (_frvfdpic_relax_tls_entries): New.
3243 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3244 (_frvfdpic_get_tlsdesc_entry): New.
3245 (_frvfdpic_assign_got_entries): Add TLS support.
3246 (_frvfdpic_assign_plt_entries): Likewise.
3247 (_frvfdpic_reset_got_plt_entries): New.
3248 (_frvfdpic_size_got_plt): Move out of...
3249 (elf32_frvfdpic_size_dynamic_sections): ... here.
3250 (_frvfdpic_relax_got_plt_entries): New.
3251 (elf32_frvfdpic_relax_section): New.
3252 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3253 (elf32_frv_check_relocs): Add TLS support.
3254 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3255 * libbfd.h, bfd-in2.h: Rebuilt.
3257 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3259 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3260 loadable reloc sections.
3261 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3262 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3264 2005-01-25 Alan Modra <amodra@bigpond.net.au>
3266 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3267 sections immediately when linking shared libs. Instead, wait until
3268 we know a lib is needed.
3269 (_bfd_elf_link_create_dynstrtab): Extract from..
3270 (_bfd_elf_link_create_dynamic_sections_): ..here.
3271 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3272 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3273 for non-existent .dynamic.
3274 (elf_link_output_extsym): Don't complain about undefined symbols
3275 in as-needed dynamic libs that aren't actually linked.
3277 2005-01-24 Andrew Cagney <cagney@gnu.org>
3279 * configure: Regenerate, ../gettext.m4 was updated.
3281 2005-01-21 Ben Elliston <bje@au.ibm.com>
3283 * aout-encap.c: Remove unused file.
3285 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3288 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3289 non-function symbols are local.
3290 (_bfd_elf_symbol_refs_local_p): Likewise.
3292 2005-01-18 Alan Modra <amodra@bigpond.net.au>
3294 * bfd.c (bfd_link_just_syms): Add abfd param.
3295 * bfd-in2.h: Regenerate.
3297 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3299 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3300 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3301 instructions. If the amount of padding is known, reduce the size
3302 of the CIE or FDE by that amount.
3304 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3306 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3307 augmentation_size. Use bfd_signed_vmas for data_align.
3308 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3309 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3310 functions. Don't read past the end of the enclosing CIE or FDE.
3311 (skip_bytes): New utility function.
3312 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3314 (_bfd_elf_write_section_eh_frame): Use new functions.
3316 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
3318 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3319 assert-style REQUIRE() macro to handle sanity checks.
3321 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3323 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3325 (read_unsigned_leb128): Removed.
3326 (read_signed_leb128): Removed.
3327 (find_abstract_instance_name): Updated.
3328 (parse_comp_unit): Accept info_ptr_unit.
3329 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3330 comp unit and pass it to parse_comp_unit.
3332 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3333 (read_signed_leb128): Moved to ...
3336 * libbfd-in.h (read_unsigned_leb128): New prototype.
3337 (read_signed_leb128): Likewise.
3338 * libbfd.h: Regenerated.
3340 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3341 Nick Clifton <nickc@redhat.com>
3343 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3344 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3345 arch_sh4a_nofpu_up in order to match the external names and make the
3346 testsuite's job easier.
3347 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3349 * bfd-in2.h: Regenerate.
3351 2005-01-15 Andrew Cagney <cagney@gnu.org>
3354 * acinclude.m4: Move BFD_NEED_DECLARATION,
3355 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3356 the new file bfd.m4. Include ../bfd/bfd.m4.
3357 * configure: Re-generate.
3359 2005-01-12 Alan Modra <amodra@bigpond.net.au>
3361 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3362 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3364 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3365 R_PPC_RELAX32PC_PLT.
3367 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3369 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3371 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3372 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3373 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3374 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3375 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3376 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3377 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3378 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3379 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3380 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3381 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3382 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3383 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3384 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3386 2005-01-11 Alan Modra <amodra@bigpond.net.au>
3388 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3391 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3393 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3394 * bfd-in2.h: Regenerate.
3395 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3396 to support these new machine values.
3397 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3399 (bfd_maxq_arch): Update values for the maxq20.
3401 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3403 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3404 non-shared object, do not reserve space in .plt and .rela.plt for
3405 regular symbols neither defined nor referenced in shared objects.
3407 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3409 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3410 to zero the structure.
3411 (create_got_section): Use BFD_ASSERT instead of abort.
3412 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3414 (create_got_section): New function.
3415 (sparc64_elf_create_dynamic_sections): Likewise.
3416 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3417 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3418 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3419 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3420 (sparc64_elf_finish_dynamic_symbol): Likewise.
3421 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3422 (elf_backend_create_dynamic_sections): Define to
3423 sparc64_elf_create_dynamic_sections.
3425 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3427 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3428 (elf_backend_omit_section_dynsym): Define to it.
3429 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3430 (elf_backend_omit_section_dynsym): Define to it.
3432 2005-01-07 Jakub Jelinek <jakub@redhat.com>
3434 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3435 PT_DYNAMIC segment, unless .dynamic.
3437 2005-01-06 Paul Brook <paul@codesourcery.com>
3439 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3440 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3441 * configure: Regenerate.
3442 * elf32-arm.c: Add VxWorks target bfd.
3444 (elf32_arm_link_hash_table): Add use_rel.
3445 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3446 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3447 Correct offset calculation for RELA case.
3448 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3449 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3450 (elf32_arm_vxworks_link_hash_table_create): New function.
3451 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3452 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3453 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3455 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3457 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3459 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3460 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3461 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3462 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3463 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3464 (toc_adjusting_stub_needed): Rewrite.
3465 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3466 toc tests. Adjust for toc_adjusting_stub_needed changes.
3467 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3468 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3469 * section.c: Expand comment on backend bits.
3470 * bfd-in2.h: Regenerate.
3471 * libbfd.h: Regenerate.
3473 2005-01-06 Alan Modra <amodra@bigpond.net.au>
3475 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3476 toc adjusting stub, do not test source section flags.
3478 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3480 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3481 from STABS debugging sections again.
3483 2005-01-05 Fred Fish <fnf@specifixinc.com>
3485 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3486 (find_abstract_instance_name): New function.
3487 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3488 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3489 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3491 2004-12-31 Paul Brook <paul@copdesourcery.com>
3493 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3495 2004-12-31 Alan Modra <amodra@bigpond.net.au>
3497 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3498 Commit missing changes from 2004-12-22.
3499 * bfd-in2.h: Regenerate.
3501 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3503 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3505 2004-12-21 Kris Warkentin <kewarken@qnx.com>
3507 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3508 Add 'base' argument for constructing register sections. Reformat.
3509 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3510 gp and fp regs. Reformat.
3512 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3514 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3515 * bfd-in2.h: Regenerate.
3516 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3517 (avr_reloc_map): Likewise.
3518 (avr_final_link_relocate): Likewise.
3520 2004-12-22 Alan Modra <amodra@bigpond.net.au>
3522 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3523 as-needed dynamic libs as undefined.
3524 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3525 libs when finding they are needed.
3527 2004-12-20 Alan Modra <amodra@bigpond.net.au>
3529 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3530 (opd_entry_value): Use opd_relocs if available.
3531 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3532 copy .opd relocations to opd_relocs.
3533 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3535 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
3537 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3538 * elf32-v850.c (v850_elf_howto_table): Add entry for
3539 R_V850_LO16_SPLIT_OFFSET.
3540 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3541 (v850_elf_perform_lo16_relocation): New function, extracted from...
3542 (v850_elf_perform_relocation): ...here. Use it to handle
3543 R_V850_LO16_SPLIT_OFFSET.
3544 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3545 R_V850_LO16_SPLIT_OFFSET.
3546 * libbfd.h, bfd-in2.h: Regenerate.
3548 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3550 * config.bfd: Add s390x-ibm-tpf support.
3552 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3554 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3555 to prototype, to make hash info available.
3556 Prevent wrapped symbols from being adjusted twice.
3558 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
3560 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3561 overflow for calls to undefined weak symbols.
3563 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3565 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3566 canonical sections syms have a name.
3568 2004-12-11 Alan Modra <amodra@bigpond.net.au>
3570 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3571 have been adjusted for output.
3572 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3574 2004-12-10 Alan Modra <amodra@bigpond.net.au>
3576 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3577 add symtab_hdr param.
3578 (group_signature): Update calls.
3579 * elf-bfd.h (bfd_elf_sym_name): Update.
3580 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3581 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3582 (ppc64_elf_relocate_section): Update.
3583 * elflink.c (elf_link_input_bfd): Update.
3585 2004-12-10 Jakub Jelinek <jakub@redhat.com>
3587 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3588 st_shndx on STT_SECTION sections.
3590 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3592 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3593 ELF section symbols.
3595 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3597 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3598 return a real value, unless it is a PLT symbol.
3599 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3602 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3603 R_MIPS_JALR entry to 0.
3605 * archures.c: Define bfd_mach_mips9000.
3606 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3607 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3608 * cpu-mips.c (I_mips9000): Define.
3609 (arch_info_struct): Add case for bfd_mach_mips9000.
3610 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3611 * bfd-in2.h: Regenerate.
3613 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3615 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3618 2004-12-07 Ben Elliston <bje@gnu.org>
3620 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3622 2004-12-06 Daniel Jacobowitz <dan@debian.org>
3624 Suggested by Fergal Daly <fergal@esatclear.ie>:
3625 * simple.c (simple_dummy_multiple_definition): New function.
3626 (bfd_simple_get_relocated_section_contents): Use it.
3628 2004-12-03 Jan Beulich <jbeulich@novell.com>
3630 * elf.c (elf_find_function): Don't use the last file symbol ever,
3631 seen, but the last one seen prior to the symbol being reported.
3632 Don't report a filename at all for global symbols when that might
3635 2004-12-01 Paul Brook <paul@codesourcery.com>
3637 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3638 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3641 2004-12-01 Paul Brook <paul@codesourcery.com>
3643 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3646 2004-11-30 Paul Brook <paul@codesourcery.com>
3648 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3649 no_pipeline_knowledge
3650 (elf32_arm_link_hash_table_create): Ditto.
3651 (bfd_elf32_arm_process_before_allocation): Ditto.
3652 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3654 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3656 * bfd-in2.h: Regenerate.
3658 2004-11-30 Randolph Chung <tausq@debian.org>
3660 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3661 (elf32_hppa_grok_psinfo): New function.
3662 (elf_backend_grok_prstatus): Define.
3663 (elf_backend_grok_psinfo): Define.
3665 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3668 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3670 2004-11-24 Paul Brook <paul@codesourcery.com>
3672 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3674 2004-11-24 Paul Brook <paul@codesourcery.com>
3676 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3677 (elf32_arm_swap_symbol_out): New function.
3678 (elf32_arm_size_info): Add.
3679 (elf_backend_size_info): Define.
3681 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3683 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3686 2004-11-19 Alan Modra <amodra@bigpond.net.au>
3688 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3689 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3690 * nlmcode.h (nlm_write_object_contents): Warning fix.
3692 2004-11-18 Bob Wilson <bob.wilson@acm.org>
3694 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3696 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3698 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3699 (elf32_arm_plt_thumb_stub): New.
3700 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3702 (elf32_arm_link_hash_traverse): Fix typo.
3703 (elf32_arm_link_hash_table): Add obfd.
3704 (elf32_arm_link_hash_newfunc): Initialize new fields.
3705 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3706 (elf32_arm_link_hash_table_create): Initialize obfd.
3707 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3708 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3709 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3710 interworking BFD is not dynamic.
3711 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3712 not emit glue for PLT references.
3713 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3714 emit glue for PLT references. Support the Thumb PLT prefix.
3715 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3717 (elf32_arm_check_relocs): Likewise.
3718 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3720 (allocate_dynrelocs): Handle Thumb PLT references.
3721 (elf32_arm_finish_dynamic_symbol): Likewise.
3722 (elf32_arm_symbol_processing): New function.
3723 (elf_backend_symbol_processing): Define.
3725 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3727 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3728 add_fde_encoding. Remove need_relative.
3729 * elf-eh-frame.c (extra_augmentation_string_bytes)
3730 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3731 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3732 in cases where the CIE has no existing 'R' augmentation. Use
3733 size_of_output_cie_fde when assigning offsets. Use the final offset
3734 as the new section size.
3735 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3736 Account for any extra augmentation bytes in the returned offset.
3737 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3738 moved before being modified. Pad growing entries with DW_CFA_nops.
3739 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3740 and add_fde_encoding.
3742 2004-11-15 Mark Mitchell <mark@codesourcery.com>
3744 * elf32-arm.c (elf32_arm_relocate_section): Use
3745 arm_real_reloc_type.
3747 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3749 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3750 for discard relocations; don't add an R_MIPS_NONE to the main body
3753 2004-11-04 Paul Brook <paul@codesourcery.com>
3755 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3756 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3757 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3758 default version definition for unversioned symbols.
3759 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3760 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3761 _bfd_elf_slurp_version_tables. Set default version for unversioned
3764 2004-11-15 Paul Brook <paul@codesourcery.com>
3766 * elflink.c (elf_link_add_object_symbols): Don't assume version
3767 indices are consecutive.
3769 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
3771 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3772 composite relocations against the personality data.
3774 2004-11-13 Paul Brook <paul@codesourcery.com>
3776 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3777 R_ARM_PREL31 relocations to PLT entries.
3778 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3779 (elf32_arm_check_relocs): Ditto.
3781 2004-11-12 Bob Wilson <bob.wilson@acm.org>
3783 * xtensa-isa.c (xtensa_interface_class_id): New.
3785 2004-11-11 Bob Wilson <bob.wilson@acm.org>
3787 * elf32-xtensa.c (property_table_compare): Remove assertion about
3788 entries with the same address and non-zero size.
3789 (xtensa_read_table_entries): Report such entries as errors.
3791 2004-11-11 Mark Mitchell <mark@codesourcery.com>
3793 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3794 R_ARM_RELATIVE on Symbian OS.
3796 2004-11-09 Mark Mitchell <mark@codesourcery.com>
3798 * som.c (som_bfd_print_private_bfd_data): New function.
3799 (som_object_setup): Save the auxiliary header. Don't assume that
3800 zero is an invalid entry point for a shared library.
3801 (som_object_p): Allocate the auxiliary header on the heap.
3803 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3805 (elf32_arm_symbian_modify_segment_map): Likewise.
3807 2004-11-09 Daniel Jacobowitz <dan@debian.org>
3809 From David Poole <daveml@mbuf.com>:
3810 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3811 (elf32_arm_size_dynamic_sections): Call it.
3813 2004-11-09 Alan Modra <amodra@bigpond.net.au>
3815 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3816 (ALL_MACHINES_CFILES): Fix typo.
3817 * Makefile.in: Regenerate.
3818 * po/SRC-POTFILES.in: Regenerate.
3820 2004-11-08 Mark Mitchell <mark@codesourcery.com>
3822 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3823 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3824 symbol in the relocation.
3826 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3827 Vineet Sharma <vineets@noida.hcltech.com>
3829 * coff-maxq.c: New File.
3830 * cpu-maxq.c: New File.
3831 * coffcode.h: Likewise.
3832 * config.bfd: Likewise.
3833 * configure.in (maxqcoff_vec): New target vector.
3834 * Makefile.am: Add support for maxq target.
3835 * configure.in: Likewise.
3836 * archures.c:. Likewise.
3837 * targets.c: Likewise.
3838 * bfd_in2.h : Regenerated.
3839 * Makefile.in: Regenerated.
3840 * configure: Regenerated.
3841 * doc/Makefile.in: Regenerated.
3843 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3845 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3846 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3847 C_NT_WEAK aux entries.
3848 (_bfd_coff_generic_relocate_section): Handle undefined
3851 2004-11-07 Andreas Schwab <schwab@suse.de>
3853 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3854 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3855 non-default visibility.
3857 2004-11-01 Mark Mitchell <mark@codesourcery.com>
3859 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3861 (elf32_arm_symbian_modify_segment_map): Don't
3862 reset includes_filehdr and includes_phdrs here.
3864 2004-11-04 Daniel Jacobowitz <dan@debian.org>
3866 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3867 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3868 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3870 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3871 to a new removed list. Remove normal configuration stanzas.
3872 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3873 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3874 elfarm-nabi.lo with elf32-arm.lo.
3875 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3876 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3877 * elf32-arm.h: Remove.
3878 * elfarm-oabi.c: Remove.
3879 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3880 and bfd_elf32_littlearm_oabi_vec.
3881 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3883 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
3885 * config.bfd: Support crisv32-*-* like cris-*-*.
3886 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3887 (bfd_mach_cris_v10_v32): New macros.
3888 * cpu-cris.c: Tweak formatting.
3889 (get_compatible): New function.
3891 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3892 bfd_arch_info_type:s.
3893 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3894 get_compatible for member compatible and link bfd_cris_arch_v32 as
3896 * elf32-cris.c (cris_elf_pcrel_reloc)
3897 (cris_elf_set_mach_from_flags): New functions.
3898 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3899 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3900 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3901 numbers for bfd_mach_cris_v32.
3902 (PLT_ENTRY_SIZE_V32): New macro.
3903 (elf_cris_plt0_entry): Drop last comma in initializer.
3904 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3905 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3907 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3909 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3910 (elf_cris_finish_dynamic_sections): Similar.
3911 (elf_cris_adjust_dynamic_symbol): Similar.
3912 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3914 <switch with PIC relocs>: Emit error and return FALSE for
3915 bfd_mach_cris_v10_v32.
3916 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3917 Emit warning when generating textrel reloc.
3918 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3919 (cris_elf_final_write_processing): Set flags according to mach.
3920 (cris_elf_print_private_bfd_data): Display
3921 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3922 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3923 new_flags. Don't call cris_elf_final_write_processing. Don't
3924 look at the actual elf header flags at all; use
3925 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3926 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3928 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3929 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3930 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3931 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3932 * bfd-in2.h, libbfd.h: Regenerate.
3934 2004-11-04 Alan Modra <amodra@bigpond.net.au>
3936 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3937 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3939 (struct adjust_toc_info): New.
3940 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3942 2004-11-03 Bob Wilson <bob.wilson@acm.org>
3944 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3945 if there are no segments.
3947 2004-11-02 Daniel Jacobowitz <dan@debian.org>
3949 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3951 2004-11-02 Nick Clifton <nickc@redhat.com>
3953 * elf32-iq2000.c: Convert to ISO C90 formatting.
3955 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
3957 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
3959 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3961 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3962 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3963 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3965 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3967 * elf32-sh.c (tpoff): Take alignment into account.
3969 2004-10-28 Nick Clifton <nickc@redhat.com>
3971 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
3972 performing a relocatable link.
3973 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3974 for MIPS ports under Irix.
3976 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
3978 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3979 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3980 (elf32_arm_final_link_relocate): Ditto.
3981 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3982 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3983 (elf32_arm_adjust_dynamic_symbol): Ditto.
3984 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3985 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3986 (elf32_arm_r_howto): ... To here.
3987 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3989 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3992 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3993 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3994 and R_IA64_SECREL64LSB.
3996 2004-10-26 Paul Brook <paul@codesourcery.com>
3998 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3999 (bfd_elf_size_dynamic_sections): Create default version definition.
4000 (elf_link_output_extsym): Adjust for default symbol version.
4002 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4004 * mmo.c: Adjust to ISO C.
4006 * mmo.c (mmo_write_section_description): New function broken out
4007 of mmo_internal_write_section.
4008 (mmo_internal_write_section): For each of .text and .data, call
4009 mmo_write_section_description before outputting contents if it has
4010 nontrivially deducible vma or contents.
4011 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4012 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4013 symbols if found within the .data address range.
4015 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4017 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4019 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4021 * mmo.c (File Layout): Correct place of misplaced blurb about
4024 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4026 * config.bfd: Add mips64*-*-openbsd.
4028 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4030 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4033 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4035 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4036 * configure: Regenerate.
4038 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4041 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4042 to linker reloc_overflow callback.
4043 (aout_link_input_section_ext): Likewise.
4044 (aout_link_reloc_link_order): Likewise.
4045 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4046 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4048 (alpha_relocate_section): Likewise.
4049 * coff-arm.c (coff_arm_relocate_section): Likewise.
4050 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4051 * coff-h8500.c (extra_case): Likewise.
4052 * coff-i960.c (coff_i960_relocate_section): Likewise.
4053 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4054 * coff-mips.c (mips_relocate_section): Likewise.
4055 * coff-or32.c (coff_or32_relocate_section): Likewise.
4056 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4057 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4058 * coff-sh.c (sh_relocate_section): Likewise.
4059 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4060 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4061 * coff-z8k.c (extra_case): Likewise.
4062 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4063 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4064 (_bfd_coff_generic_relocate_section): Likewise.
4065 * ecoff.c (ecoff_reloc_link_order): Likewise.
4066 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4067 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4068 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4069 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4070 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4071 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4072 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4073 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4074 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4075 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4076 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4077 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4078 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4079 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4080 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4081 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4082 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4083 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4084 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4085 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4086 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4087 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4088 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4089 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4090 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4091 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4092 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4093 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4094 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4095 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4096 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4097 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4098 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4099 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4100 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4101 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4102 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4103 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4104 * elflink.c (elf_reloc_link_order): Likewise.
4105 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4106 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4107 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4108 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4109 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4110 (aout_link_reloc_link_order): Likewise.
4111 * reloc.c (bfd_generic_get_relocated_section_contents):
4113 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4114 * simple.c (simple_dummy_reloc_overflow): Updated.
4116 2004-10-20 Andreas Schwab <schwab@suse.de>
4118 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4119 (elf_backend_plt_sym_val): Define.
4121 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4123 * config.bfd: Set targ_underscore=yes for PE COFF targets
4125 2004-10-19 Alan Modra <amodra@bigpond.net.au>
4127 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4128 (ppc64_elf_edit_opd): Likewise.
4130 2004-10-18 Mark Mitchell <mark@codesourcery.com>
4132 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4133 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4134 set SEC_ALLOC and SEC_LOAD.
4136 2004-10-18 Nick Clifton <nickc@redhat.com>
4138 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4139 'name' for relocs against both local and global symbols.
4141 2004-10-16 Daniel Jacobowitz <dan@debian.org>
4143 * bfd-in2.h: Regenerate.
4144 * bfd.c (struct bfd): Add no_export.
4145 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4147 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4149 * config.bfd: Whitespace cleanup.
4150 * Makefile.am: Run "make dep-am"
4151 * Makefile.in: Regenerate.
4153 2004-10-15 Jakub Jelinek <jakub@redhat.com>
4155 * elflink.c (struct already_linked_section): Removed.
4156 (try_match_symbols_in_sections, already_linked): Removed.
4157 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4158 prefix of section names when finding already_linked_table
4159 chain. Compare section names. Instead of calling already_linked,
4160 do it inline and only for sections in the same already_linked_list.
4162 2004-10-15 Alan Modra <amodra@bigpond.net.au>
4164 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4165 parameter. If called after _bfd_elf_write_section_eh_frame,
4166 don't allow a -2 return unless need_* bit is already set, and
4167 handle offsets adjusted for output_offset.
4168 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4169 * elf.c (_bfd_elf_section_offset): Update call.
4171 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4174 * coffcode.h (coff_compute_section_file_positions): Cast to
4175 bfd_vma when computing page alignment.
4177 2004-10-13 Mark Mitchell <mark@codesourcery.com>
4179 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4180 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4182 2004-10-12 Mark Mitchell <mark@codesourcery.com>
4184 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4185 relocations use a virtual address, not a section offset.
4187 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4189 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4190 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4191 xtensa_format_encode.
4192 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4193 (ebb_add_proposed_action): Delete.
4195 2004-10-12 Bob Wilson <bob.wilson@acm.org>
4197 * elf32-xtensa.c: Use ISO C90 formatting.
4199 2004-10-12 Paul Brook <paul@codesourcery.com>
4201 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4204 2004-10-12 Paul Brook <paul@codesourcery.com>
4206 * elf32-arm.h: Support EABI version 4 objects.
4208 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4211 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4212 Don't mark as default.
4213 (bfd_x86_64_arch): Don't mark as default.
4215 2004-10-12 Alan Modra <amodra@bigpond.net.au>
4217 * elflink.c (enum action_discarded): New.
4218 (elf_section_complain_discarded): Delete.
4219 (elf_action_discarded): New function subsuming the above and also
4220 controlling reloc behaviour.
4221 (elf_link_input_bfd): Use it.
4223 2004-10-11 Jakub Jelinek <jakub@redhat.com>
4225 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4226 (special_sections): Add .gnu.liblist and .gnu.conflict.
4227 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4229 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4232 * elflink.c (elf_link_input_bfd): Try harder to support
4233 relocations against symbols in removed linkonce sections.
4235 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4237 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4240 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4241 sections do not reference symbols in non-SEC_ALLOC sections.
4243 2004-10-11 Alan Modra <amodra@bigpond.net.au>
4246 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4247 (_bfd_elf_link_omit_section_dynsym): Formatting.
4249 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4251 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4252 * libbfd.h: Regnerate.
4253 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4254 * elf32-frv.c: Likewise.
4255 * elf32-m32r.c: Likewise.
4256 * elf32-ppc.c: Likewise.
4257 * elf64-hppa.c: Likewise.
4258 * elfxx-ia64.c: Likewise.
4259 * opncls.c: Likewise.
4261 2004-10-10 Alan Modra <amodra@bigpond.net.au>
4263 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4264 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4265 offsets stored in struct eh_cie_fde entries before doing other
4268 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4269 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4270 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4271 setting offsets for removed CIEs. Don't set "sec", instead set
4272 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4273 CIE in hdr_info. Only set make_relative and make_lsda_relative
4274 for CIEs. Use pointers rather than array indices.
4275 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4276 make_lsda_relative, need_* on cie_inf for FDEs.
4277 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4278 section output_offset. Delete cie_offset, instead use cie_inf
4279 pointer to CIE entry. Use need_relative and need_lsda_relative on
4280 CIE entry for FDEs. Use pointers rather than array indices.
4282 2004-10-09 Alan Modra <amodra@bigpond.net.au>
4284 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4285 bfd_is_target_special_symbol.
4286 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4287 * som.c (som_bfd_is_target_special_symbol): Define.
4289 2004-10-08 Nick Clifton <nickc@redhat.com>
4291 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4292 * configure: Regenerate.
4293 * bfd-in2.h: Regenerate.
4294 * syms.c (bfd_is_target_special_symbol): New interface function.
4295 Returns true when a symbol should be considered to be special.
4296 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4297 the symbol jump table.
4298 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4299 Return true iff the symbol is a mapping symbol.
4300 (bfd_elf32_bfd_is_target_special_symbol): Define.
4301 * elfxx-target.h: Provide a default definition for
4302 bfd_is_target_special_symbol.
4303 * aout-target.h: Likewise.
4304 * aout-tic30.c: Likewise.
4305 * binary.c: Likewise.
4306 * coffcode.h: Likewise.
4307 * i386msdos.c: Likewise.
4310 * libaout.h: Likewise.
4311 * libbfd-in.h: Likewise
4312 * libecoff.h: Likewise.
4313 * mach-o.c: Likewise.
4315 * nlm-target.h: Likewise.
4316 * oasys.c: Likewise.
4318 * ppcboot.c: Likewise.
4320 * tekhex.c: Likewise.
4321 * versados.c: Likewise.
4323 * xcoff-target.h: Likewise.
4325 * libbfd.h: Regenerate.
4327 2004-10-08 Daniel Jacobowitz <dan@debian.org>
4329 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4330 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4331 (elf_backend_section_from_shdr): Define.
4333 2004-10-08 Alan Modra <amodra@bigpond.net.au>
4335 * syms.c (bfd_is_local_label): Return false for file symbols.
4337 2004-10-07 Bob Wilson <bob.wilson@acm.org>
4338 David Heine <dlheine@tensilica.com>
4340 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4341 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4342 (elf32xtensa_no_literal_movement): New global variable.
4343 (elf_howto_table): Add entries for new relocations.
4344 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4345 (property_table_compare): When addresses are equal, compare sizes and
4346 various property flags.
4347 (property_table_matches): New.
4348 (xtensa_read_table_entries): Extend to read new property tables. Add
4349 output_addr parameter to indicate that output addresses should be used.
4350 Use bfd_get_section_limit.
4351 (elf_xtensa_find_property_entry): New.
4352 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4353 (elf_xtensa_check_relocs): Handle new relocations.
4354 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4355 relocations. Use new xtensa-isa.h functions.
4356 (build_encoding_error_message): Remove encode_result parameter. Add
4357 new target_address parameter used to detect alignment errors.
4358 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4359 error handling. Use new is_operand_relocation function.
4360 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4361 Use underbar macro for error messages. Formatting.
4362 (get_const16_opcode): New.
4363 (get_l32r_opcode): Add a separate flag for initialization.
4364 (get_relocation_opnd): Operand number is no longer explicit in the
4365 relocation. Change to decode the opcode and analyze its operands.
4366 (get_relocation_slot): New.
4367 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4368 Use new xtensa-isa.h functions to handle multislot instructions.
4369 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4370 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4371 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4372 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4373 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4374 get_single_format, init_op_single_format_table): New.
4375 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4376 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4377 (contract_asm_expansion): Add error_message parameter and pass it to
4378 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4379 with R_XTENSA_SLOT0_OP.
4380 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4381 instructions. Use new xtensa-isa.h functions.
4382 (r_reloc struct): Add new virtual_offset field.
4383 (r_reloc_init): Add contents and content_length parameters. Set
4384 virtual_offset field to zero. Add contents to target_offset field for
4385 partial_inplace relocations.
4386 (r_reloc_is_defined): Check for null.
4387 (print_r_reloc): New debug function.
4388 (source_reloc struct): Replace xtensa_operand field with pair of the
4389 opcode and the operand position. Add is_abs_literal field.
4390 (init_source_reloc): Specify operand by opcode/position pair. Set
4391 is_abs_literal field.
4392 (source_reloc_compare): When target_offsets are equal, compare other
4393 fields to make sorting predictable.
4394 (literal_value struct): Add is_abs_literal field.
4395 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4396 (init_literal_value): New.
4397 (is_same_value): Replace with ...
4398 (literal_value_equal): ... this function. Add comparisons of
4399 virtual_offset and is_abs_literal fields.
4400 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4401 failure. Initialize has_last_loc field.
4402 (value_map_hash_table_delete): New.
4403 (hash_literal_value): Rename to ...
4404 (literal_value_hash): ... this. Include is_abs_literal flag and
4405 virtual_offset field in the hash value.
4406 (get_cached_value): Rename to ...
4407 (value_map_get_cached_value): ... this. Update calls to
4408 literal_value_hash and literal_value_equal.
4409 (add_value_map): Check for allocation failure. Update calls to
4410 value_map_get_cached_value and literal_value_hash.
4411 (text_action, text_action_list, text_action_t): New types.
4412 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4413 text_action_add, text_action_add_literal, offset_with_removed_text,
4414 offset_with_removed_text_before_fill, find_insn_action,
4415 print_action_list, print_removed_literals): New.
4416 (offset_with_removed_literals): Delete.
4417 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4418 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4419 allocated_relocs_count fields.
4420 (init_xtensa_relax_info): Initialize new fields.
4421 (reloc_bfd_fix struct): Add new translated field.
4422 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4424 (fix_compare, cache_fix_array): New.
4425 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4426 section via get_xtensa_relax_info. Use cache_fix_array to set up
4427 sorted fix_array and use bsearch instead of linear search.
4428 (section_cache_t): New struct.
4429 (init_section_cache, section_cache_section, clear_section_cache): New.
4430 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4431 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4432 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4433 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4435 (retrieve_contents): Use bfd_get_section_limit.
4436 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4437 to compute_removed_literals. Free value_map_hash_table when no longer
4439 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4440 compute_text_actions for all sections.
4441 (find_relaxable_sections): Mark sections as relaxable if they contain
4442 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4443 call. Increment relax_info src_count field only for appropriate
4444 relocation types. Remove is_literal_section check.
4445 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4446 r_reloc_init and find_associated_l32r_irel. Check
4447 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4448 literals. Pass is_abs_literal flag to init_source_reloc.
4449 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4450 CONST16 instructions. Adjust calls to r_reloc_init and
4451 pcrel_reloc_fits. Handle weak symbols conservatively.
4452 (find_associated_l32r_irel): Add bfd parameter and pass it to
4454 (compute_text_actions, compute_ebb_proposed_actions,
4455 compute_ebb_actions, check_section_ebb_pcrels_fit,
4456 check_section_ebb_reduces, text_action_add_proposed,
4457 compute_fill_extra_space): New.
4458 (remove_literals): Replace with ...
4459 (compute_removed_literals): ... this function. Call
4460 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4461 Call xtensa_read_table_entries to get the property table. Skip
4462 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4463 is_removable_literal, remove_dead_literal, and
4464 identify_literal_placement functions.
4465 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4466 instead of linear search.
4467 (is_removable_literal, remove_dead_literal,
4468 identify_literal_placement): New.
4469 (relocations_reach): Update check for literal not referenced by any
4470 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4471 (coalesce_shared_literal, move_shared_literal): New.
4472 (relax_section): Use bfd_get_section_limit. Call
4473 translate_section_fixes. Update calls to r_reloc_init and
4474 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4475 Add call to pin_internal_relocs. Add special handling for
4476 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4477 info to calculate new addend_displacement variable. Replace code for
4478 deleting literals with more general code to perform the actions
4479 determined by the action_list for the section.
4480 (translate_section_fixes, translate_reloc_bfd_fix): New.
4481 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4482 find_removed_literal only if is_operand_relocation. Update call to
4483 offset_with_removed_text. Use new target_offset and removed_bytes
4485 (move_literal): New.
4486 (relax_property_section): Use bfd_get_section_limit. Set new
4487 is_full_prop_section flag and handle new property tables. Update calls
4488 to r_reloc_init and offset_with_removed_text. Check
4489 is_relaxable_asm_section flag. Handle expansion of zero-sized
4490 unreachable entries, with use of offset_with_removed_text_before_fill.
4491 For relocatable links, combine entries only for literal tables.
4492 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4493 calls to offset_with_removed_text. Translate st_size field for
4495 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4496 failure. Add contents parameter. Update call to get_bfd_fix. Update
4497 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4498 R_XTENSA_ASM_EXPAND relocs.
4499 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4500 call to get_bfd_fix. Include offset from contents for partial_inplace
4502 (is_reloc_sym_weak): New.
4503 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4504 (prop_sec_len): New.
4505 (xtensa_is_property_section): Handle new property sections.
4506 (is_literal_section): Delete.
4507 (internal_reloc_compare): When r_offset matches, compare r_info and
4508 r_addend to make sorting predictable.
4509 (internal_reloc_matches): New.
4510 (xtensa_get_property_section_name): Handle new property sections.
4511 (xtensa_get_property_predef_flags): New.
4512 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4513 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4514 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4515 (xtisa_errno, xtisa_error_msg): New variables.
4516 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4517 (xtensa_insnbuf_alloc): Add error handling.
4518 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4519 use xtensa_format_decode. Add error handling.
4520 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4521 instruction length to find the number of bytes to copy.
4522 (xtensa_isa_init): Add error handling. Replace calls to
4523 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4524 tables in the xtensa_modules structure.
4525 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4526 xtensa_extend_isa): Delete.
4527 (xtensa_isa_free): Change to only free lookup tables.
4528 (opname_lookup_compare): Replace with ...
4529 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4530 (xtensa_insn_maxlength): Rename to ...
4531 (xtensa_isa_maxlength): ... this.
4532 (xtensa_insn_length): Delete.
4533 (xtensa_insn_length_from_first_byte): Replace with ...
4534 (xtensa_isa_length_from_chars): ... this function.
4535 (xtensa_num_opcodes): Rename to ...
4536 (xtensa_isa_num_opcodes): ... this.
4537 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4538 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4539 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4540 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4541 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4542 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4543 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4544 (xtensa_opcode_lookup): Add error handling.
4545 (xtensa_decode_insn): Replace with ...
4546 (xtensa_opcode_decode): ... this function, with new format and
4547 slot parameters. Add error handling.
4548 (xtensa_encode_insn): Replace with ...
4549 (xtensa_opcode_encode): ... this function, which does the encoding via
4550 one of the entries in the "encode_fns" array. Add error handling.
4551 (xtensa_opcode_name): Add error handling.
4552 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4553 xtensa_opcode_is_call): New.
4554 (xtensa_num_operands): Replace with ...
4555 (xtensa_opcode_num_operands): ... this function. Add error handling.
4556 (xtensa_opcode_num_stateOperands,
4557 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4558 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4559 xtensa_operand_is_visible): New.
4560 (xtensa_get_operand, xtensa_operand_kind): Delete.
4561 (xtensa_operand_inout): Add error handling and special-case for
4563 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4564 operate on one slot of an instruction. Added error handling.
4565 (xtensa_operand_encode): Handle default operands with no encoding
4566 functions. Check for success by comparing against decoded value.
4568 (xtensa_operand_decode): Handle default operands. Return decoded value
4569 through argument pointer. Add error handling.
4570 (xtensa_operand_is_register, xtensa_operand_regfile,
4571 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4572 (xtensa_operand_isPCRelative): Rename to ...
4573 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4574 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4575 through argument pointer. Add error handling.
4576 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4577 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4578 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4579 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4580 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4581 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4582 xtensa_state_is_exported, xtensa_sysreg_lookup,
4583 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4584 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4585 xtensa_interface_num_bits, xtensa_interface_inout,
4586 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4587 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4588 * xtensa-modules.c: Rewrite to use new data structures.
4589 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4590 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4591 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4592 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4593 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4594 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4595 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4596 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4597 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4598 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4599 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4600 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4601 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4602 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4603 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4604 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4605 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4606 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4607 * Makefile.in: Regenerate.
4608 * bfd-in2.h: Likewise.
4609 * libbfd.h: Likewise.
4611 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
4613 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4614 against the absolute section.
4615 (mips_elf64_write_rela): Likewise.
4617 2004-10-07 Jan Beulich <jbeulich@novell.com>
4619 * elf.c (elf_find_function): Don't generally check for matching
4620 section, just for non-file symbols. Remove redunant comparison
4622 * elf32-arm.h (arm_elf_find_function): Likewise.
4624 2004-10-07 Jeff Baker <jbaker@qnx.com>
4626 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4627 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4630 2004-10-04 Roland McGrath <roland@redhat.com>
4632 * hash.c (bfd_hash_set_default_size): Use const for table.
4633 Use size_t instead of int for variable compared to sizeof results.
4635 2004-10-05 Alan Modra <amodra@bigpond.net.au>
4638 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4640 2004-10-01 Paul Brook <paul@codesourcery.com>
4642 * elf32-arm.h (elf32_arm_fake_sections,
4643 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4645 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4647 2004-10-01 Alan Modra <amodra@bigpond.net.au>
4649 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4651 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4652 need_relative or need_lsda_relative if we are processing an
4653 offset for a reloc on a FDE initial loc or LSDA field
4655 (_bfd_elf_write_section_eh_frame): Test need_relative and
4656 need_lsda_relative in place of corresponding make_* field
4657 when deciding to use pc-relative encodings.
4659 2004-09-30 Paul Brook <paul@codesourcery.com>
4661 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4662 target2 relocation type.
4664 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4667 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4669 2004-09-30 Paul Brook <paul@codesourcery.com>
4671 * reloc.c: Add BFD_RELOC_ARM_SMI.
4672 * bfd-in2.h: Regenerate.
4675 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4677 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4678 vma and output offset to address.
4679 * simple.c (simple_save_output_info): Only set output section
4680 and offset for debug sections, or those not already set up by
4682 (bfd_simple_get_relocated_section_contents): Update comment.
4684 2004-09-24 Alan Modra <amodra@bigpond.net.au>
4686 * elf.c (IS_LOADED): Delete.
4687 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4688 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4691 2004-09-23 Alan Modra <amodra@bigpond.net.au>
4694 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4695 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4696 redundant assignment of EM_SPARC.
4698 2004-09-22 Brian Ford <ford@vss.fsi.com>
4700 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4701 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4703 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4705 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4707 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4708 (elf_backend_modify_segment_map): Don't define.
4710 2004-09-22 Alan Modra <amodra@bigpond.net.au>
4712 * elf.c (IS_LOADED): Define.
4713 (assign_file_positions_for_segments): Don't round up file offset of
4714 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4715 Delete code handling link script adjustment of lma. Do the adjust
4716 in later code handling similar ajustments. Remove dead code error
4717 check. Warn if section lma would require a negative offset
4718 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4719 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4720 update voff in section loop. Change voff in segment loop to be an
4721 adjustment on top of "off". Set sec->filepos and update "off" later.
4722 Test for loadable sections consistently using IS_LOADED. Similarly,
4723 test for alloc-only sections other than .tbss consistently.
4724 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4725 Tidy PT_NOTE handling. Use %B and %A in error messages.
4726 (assign_file_positions_except_relocs): Use %B in error message.
4728 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4730 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4731 (CONFIG_STATUS_DEPENDENCIES): New.
4732 (Makefile): Removed.
4733 (config.status): Likewise.
4734 * Makefile.in: Regenerated.
4736 2004-09-17 Paul Brook <paul@codesourcery.com>
4738 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4739 (bfd_elf32_arm_process_before_allocation): Update prototype.
4740 * bfd-in2.h: Regenerate.
4741 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4742 (elf32_arm_link_hash_table_create): Set it.
4743 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4744 (bfd_elf32_arm_set_target_relocs): New function.
4745 (arm_real_reloc_type): New function.
4746 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4747 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4748 (elf32_arm_gc_sweep_hook): Ditto.
4749 (elf32_arm_check_relocs): Ditto.
4750 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4751 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4753 (elf32_arm_got_prel): New variable.
4754 (elf32_arm_howto_from_type): New function.
4755 (elf32_arm_info_to_howto): Use it.
4756 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4757 BFD_RELOC_ARM_TARGET2.
4758 * libbfd.h: Regenerate.
4759 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4761 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4763 * ecoff.c: Update u.undef.next refs.
4764 * elf64-ppc.c: Likewise.
4765 * elflink.c: Likewise.
4766 * linker.c: Likewise.
4767 * xcofflink.c: Likewise.
4769 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4770 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4771 fields to indirect struct.
4772 * elf-m10300.c: Update u.weakdef refs.
4773 * elf32-arm.h: Likewise.
4774 * elf32-cris.c: Likewise.
4775 * elf32-frv.c: Likewise.
4776 * elf32-hppa.c: Likewise.
4777 * elf32-i370.c: Likewise.
4778 * elf32-i386.c: Likewise.
4779 * elf32-m32r.c: Likewise.
4780 * elf32-m68k.c: Likewise.
4781 * elf32-ppc.c: Likewise.
4782 * elf32-s390.c: Likewise.
4783 * elf32-sh.c: Likewise.
4784 * elf32-sparc.c: Likewise.
4785 * elf32-vax.c: Likewise.
4786 * elf32-xtensa.c: Likewise.
4787 * elf64-alpha.c: Likewise.
4788 * elf64-hppa.c: Likewise.
4789 * elf64-ppc.c: Likewise.
4790 * elf64-s390.c: Likewise.
4791 * elf64-sh64.c: Likewise.
4792 * elf64-sparc.c: Likewise.
4793 * elf64-x86-64.c: Likewise.
4794 * elfxx-ia64.c: Likewise.
4795 * elfxx-mips.c: Likewise.
4796 * elflink.c: Likewise. Also u.elf_hash_value.
4797 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4799 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4800 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4801 (bfd_elf_gc_record_vtentry): Likewise.
4802 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4804 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4806 * Makefile.am: Run "make dep-am".
4807 * Makefile.in: Regenerate.
4808 * bfd-in2.h: Regenerate.
4809 * po/SRC-POTFILES.in: Regenerate.
4810 * po/bfd.pot: Regenerate.
4812 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4814 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4815 with bitfields. Make "type" and "other" bitfields too.
4816 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4817 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4818 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4819 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4820 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4821 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4822 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4823 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4824 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4825 * elf-m10300.c: Likewise.
4827 * elf32-arm.h: Likewise.
4828 * elf32-cris.c: Likewise.
4829 * elf32-frv.c: Likewise.
4830 * elf32-hppa.c: Likewise.
4831 * elf32-i370.c: Likewise.
4832 * elf32-i386.c: Likewise.
4833 * elf32-m32r.c: Likewise.
4834 * elf32-m68k.c: Likewise.
4835 * elf32-ppc.c: Likewise.
4836 * elf32-s390.c: Likewise.
4837 * elf32-sh-symbian.c: Likewise.
4838 * elf32-sh.c: Likewise.
4839 * elf32-sh64.c: Likewise.
4840 * elf32-sparc.c: Likewise.
4841 * elf32-vax.c: Likewise.
4842 * elf32-xtensa.c: Likewise.
4843 * elf64-alpha.c: Likewise.
4844 * elf64-hppa.c: Likewise.
4845 * elf64-ppc.c: Likewise.
4846 * elf64-s390.c: Likewise.
4847 * elf64-sh64.c: Likewise.
4848 * elf64-sparc.c: Likewise.
4849 * elf64-x86-64.c: Likewise.
4850 * elflink.c: Likewise.
4851 * elfxx-ia64.c: Likewise.
4852 * elfxx-mips.c: Likewise.
4853 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4854 * configure: Regenerate.
4855 * aclocal.m4: Regenerate.
4857 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4859 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4860 around uses of R_ARM_TARGET1.
4861 (elf32_arm_check_relocs): Likewise.
4863 2004-09-13 Paul Brook <paul@codesourcery.com>
4865 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4867 * bfd-in2.h: Regenerate.
4868 * libbfd.h: Regenerate.
4869 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4870 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4871 (bfd_elf32_arm_process_before_allocation): Ditto.
4872 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4873 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4874 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4877 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4879 * hpux-core.c (thread_section_p): New function.
4880 (hpux_core_core_file_p): Fix computation of offset in call
4881 to bfd_seek. Create a ".reg" section from an arbitrary
4882 ".reg/<id>" section if none was created after having read
4885 2004-09-11 Andreas Schwab <schwab@suse.de>
4887 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4888 * aclocal.m4: Rebuild.
4889 * configure: Rebuild.
4891 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4893 * section.c (bfd_sections_find_if): Fix parameter name in
4894 comment to match code.
4896 2004-09-10 Alan Modra <amodra@bigpond.net.au>
4898 * elf.c (assign_file_positions_except_relocs): Assign relocs
4899 stored in a bfd section.
4901 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
4903 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4904 h->gotplt_refcount to 0, not -1.
4906 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
4908 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4909 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4911 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4912 handle symbol visibility here.
4914 2004-09-07 Alan Modra <amodra@bigpond.net.au>
4916 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4917 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4919 (ppc_stub_name): Remove trailing "+0" on stub name.
4920 (create_linkage_sections): Create relocations for
4921 branch lookup table when --emit-relocs as well as when --shared.
4922 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4923 relbrlt test. For --emit-stub-syms, always output a sym even when
4924 one already exists on a plt call stub. Put stub type in the stub
4926 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4928 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4929 reloc_count in stub sections. Adjust relbrlt test.
4930 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4931 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4932 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4933 for relocs against discarded symbols. Fix comments.
4935 2004-09-06 Mark Mitchell <mark@codesourcery.com>
4937 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4938 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4940 (map_sections_to_segments): ... here. Use it. Assign a file
4941 position to the .dynamic section if it is not loadable, but part
4942 of the PT_DYNAMIC segment.
4943 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4944 offsets, not VMAs, for the BPABI. Do not fill in the header in
4945 the .got.plt section for the BPABI.
4946 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4948 (elf_backend_want_got_plt): Define to zero for Symbian OS.
4950 2004-09-06 Nick Clifton <nickc@redhat.com>
4952 * elflink.c (elf_link_add_object_symbols): Set the error code to
4953 bfd_error_wrong_format when the input format does not match the
4956 2004-09-06 Alan Modra <amodra@bigpond.net.au>
4958 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4959 (ppc64_elf_check_directives): ..here.
4960 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4961 before accessing ppc64_elf_tdata.
4962 (ppc64_elf_finish_dynamic_sections): And here too.
4964 2004-09-04 Alan Modra <amodra@bigpond.net.au>
4966 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4968 2004-09-03 Mark Mitchell <mark@codesourcery.com>
4970 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4971 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4972 (bfd_elf32_littlearm_symbian_vec): Likewise.
4973 * configure: Regenerated.
4974 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4975 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4976 (PLT_ENTRY_SIZE): Likewise.
4977 (bfd_vma_elf32_arm_symbian_plt_entry): New
4979 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4981 (create_got_section): Don't create sections when generating BPABI
4983 (elf32_arm_create_dynamic_sections): Tidy.
4984 (elf32_arm_link_hash_table_create): Set plt_header_size,
4985 plt_entry_size, and symbian_p.
4986 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4987 generating BPABI objects.
4988 (allocate_dynrelocs): Use htab->plt_header_size, not
4989 PLT_HEADER_SIZE. Do not add to .got.plt when
4990 generating BPABI objects.
4991 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4992 * elfarm-nabi.c: Add SymbianOS target vectors.
4993 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4994 (_bfd_elf_link_create_dynamic_sections): Likewise.
4995 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4996 (elfNN_bed): Use it.
4997 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4998 (bfd_elf32_littlearm_symbian_vec): Likewise.
4999 (_bfd_target_vector): Add them.
5001 2004-09-03 Nick Clifton <nickc@redhat.com>
5004 * coffcode.h (handle_COMDAT): Replace abort with an warning
5005 message and allow the scan to continue.
5007 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5009 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5010 in when reading relocs, not our sorted syms. Remove unnecessary
5013 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5015 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5017 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5019 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5020 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5021 replace uses of *_alias with *_noncanonical.
5022 * aclocal.m4: Rebuild with aclocal 1.4p6.
5023 * Makefile.in: Rebuild with automake 1.4p6.
5024 * doc/Makefile.in: Rebuild with automake 1.4p6.
5025 * configure.in: Autoupdate with autoupdate 2.59.
5026 * config.in: Regenerate with autoheader 2.59.
5027 * configure: Regnerate with autoconf 2.59.
5029 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5031 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5032 symbol pointer arrays before modifying.
5034 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5036 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5037 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5038 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5039 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5040 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5041 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5042 Use both symbol tables on non-relocatable objects. Use a common
5043 error exit. Fix "mid" warning.
5044 * libbfd.h: Regenerate.
5045 * bfd-in2.h: Regenerate.
5047 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5049 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5051 (struct sfpr_def_parms): Save some space.
5052 (sfpr_define): Here too.
5054 * elf64-ppc.c (compare_symbols): Put section syms first.
5055 (sym_exists_at): New function.
5056 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5057 points only for relocatable files. Use .opd section contents
5058 otherwise. Generally clean up the code.
5060 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5062 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5063 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5064 (struct sfpr_def_parms): New.
5065 (sfpr_define): New function.
5066 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5067 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5068 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5069 (savefpr1_tail, restfpr1_tail): New functions.
5070 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5071 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5072 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5073 code. Define all ABI mandated _save and _rest functions.
5075 2004-08-26 Paul Brook <paul@codesourcery.com>
5077 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5079 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5081 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5084 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5086 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5087 that pcrel correction is applied for R_386_PC32.
5089 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5091 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5092 for R_386_32 and R_386_PC32 relocs against symbols defined in
5095 2004-08-25 Dmitry Diky <diwil@spec.ru>
5097 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5098 Add new relocations.
5099 * bfd-in2.h: Regenerate.
5100 * libbfd.h: Regenerate.
5101 * elf32-msp430.c: Clean-up code.
5102 (elf_msp430_howto_table): Add new relocation entries.
5103 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5104 (msp430_elf_relax_section): New function.
5105 (msp430_elf_relax_delete_bytes): New function.
5106 (msp430_elf_symbol_address_p): New function.
5108 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5110 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5111 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5113 2004-08-20 Daniel Jacobowitz <dan@debian.org>
5115 * elflink.c (_bfd_elf_section_already_linked): Handle
5116 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5118 2004-08-19 Mark Mitchell <mark@codesourcery.com>
5120 * config.bfd (arm*-*-symbianelf*): New target.
5121 (arm*-*-eabi*): Likewise.
5123 2004-08-19 Alan Modra <amodra@bigpond.net.au>
5125 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5126 "struct ppc_link_hash_entry *".
5127 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5128 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5130 2004-08-19 Jakub Jelinek <jakub@redhat.com>
5132 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5133 entries (where fd_aux overlaps next entry's fd_func).
5134 Add non_overlapping argument, use it.
5135 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5136 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5137 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5138 as indexes into opd_sym_map/opd_adjust array.
5139 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5141 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5143 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5144 if we can look up their function descriptor in a regular file.
5146 2004-08-18 Nick Clifton <nickc@redhat.com>
5149 * cofflink.c (coff_link_add_symbols): Check that the comdat
5150 pointer in the coff_section_data structure has been initialised
5153 2004-08-18 Alan Modra <amodra@bigpond.net.au>
5156 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5157 changing bfd_link_hash_undefined to bfd_link_hash_new.
5159 2004-08-17 Jakub Jelinek <jakub@redhat.com>
5161 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5163 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5164 (synthetic_opd, synthetic_relocatable): New variables.
5165 (compare_symbols, compare_relocs): New helper routines.
5166 (ppc64_elf_get_synthetic_symtab): New function.
5167 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5169 * bfd-in2.h: Regenerated.
5170 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5171 to relsyms. Return 0 if abfd is relocatable.
5173 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5175 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5177 2004-08-17 Nick Clifton <nickc@redhat.com>
5179 * (is_arm_mapping_symbol_name): New function - return true
5180 when a symbol name matches the requirements for an ARM mapping
5182 (arm_elf_find_function): New function based on
5183 elf_find_function in elf.c but skipping ARM mapping symbols
5184 and including thumb function symbols.
5185 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5186 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5188 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5190 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5191 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5192 (ppc64_elf_brtaken_reloc): Here too.
5194 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5196 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5198 (ppc64_elf_check_directives): Check that we have the right hash
5199 table before proceeding.
5201 2004-08-17 Alan Modra <amodra@bigpond.net.au>
5203 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5204 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5205 the sections that will be discarded.
5207 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5209 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5211 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5213 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5214 free space available.
5216 2004-08-16 Alan Modra <amodra@bigpond.net.au>
5218 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5219 occurrences with bfd_byte * thoughout file.
5221 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5222 (xcoff_write_armap_big): Likewise.
5223 (xcoff_write_archive_contents_old): Likewise.
5224 (xcoff_write_archive_contents_big): Likewise.
5226 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5228 2004-08-13 Nick Clifton <nickc@redhat.com>
5230 * elf32-arm.h: Convert to ISO C90.
5232 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5235 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5238 2004-08-13 Alan Modra <amodra@bigpond.net.au>
5240 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5241 (bfd_archive_filename, bfd_get_section_ident): Delete.
5242 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5243 bfd_archive_filename.
5244 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5245 to warn about symbols in discarded sections. Use _bfd_error_handler.
5246 * aout-adobe.c (aout_adobe_callback): See below.
5247 * aout-cris.c (swap_ext_reloc_in): ..
5248 * coff-arm.c (find_thumb_glue, find_arm_glue,
5249 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5250 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5251 coff_arm_copy_private_bfd_data): ..
5252 * coff-i860.c (i860_reloc_processing): ..
5253 * coff-mcore.c (mcore_coff_unsupported_reloc,
5254 coff_mcore_relocate_section): ..
5255 * coff-ppc.c (coff_ppc_relocate_section): ..
5256 * coff-rs6000.c (xcoff_create_csect_from_smclas
5257 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5258 sh_swap_insns, sh_relocate_section): ..
5259 * coff-tic54x.c (tic54x_reloc_processing): ..
5260 * coff-tic80.c (coff_tic80_relocate_section): ..
5261 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5262 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5263 coff_slurp_symbol_table, coff_classify_symbol,
5264 coff_slurp_reloc_table): ..
5265 * coffgen.c (_bfd_coff_read_string_table): ..
5266 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5267 _bfd_coff_generic_relocate_section): ..
5268 * cpu-arm.c (bfd_arm_merge_machines): ..
5269 * cpu-sh.c (sh_merge_bfd_arch): ..
5270 * elf-hppa.h (elf_hppa_relocate_section): ..
5271 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5272 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5273 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5274 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5275 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5276 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5277 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5278 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5279 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5280 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5281 cris_elf_merge_private_bfd_data
5282 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5283 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5284 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5285 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5286 elf32_hppa_relocate_section): ..
5287 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5288 i370_elf_check_relocs, i370_elf_relocate_section): ..
5289 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5290 elf_i386_relocate_section): ..
5291 * elf32-m32r.c (m32r_elf_relocate_section,
5292 m32r_elf_merge_private_bfd_data): ..
5293 * elf32-m68hc1x.c (m68hc12_add_stub,
5294 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5295 * elf32-m68k.c (elf_m68k_relocate_section): ..
5296 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5297 mcore_elf_relocate_section): ..
5298 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5299 ppc_elf_check_relocs, ppc_elf_relocate_section,
5300 ppc_elf_begin_write_processing): ..
5301 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5302 elf_s390_relocate_section): ..
5303 * elf32-sh-symbian.c (sh_symbian_import_as,
5304 sh_symbian_process_embedded_commands,
5305 sh_symbian_relocate_section): ..
5306 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5307 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5308 sh_elf_merge_private_data): ..
5309 * elf32-sparc.c (elf32_sparc_check_relocs,
5310 elf32_sparc_relocate_section,
5311 elf32_sparc_merge_private_bfd_data): ..
5312 * elf32-v850.c (v850_elf_check_relocs,
5313 v850_elf_merge_private_bfd_data): ..
5314 * elf32-xtensa.c (elf_xtensa_check_relocs,
5315 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5316 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5317 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5318 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5319 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5320 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5321 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5322 ppc64_elf_relocate_section): ..
5323 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5324 elf_s390_relocate_section): ..
5325 * elf64-sh64.c (sh_elf64_relocate_section): ..
5326 * elf64-sparc.c (sparc64_elf_check_relocs,
5327 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5328 sparc64_elf_merge_private_bfd_data): ..
5329 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5330 elf64_x86_64_relocate_section): ..
5331 * elflink.c (_bfd_elf_add_default_symbol,
5332 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5333 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5334 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5335 elf_get_linked_section_vma, elf_fixup_link_order,
5336 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5337 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5338 * elfxx-ia64.c (elfNN_ia64_relax_section,
5339 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5340 * elfxx-mips.c (mips_elf_perform_relocation,
5341 _bfd_mips_elf_check_relocs,
5342 _bfd_mips_elf_merge_private_bfd_data): ..
5343 * ieee.c (ieee_slurp_external_symbols): ..
5344 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5345 * libbfd.c (_bfd_generic_verify_endian_match): ..
5346 * linker.c (_bfd_generic_link_add_one_symbol,
5347 _bfd_generic_section_already_linked): ..
5348 * pdp11.c (translate_to_native_sym_flags): ..
5349 * pe-mips.c (coff_pe_mips_relocate_section): ..
5350 * peicode.h (pe_ILF_build_a_bfd): ..
5351 * srec.c (srec_bad_byte): ..
5352 * stabs.c (_bfd_link_section_stabs): ..
5353 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5354 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5355 with corresponding %B and %A in _bfd_error_handler format string.
5356 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5357 calls to use %A and %B. Fix "against symbol .. from section" and
5358 similar error messages. Combine multiple _bfd_error_handler calls
5359 where they were separated due to bfd_archive_filename deficiencies.
5360 * bfd-in2.h: Regenerate.
5362 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5364 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5367 2004-08-10 Alan Modra <amodra@bigpond.net.au>
5369 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5370 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5371 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5373 (link_hash_newfunc): Init was_undefined.
5374 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5375 Use undefweak instead.
5376 (ppc64_elf_check_directives): Fix undefs chain.
5377 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5379 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5380 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5381 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5383 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5385 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5386 error, test input_section flags rather than sec.
5388 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5390 * elf-bfd.h (struct elf_backend_data): Add
5391 elf_backend_archive_symbol_lookup.
5392 (_bfd_elf_archive_symbol_lookup): Declare.
5393 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5394 (elf_link_add_archive_symbols): ..extracted from here. Call the
5396 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5397 (elfNN_bed): Init new field.
5398 * elf64-ppc.c (elf_backend_check_directives): Define.
5399 (elf_backend_archive_symbol_lookup): Define.
5400 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5401 a ppc_link_hash_entry pointer.
5403 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5404 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5405 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5406 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5407 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5408 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5409 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5412 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5414 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5415 (ppc64_elf_add_symbol_hook): Test for NULL section.
5416 (get_sym_h): Formatting.
5417 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5420 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5421 long branch stubs with code handling plt and r2off branch stubs.
5423 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5425 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5426 * elflink.c (elf_link_input_bfd): Formatting.
5427 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5429 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5430 (link_hash_newfunc): Don't set it.
5431 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5432 (ppc64_elf_mark_entry_syms): Delete.
5433 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5434 sections. Use get_opd_info.
5435 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5437 2004-08-09 Alan Modra <amodra@bigpond.net.au>
5439 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5441 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5442 (func_desc_adjust): Don't set have_undefweak.
5443 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5444 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5446 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5447 "struct ppc_link_hash_entry *". Adjust all references.
5448 (ppc64_elf_hide_symbol): Correct a comment.
5450 * elf64-ppc.c (get_opd_info): New function.
5451 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5452 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5453 before calling get_fdh. Test fdh rather than h before dereferencing
5454 fdh. Mark removed symbols in opd_adjust.
5455 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5456 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5458 (ppc64_elf_output_symbol_hook): Likewise.
5460 2004-08-06 Paul Brook <paul@codesourcery.com>
5462 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5463 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5464 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5465 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5466 and BFD_RELOC_ARM_SBREL32.
5467 * bfd-in2.h, bbfd.h: Regenerate.
5469 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5471 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5472 the dynamic link symbol actually in use.
5474 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5476 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5478 2004-07-31 Joel Brobecker <brobecker@gnat.com>
5479 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5481 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5482 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5484 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5485 Nick Clifton <nickc@redhat.com>
5488 * bfd.c (_bfd_default_error_handler): Make it global.
5490 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5492 * elf.c (assign_section_numbers): Cope gracefully with sections
5493 which have SHF_LINK_ORDER set but no sh_link set up.
5494 * elflink.c (elf_get_linked_section_vma): Likewise.
5496 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5499 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5500 Set it to _bfd_default_error_handler.
5501 (elfNN_bed): Add elf_backend_link_order_error_handler.
5503 * libbfd-in.h (_bfd_default_error_handler): New.
5505 * libbfd.h: Regenerated.
5507 2004-07-30 Jakub Jelinek <jakub@redhat.com>
5509 * archures.c (bfd_mach_sparc_64bit_p): Define.
5510 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5511 * bfd-in2.h: Rebuilt.
5513 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
5515 Introduce SH2a support.
5516 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5517 * archures.c (bfd_mach_sh2a_nofpu): New.
5518 * bfd-in2.h: Rebuilt.
5519 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5520 (arch_info_struct): Add sh2a_nofpu.
5521 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5522 2003-12-29 DJ Delorie <dj@redhat.com>
5523 * reloc.c: Add relocs for sh2a.
5524 * bfd-in2.h: Regenerate.
5525 * libbfd.hh: Regenerate.
5526 2003-12-01 Michael Snyder <msnyder@redhat.com>
5527 * archures.c (bfd_mach_sh2a): New.
5528 * bfd-in2.h: Rebuilt.
5529 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5531 (arch_info_struct): Add sh2a.
5532 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5534 2004-07-28 Nick Clifton <nickc@redhat.com>
5535 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5538 * som.c (setup_sections): Improve estimation of space sizes in
5539 relocatable objects.
5541 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5542 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5543 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5545 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5546 * configure: Regenerate.
5547 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5548 case that accepts OSABI=NetBSD and OSABI=SysV.
5549 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5550 the base of .got or .data (if .got does not exist).
5551 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5553 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5554 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5555 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5556 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5558 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5561 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5562 (elf_sec_group): Defined.
5563 (bfd_elf_match_symbols_in_sections): New prototype.
5564 (_bfd_elf_setup_group_pointers): Likewise.
5566 * elf.c (bfd_elf_discard_group): Abort.
5567 (bfd_elf_set_group_contents): Also include relocation sections.
5568 Remove zero-fill for ld -r.
5569 (_bfd_elf_setup_group_pointers): New function.
5570 (elf_sort_elf_symbol): Likewise.
5571 (elf_sym_name_compare): Likewise.
5572 (bfd_elf_match_symbols_in_sections): Likewise.
5574 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5576 * elflink.c (match_group_member): New.
5577 (elf_link_input_bfd): Check group member for discarded section.
5578 (try_match_symbols_in_sections): New function.
5579 (already_linked): Likewise.
5580 (_bfd_elf_section_already_linked): Support mixing comdat group
5581 and linkonce section.
5583 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5584 * linker.c (bfd_section_already_linked_table_traverse): New.
5586 * libbfd.h: Regenerated.
5588 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5590 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5591 BFD_RELOC_CRX_SWITCH32.
5592 * bfd-in2.h: Regenerate.
5593 * libbfd.h: Regenerate.
5594 * elf32-crx.c: Support relocation/relaxation of
5595 BFD_RELOC_CRX_SWITCH* types.
5597 2004-07-27 Alan Modra <amodra@bigpond.net.au>
5599 * elf64-ppc.c: Correct "Linker stubs" comment.
5601 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5603 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5605 (elf_linked_to_section): New.
5607 * elf.c (assign_section_numbers): Set up sh_link for
5610 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5611 to sh_link for SHT_IA_64_UNWIND sections.
5613 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5615 * elflink.c (elf_fixup_link_order): Add _() to error message.
5617 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5619 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5622 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5624 * aout-adobe.c (aout_32_section_already_linked): Defined.
5625 * aout-target.h (MY_section_already_linked): Likewise.
5626 * aout-tic30.c (MY_section_already_linked): Likewise.
5627 * binary.c (binary_section_already_linked): Likewise.
5628 * bout.c (b_out_section_already_linked): Likewise.
5629 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5630 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5631 * coffcode.h (coff_section_already_linked): Likewise.
5632 * i386msdos.c (msdos_section_already_linked): Likewise.
5633 * i386os9k.c (os9k_section_already_linked): Likewise.
5634 * ieee.c (ieee_section_already_linked): Likewise.
5635 * ihex.c (ihex_section_already_linked): Likewise.
5636 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5637 * mmo.c (mmo_section_already_linked): Likewise.
5638 * nlm-target.h (nlm_section_already_linked): Likewise.
5639 * oasys.c (oasys_section_already_linked): Likewise.
5640 * pef.c (bfd_pef_section_already_linked): Likewise.
5641 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5642 * som.c (som_bfd_discard_group): Likewise.
5643 * srec.c (srec_section_already_linked): Likewise.
5644 * tekhex.c (tekhex_section_already_linked): Likewise.
5645 * versados.c (versados_section_already_linked): Likewise.
5646 * vms.c (vms_section_already_linked): Likewise.
5647 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5648 * xsym.c (bfd_sym_section_already_linked): Likewise.
5650 * bfd-in.h (bfd_section_already_linked_table_init): New.
5651 (bfd_section_already_linked_table_free): Likewise.
5653 * coff-rs6000.c (rs6000coff_vec): Add
5654 _bfd_generic_section_already_linked.
5655 (pmac_xcoff_vec): Likewise.
5656 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5657 (aix5coff64_vec): Likewise.
5659 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5660 * elflink.c (_bfd_elf_section_already_linked): New function.
5662 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5664 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5665 (_bfd_generic_section_already_linked): New.
5666 (bfd_section_already_linked_hash_entry): Likewise.
5667 (bfd_section_already_linked): Likewise.
5668 (bfd_section_already_linked_table_lookup): Likewise.
5669 (bfd_section_already_linked_table_insert): Likewise.
5671 * linker.c (bfd_section_already_linked): New.
5672 (_bfd_section_already_linked_table): Likewise.
5673 (bfd_section_already_linked_table_lookup): Likewise.
5674 (bfd_section_already_linked_table_insert): Likewise.
5675 (already_linked_newfunc): Likewise.
5676 (bfd_section_already_linked_table_init): Likewise.
5677 (bfd_section_already_linked_table_free): Likewise.
5678 (_bfd_generic_section_already_linked): Likewise.
5680 * section.c (bfd_section): Remove comdat.
5681 (bfd_comdat_info): Moved to ...
5682 * bfd-in.h (coff_comdat_info): Here.
5683 (bfd_coff_get_comdat_section): New.
5684 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5685 * libcoff-in.h (coff_section_tdata): Add comdat.
5686 * coffcode.h (handle_COMDAT): Updated.
5687 * cofflink.c (coff_link_add_symbols): Likewise.
5688 * ecoff.c (bfd_debug_section): Likewise.
5690 * targets.c (bfd_target): Add _section_already_linked.
5691 (BFD_JUMP_TABLE_LINK): Updated.
5693 * bfd-in2.h: Regenerated.
5694 * libbfd.h: Likewise.
5695 * libcoff.h: Likewise.
5697 2003-07-21 Paul Brook <paul@codesourcery.com>
5699 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5700 elf_fixup_link_order): New functions.
5701 (bfd_elf_final_link): Call elf_fixup_link_order.
5703 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
5705 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5706 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5708 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5709 _bfd_elf_symbol_refs_local_p.
5710 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5713 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5715 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5717 (bfd_elf_get_dyn_lib_class): New prototype.
5718 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5720 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5721 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5722 entry is needed. Issue an error if a DT_NEEDED entry is needed
5723 for a file marked DYN_NO_NEEDED.
5724 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5727 * bfd-in2.h: Regenerated.
5729 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5731 * elflink.c (elf_section_complain_discarded): Don't complain in
5734 2004-07-10 James E Wilson <wilson@specifixinc.com>
5736 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5737 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5738 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5739 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5741 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5742 bfd_put_64 to bfd_putl64.
5743 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5745 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5748 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5749 .init/.fini sections when trying to relax it.
5751 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5753 * elf.c (assign_file_positions_for_segments): Make sure the
5754 .dynamic section is the first section in the PT_DYNAMIC segment.
5756 2004-07-09 Nick Clifton <nickc@redhat.com>
5758 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5759 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5760 sh_elf_get_flags_from_mach functions so that they do not conflict
5761 when this target is built with other sh-elf targets.
5762 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5763 suppression of this function.
5764 (sh_elf_find_flags): Likewise.
5766 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5768 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5769 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5770 (BFD32_BACKENDS): Add elf32-crx.lo.
5771 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5772 (cpu-crx.lo): New target.
5773 (elf32-crx.lo): New target.
5774 * Makefile.in: Regenerate.
5775 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5776 (bfd_archures_list): Add bfd_crx_arch.
5777 * bfd-in2.h: Regenerate.
5778 * config.bfd: Handle crx-*-elf*, crx*.
5779 * configure.in: Handle bfd_elf32_crx_vec.
5780 * configure: Regenerate.
5781 * cpu-crx.c: New file.
5782 * elf32-crx.c: Likewise.
5783 * libbfd.h: Regenerate.
5784 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5785 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5786 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5787 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5788 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5789 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5790 * targets.c (bfd_elf32_crx_vec): Declare.
5791 (bfd_target_vector): Add bfd_elf32_crx_vec.
5793 2004-07-06 Nick Clifton <nickc@redhat.com>
5795 * config.bfd: Add sh-symbian-elf target.
5796 * configure.in: Add bfd_elf32_shl_symbian_vec.
5797 * configure: Regenerate.
5798 * elf-bfd.h (struct elf_backend_data): Add new field
5800 * elflink.c (elf_link_add_object_symbols): Invoke the
5801 check_directives function, if defined.
5802 * elfxx-target.h: Provide a default, NULL definition for
5804 * targets.c: Add bfd_elf32_shl_symbian_vec.
5805 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5807 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5808 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5809 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5810 not already been defined.
5811 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5812 * sh-symbian.c: New file. Provide functions to support the
5813 * sh-symbian-elf target.
5814 * Makefile.am: Add elf32-sh-symbian.c
5815 * Makefile.in: Regenerate.
5817 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5819 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5820 * Makefile.am: Ran make dep-am.
5821 * Makefile.in: Ran make dep-in.
5823 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5825 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5828 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5830 * config.bfd: Add want64 to configuration target s390-*-linux*.
5832 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5834 * bfd.c (bfd_get_section_ident): New.
5836 * elflink.c (elf_link_read_relocs_from_section): Call
5837 bfd_get_section_ident to identify the section when reporting
5839 (_bfd_elf_link_output_relocs): Likewise.
5840 (elf_link_output_extsym): Likewise.
5841 (elf_link_input_bfd): Likewise.
5842 (bfd_elf_gc_record_vtinherit): Likewise.
5844 * bfd-in2.h: Regenerated.
5846 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5847 Nick Clifton <nickc@redhat.com>
5850 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5851 of section symbols to mips_elf_sort_hash_table ().
5853 2004-07-01 Alan Modra <amodra@bigpond.net.au>
5855 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5857 (elf_section_complain_discarded): New function. Handle
5858 .gcc_except_table too.
5859 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5860 in discarded sections.
5861 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5863 2004-06-30 James E Wilson <wilson@specifixinc.com>
5865 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5866 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5868 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5871 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5872 local references to discarded sections and report their
5875 2004-06-30 Alan Modra <amodra@bigpond.net.au>
5877 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5878 sec_info_type, test section name instead.
5880 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5883 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5884 in .init/.fini sections.
5886 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5888 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5889 bfd_get_section_limit.
5891 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5893 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5894 output section size.
5896 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5898 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5900 (mmix_elf_perform_relocation): Adjust for above change.
5901 (mmix_elf_relocate_section): Likewise.
5902 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5903 (mmix_elf_get_section_contents): Delete.
5904 (bfd_elf64_get_section_contents): Delete.
5905 (mmix_elf_relocate_section): Zero stub area.
5906 * linker.c (default_indirect_link_order): Alloc max of section size
5908 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5909 * section.c (bfd_malloc_and_get_section): Likewise.
5910 (struct bfd_section): Update rawsize comment.
5911 * bfd-in2.h: Regenerate.
5913 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5915 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5917 * bfd-in.h (bfd_get_section_limit): Define.
5918 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5919 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5920 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5921 * coff-arm.c (coff_arm_relocate_section): Likewise.
5922 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5923 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5924 (bfd_ns32k_final_link_relocate): Likewise.
5925 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5926 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5927 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5928 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5929 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5930 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5931 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5932 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5933 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5934 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5935 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5936 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5937 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5938 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5939 * elf32-v850.c (v850_elf_reloc): Likewise.
5940 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5941 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5942 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5943 * elf64-mips.c (mips_elf64_gprel32_reloc)
5944 (mips16_gprel_reloc): Likewise.
5945 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5946 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5947 * elf64-sparc.c (init_insn_reloc): Likewise.
5948 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5949 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5950 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
5951 (_bfd_mips_elf_generic_reloc): Likewise.
5952 * bfd-in2.h: Regenerate.
5954 2004-06-28 Alan Modra <amodra@bigpond.net.au>
5956 * bfd-in.h (struct stab_info): Move from stabs.c.
5957 * stabs.c (struct stab_link_includes_table): Delete.
5958 (stab_link_includes_lookup): Delete.
5959 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5960 level of indirection from sinfo parm.
5961 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5962 stabstr section. Adjust hash table accesses.
5963 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5964 alloc. Adjust stab_info test.
5965 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5966 (_bfd_coff_final_link): Adjust stab_info test.
5967 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5968 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5970 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5971 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5972 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5973 stabstr section. Adjust stab_info test.
5974 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5975 (_bfd_write_stab_strings): Adjust prototypes.
5976 * libbfd.h: Regenerate.
5977 * libcoff.h: Regenerate.
5978 * bfd-in2.h: Regenerate.
5980 2004-06-27 Mark Kettenis <kettenis@gnu.org>
5982 From Miod Vallat <miod@online.fr>:
5983 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5985 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
5987 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5988 (struct elf32_mn10300_link_hash_entry): Remove
5989 pcrel_relocs_copied.
5990 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5991 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5992 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5993 and gotoff relocations if the symbol doesn't bind locally. Use
5994 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5995 relocation for PCREL32.
5996 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5997 to test whether a symbol binds locally.
5998 (elf32_mn10300_link_hash_newfunc): Don't initialize
5999 pcrel_relocs_copied.
6000 (_bfd_mn10300_elf_discard_copies): Delete.
6001 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6003 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6005 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6007 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6009 * som.c (som_set_reloc_info): Correct small typo.
6011 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6013 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6014 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6015 (m32r_elf_gcsweep_hook): Likewise.
6016 (m32r_elf_check_relocs): Likewise.
6017 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6018 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6019 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6020 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6021 * bfd-in2.h: Regenerated.
6022 * libbfd.h: Regenerated.
6024 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6026 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6028 (elf64_x86_64_relocate_section): Issue an error for
6029 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6030 against global symbols when building shared library.
6032 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6034 * section.c (struct sec): Rename "_cooked_size" to "size".
6035 Rename "_raw_size" to "rawsize".
6036 (STD_SECTION): Adjust comments.
6037 (bfd_set_section_size, bfd_get_section_contents): Use size.
6038 (bfd_malloc_and_get_section): New function.
6039 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6040 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6041 Correctly free reloc and contents memory.
6042 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6043 and fake CIE now that we can shink section size to zero.
6044 (_bfd_elf_write_section_eh_frame): Likewise..
6045 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6046 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6047 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6048 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6049 unneeded indirection.
6050 * elf.c (_bfd_elf_section_offset): .. and update call.
6051 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6052 * libbfd.h: Regenerate.
6053 * bfd-in2.h: Regenerate.
6055 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6056 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6057 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6058 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6059 Similarly use "rawsize", if non-zero, in reloc functions to validate
6060 reloc addresses. Use new bfd_malloc_and_get_section in most places
6061 where bfd_get_section_contents was called. Expand all occurrences of
6062 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6063 grok_prstatus and similar functions to "size".
6064 * aix386-core.c (aix386_core_file_p): ..
6065 * aix5ppc-core.c (xcoff64_core_p): ..
6066 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6067 aout_adobe_set_section_contents): ..
6068 * aout-target.h (callback): ..
6069 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6070 MY_bfd_final_link): ..
6071 * aoutf1.h (sunos4_core_file_p): ..
6072 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6073 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6074 final_link, aout_link_input_section): ..
6075 * binary.c (binary_object_p, binary_canonicalize_symtab,
6076 binary_set_section_contents): ..
6077 * bout.c (b_out_callback, b_out_write_object_contents,
6078 b_out_set_section_contents, b_out_bfd_relax_section,
6079 b_out_bfd_get_relocated_section_contents): ..
6080 * cisco-core.c (cisco_core_file_validate): ..
6081 * coff-alpha.c (alpha_ecoff_object_p,
6082 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6083 * coff-arm.c (coff_arm_relocate_section,
6084 bfd_arm_allocate_interworking_sections): ..
6085 * coff-h8300.c (h8300_reloc16_extra_cases,
6086 h8300_bfd_link_add_symbols): ..
6087 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6088 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6089 ppc_bfd_coff_final_link): ..
6090 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6091 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6092 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6093 * coff64-rs6000.c (xcoff64_write_object_contents,
6094 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6095 * coffcode.h (coff_compute_section_file_positions,
6096 coff_write_object_contents): ..
6097 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6098 coff_section_symbol, build_debug_section): ..
6099 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6100 process_embedded_commands, _bfd_coff_link_input_bfd,
6101 _bfd_coff_write_global_sym): ..
6102 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6103 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6104 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6105 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6106 _bfd_dwarf2_find_nearest_line): ..
6107 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6108 ecoff_compute_section_file_positions,
6109 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6110 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6111 _bfd_elf_discard_section_eh_frame_hdr,
6112 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6113 _bfd_elf_write_section_eh_frame,
6114 _bfd_elf_write_section_eh_frame_hdr): ..
6115 * elf-hppa.h (elf_hppa_sort_unwind): ..
6116 * elf-m10200.c (mn10200_elf_relax_section,
6117 mn10200_elf_relax_delete_bytes,
6118 mn10200_elf_get_relocated_section_contents): ..
6119 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6120 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6121 mn10300_elf_relax_delete_bytes,
6122 mn10300_elf_get_relocated_section_contents,
6123 _bfd_mn10300_elf_adjust_dynamic_symbol,
6124 _bfd_mn10300_elf_discard_copies,
6125 _bfd_mn10300_elf_size_dynamic_sections,
6126 _bfd_mn10300_elf_finish_dynamic_sections): ..
6127 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6128 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6129 bfd_elf_set_group_contents, map_sections_to_segments,
6130 elf_sort_sections, assign_file_positions_for_segments,
6131 SECTION_SIZE, copy_private_bfd_data,
6132 _bfd_elf_get_dynamic_reloc_upper_bound,
6133 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6134 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6135 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6136 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6137 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6138 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6139 bfd_elf32_arm_process_before_allocation,
6140 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6141 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6142 elf32_arm_write_section): ..
6143 * elf32-cris.c (cris_elf_grok_prstatus,
6144 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6145 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6146 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6147 elf_cris_discard_excess_dso_dynamics,
6148 elf_cris_discard_excess_program_dynamics): ..
6149 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6150 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6151 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6152 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6153 elf32_frvfdpic_size_dynamic_sections,
6154 elf32_frvfdpic_modify_segment_map,
6155 elf32_frvfdpic_finish_dynamic_sections): ..
6156 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6157 elf32_h8_get_relocated_section_contents): ..
6158 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6159 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6160 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6161 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6162 elf32_hppa_finish_dynamic_sections): ..
6163 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6164 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6165 i370_elf_finish_dynamic_sections): ..
6166 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6167 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6168 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6169 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6170 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6171 * elf32-ip2k.c (ip2k_is_switch_table_128,
6172 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6173 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6174 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6175 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6176 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6177 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6178 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6179 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6180 m32r_elf_get_relocated_section_contents): ..
6181 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6182 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6183 m68hc11_elf_relax_delete_bytes): ..
6184 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6185 m68hc12_elf_size_one_stub): ..
6186 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6187 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6188 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6189 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6190 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6191 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6192 elf32_mips_grok_prstatus): ..
6193 * elf32-or32.c (or32_elf_consth_reloc): ..
6194 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6195 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6196 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6197 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6198 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6199 ppc_elf_final_write_processing): ..
6200 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6201 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6202 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6203 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6204 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6205 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6206 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6207 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6208 * elf32-sh64-com.c (sh64_address_in_cranges,
6209 sh64_get_contents_type): ..
6210 * elf32-sh64.c (sh64_find_section_for_address,
6211 sh64_elf_final_write_processing): ..
6212 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6213 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6214 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6215 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6216 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6217 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6218 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6219 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6220 elf_vax_finish_dynamic_sections): ..
6221 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6222 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6223 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6224 xstormy16_elf_finish_dynamic_sections): ..
6225 * elf32-xtensa.c (xtensa_read_table_entries,
6226 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6227 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6228 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6229 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6230 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6231 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6232 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6233 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6234 xtensa_callback_required_dependence): ..
6235 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6236 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6237 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6238 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6239 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6240 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6241 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6242 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6243 * elf64-hppa.c (allocate_dynrel_entries,
6244 elf64_hppa_size_dynamic_sections,
6245 elf64_hppa_finish_dynamic_sections): ..
6246 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6247 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6248 elf64_mips_grok_prstatus): ..
6249 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6250 mmix_elf_relocate_section, mmix_elf_final_link,
6251 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6252 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6253 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6254 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6255 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6256 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6257 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6258 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6259 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6260 ppc64_elf_finish_dynamic_sections): ..
6261 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6262 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6263 elf_s390_finish_dynamic_sections): ..
6264 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6265 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6266 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6267 sh64_elf64_finish_dynamic_sections): ..
6268 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6269 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6270 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6271 sparc64_elf_finish_dynamic_symbol,
6272 sparc64_elf_finish_dynamic_sections): ..
6273 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6274 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6275 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6276 elf64_x86_64_finish_dynamic_sections): ..
6277 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6278 * elfcode.h (elf_slurp_reloc_table): ..
6279 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6280 elf_finalize_dynstr, elf_link_add_object_symbols,
6281 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6282 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6283 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6284 elf32_mips_grok_prstatus): ..
6285 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6286 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6287 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6288 elfNN_ia64_finish_dynamic_sections): ..
6289 * elfxx-mips.c (mips_elf_create_procedure_table,
6290 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6291 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6292 mips_elf_global_got_index, mips_elf_multi_got,
6293 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6294 mips_elf_allocate_dynamic_relocations,
6295 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6296 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6297 _bfd_mips_elf_always_size_sections,
6298 _bfd_mips_elf_size_dynamic_sections,
6299 _bfd_mips_elf_finish_dynamic_symbol,
6300 _bfd_mips_elf_finish_dynamic_sections,
6301 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6302 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6303 _bfd_elf_mips_get_relocated_section_contents,
6304 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6305 * hp300hpux.c (callback): ..
6306 * hppabsd-core.c (make_bfd_asection): ..
6307 * hpux-core.c (make_bfd_asection): ..
6308 * i386linux.c (linux_link_create_dynamic_sections,
6309 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6310 * i386msdos.c (msdos_write_object_contents): ..
6311 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6312 os9k_set_section_contents): ..
6313 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6314 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6315 ieee_write_section_part, do_with_relocs, do_as_repeat,
6316 do_without_relocs, ieee_write_debug_part, init_for_output,
6317 ieee_set_section_contents): ..
6318 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6319 * irix-core.c (do_sections, make_bfd_asection): ..
6320 * libaout.h (aout_section_merge_with_text_p): ..
6321 * libbfd.c (_bfd_generic_get_section_contents,
6322 _bfd_generic_get_section_contents_in_window): ..
6323 * linker.c (default_indirect_link_order): ..
6324 * lynx-core.c (make_bfd_asection): ..
6325 * m68klinux.c (linux_link_create_dynamic_sections,
6326 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6327 * mach-o.c (bfd_mach_o_make_bfd_section,
6328 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6329 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6330 bfd_mach_o_scan_read_segment): ..
6331 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6332 _bfd_merge_sections): ..
6333 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6334 mmo_map_set_sizes, mmo_canonicalize_symtab,
6335 mmo_internal_write_section, mmo_write_object_contents): ..
6336 * netbsd-core.c (netbsd_core_file_p): ..
6337 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6338 nlm_alpha_set_public_section): ..
6339 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6340 * nlm32-sparc.c (nlm_sparc_write_import): ..
6341 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6342 nlm_compute_section_file_positions): ..
6343 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6344 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6345 * opncls.c (get_debug_link_info): ..
6346 * osf-core.c (make_bfd_asection): ..
6347 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6348 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6349 final_link, aout_link_input_section): ..
6350 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6351 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6352 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6353 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6354 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6355 * ptrace-core.c (ptrace_unix_core_file_p): ..
6356 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6357 _bfd_final_link_relocate, bfd_generic_relax_section,
6358 bfd_generic_get_relocated_section_contents): ..
6359 * reloc16.c (bfd_coff_reloc16_relax_section,
6360 bfd_coff_reloc16_get_relocated_section_c): ..
6361 * riscix.c (riscix_some_aout_object_p): ..
6362 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6363 * sco5-core.c (make_bfd_asection): ..
6364 * simple.c (bfd_simple_get_relocated_section_contents): ..
6365 * som.c (som_object_setup, setup_sections, som_prep_headers,
6366 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6367 som_set_reloc_info, som_get_section_contents,
6368 som_bfd_link_split_section): ..
6369 * sparclinux.c (linux_link_create_dynamic_sections,
6370 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6371 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6372 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6373 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6374 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6375 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6376 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6377 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6378 sunos_finish_dynamic_link): ..
6379 * syms.c (_bfd_stab_section_find_nearest_line): ..
6380 * tekhex.c (first_phase, tekhex_set_section_contents,
6381 tekhex_write_object_contents): ..
6382 * trad-core.c (trad_unix_core_file_p): ..
6383 * versados.c (process_esd, process_otr, process_otr): ..
6384 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6385 * vms-misc.c (add_new_contents): ..
6386 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6387 * vms.c (vms_set_section_contents): ..
6388 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6389 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6390 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6391 * xsym.c (bfd_sym_scan): .. See above.
6393 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6395 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6396 calling _bfd_merged_section_offset only for section symbols.
6398 2004-06-22 Alan Modra <amodra@bigpond.net.au>
6400 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6401 for handling SEC_MERGE symbols in relax_section.
6403 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6405 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6406 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6407 linked together. Mark the result as h8300sx code.
6409 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
6411 * elf-bfd.h (struct elf_backend_data): Added
6412 elf_backend_omit_section_dynsym.
6413 (_bfd_elf_link_omit_section_dynsym): Declare.
6414 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6415 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6416 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6417 (_bfd_elf_link_renumber_dynsyms): ... this function.
6418 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6419 _bfd_elf_link_omit_section_dynsym).
6420 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6422 2004-06-21 Nick Clifton <nickc@redhat.com>
6424 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6427 2004-06-17 Jerome Guitton <guitton@gnat.com>
6429 * bfd-in.h (bfd_cache_close_all): New function declaration.
6430 * bfd-in2.h: Regenerate.
6431 * cache.c (bfd_cache_close_all): New function definition.
6433 2004-06-16 Mark Kettenis <kettenis@gnu.org>
6435 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6437 * configure: Regenerate.
6439 2004-06-16 Daniel Jacobowitz <dan@debian.org>
6441 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6442 the pre-existing section.
6444 2004-06-15 Alan Modra <amodra@bigpond.net.au>
6446 * section.c (struct sec): Remove usused flags. Reorganize a little.
6447 (bfd_get_section_size_before_reloc): Delete.
6448 (bfd_get_section_size_after_reloc): Delete.
6449 (STD_SECTION): Update.
6450 (bfd_get_section_size_now): Delete.
6451 (bfd_set_section_contents): Don't referece reloc_done.
6452 (bfd_get_section_contents): Remove reloc_done comment.
6453 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6455 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6456 * ecoff.c (bfd_debug_section): Update initializer.
6457 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6458 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6459 * bfd-in.h (bfd_section_size): Expand.
6460 (bfd_get_section_size): New macro.
6461 * bfd-in2.h: Regenerate.
6462 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6463 bfd_get_section_size_before_reloc with bfd_get_section_size.
6464 * coffcode.h (coff_write_object_contents): Likewise.
6465 * coffgen.c (build_debug_section): Likewise.
6466 * dwarf1.c (parse_line_table): Likewise.
6467 (_bfd_dwarf1_find_nearest_line): Likewise.
6468 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6469 * i386msdos.c (msdos_write_object_contents): Likewise.
6470 * pdp11.c (squirt_out_relocs): Likewise.
6471 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6472 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6474 2004-06-14 Chris Demetriou <cgd@broadcom.com>
6476 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6477 removal) with updated comment.
6478 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6480 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6481 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6483 2004-06-12 Alan Modra <amodra@bigpond.net.au>
6485 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6486 overflow on branches to undefweaks.
6488 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6490 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6491 as ecoff_section_data() does not return a valid lvalue.
6493 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
6495 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6496 (elf_link_add_object_symbols): Likewise.
6498 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6499 (elf_backend_reloc_type_class): New.
6501 2004-06-08 Mark Kettenis <kettenis@gnu.org>
6503 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6505 * configure: Regenerate.
6507 2004-06-07 Daniel Jacobowitz <dan@debian.org>
6509 From: Albert Chin-A-Young <china@thewrittenword.com>
6510 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6513 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6515 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6518 2004-05-28 DJ Delorie <dj@redhat.com>
6520 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6521 for linking, but otherwise adjust reloc for merged sections.
6523 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6525 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6526 _bfd_merged_section_offset for local symbols.
6528 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6530 * Makefile.am: Regenerate dependencies.
6531 * Makefile.in: Regenerate.
6532 * archures.c: Add bfd_mach_sh3_nommu .
6533 * bfd-in2.h: Regenerate.
6534 * cpu-sh.c: Add sh3-nommu architecture.
6535 (bfd_to_arch_table): Create new table.
6536 (sh_get_arch_from_bfd_mach): Create new function.
6537 (sh_get_arch_up_from_bfd_mach): Create new function.
6538 (sh_merge_bfd_arch): Create new function.
6539 * elf32-sh.c (sh_ef_bfd_table): Add table.
6540 (sh_elf_check_relocs): Replace switch statement with
6541 use of sh_ef_bfd_table .
6542 (sh_elf_get_flags_from_mach): Add new function.
6543 (sh_find_elf_flags): Likewise.
6544 (sh_elf_copy_private_data): Replace most of non-elf contents
6545 with a call to sh_merge_bfd_arch() .
6547 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6549 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6550 * Makefile.in: Regenerate.
6552 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6554 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6555 custom calling conventions for dynamic symbols.
6556 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6557 symbol if it's an alias to a global one.
6559 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6561 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6564 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
6566 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6569 2004-05-26 Alan Modra <amodra@bigpond.net.au>
6571 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6572 for SHT_GROUP sections.
6574 2004-05-25 Alan Modra <amodra@bigpond.net.au>
6576 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6578 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6579 * merge.c: Formatting. Remove unnecessary casts. Expand
6580 bfd_get_section_alignment macro.
6581 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6582 use throughout file.
6583 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6584 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6585 section name to determine sinfo group, instead test output section
6587 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6588 _bfd_strip_section_from_output rather than just twiddling flags.
6589 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6590 (_bfd_merge_sections): Update prototype.
6591 * libbfd.h: Regenerate.
6593 2004-05-24 Mark Kettenis <kettenis@gnu.org>
6595 * netbsd-core.c: Correctly indent section that sets architecture
6598 From Miod Vallat <miod@online.fr>:
6599 * m88kopenbsd.c: New file.
6600 * targets.c (m88k_openbsd_vec): New.
6601 * config.bfd: Add m88k-*-openbsd*.
6602 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6603 (m88kopenbsd_vec): New.
6604 * configure: Regenerate.
6605 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6606 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6608 * Makefile.in: Regenerate.
6609 * po/SRC-POTFILES.in: Regenerate.
6611 2004-05-24 Nick Clifton <nickc@redhat.com>
6613 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6614 introduced by hash table size patch.
6616 2004-05-22 Ben Elliston <bje@au.ibm.com>
6618 * configure.in (is_release): Remove.
6619 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6620 (AC_OUTPUT): Don't output bfdver.h from version.h.
6621 * configure: Regenerate.
6622 * Makefile.am (RELEASE): New variable.
6623 (bfdver.h): New target.
6624 * Makefile.in: Regenerate.
6625 * doc/Makefile.in: Likewise.
6627 2004-05-22 Ben Elliston <bje@au.ibm.com>
6629 * Makefile.am (config.status): Don't depend on version.h.
6630 * Makefile.in: Regenerate.
6632 2004-05-22 Alan Modra <amodra@bigpond.net.au>
6634 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6635 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6636 * libbfd.h: Regenerate.
6637 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6638 (_bfd_elf_rel_local_sym): Likewise.
6639 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6640 (elf_link_input_bfd): Likewise.
6641 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6642 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6643 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6644 (elfNN_ia64_relocate_section): Likewise.
6646 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
6648 * hash.c (bfd_default_hash_table_size): New variable.
6649 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6650 (bfd_hash_set_default_size): New function. Set the default size
6651 to a selected prime number close to the argument. Document new
6653 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6654 * bfd-in2.h: Regenerate.
6655 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6656 * Makefile.in: Regenerate.
6658 2004-05-21 Mark Kettenis <kettenis@gnu.org>
6660 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6661 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6662 arm, m68k, m88k and hppa core files.
6664 2004-05-21 Nick Clifton <nickc@redhat.com>
6666 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6667 (bfd_bwrite): Likewise.
6668 (bfd_tell): Likewise.
6669 (bfd_flush): Likewise.
6670 (bfd_stat): Likewise.
6671 (bfd_seek): Likewise.
6672 (bfd_get_mtime): Likewise.
6673 (bfd_get_size): Likewise.
6675 2004-05-19 Ben Elliston <bje@au.ibm.com>
6677 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6679 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6681 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6682 (bfd_generic_openr_next_archived_file): Likewise.
6684 2004-05-17 Bob Wilson <bob.wilson@acm.org>
6686 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6687 section names by inserting a new substring after .gnu.linkonce, except
6688 for .gnu.linkonce.t.* where the "t." is replaced.
6690 2004-05-17 Adam Nemet <anemet@lnxw.com>
6692 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6693 (m68-*-lynxos* case): Likewise.
6694 (powerpc-*-lyxnos* case): New case.
6695 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6697 2004-05-17 David Heine <dlheine@tensilica.com>
6699 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6700 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6701 * bfd.c (bfd_copy_private_header_data): Define.
6702 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6704 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6705 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6706 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6707 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6708 segments by calling copy_private_bfd_data.
6709 (_bfd_elf_copy_private_header_data): Define.
6710 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6711 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6712 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6713 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6714 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6715 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6716 * som.c (som_bfd_copy_private_header_data): Define.
6717 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6718 * vms.c (vms_bfd_copy_private_header_data): Define.
6719 * bfd-in2.h: Regenerate.
6720 * libbfd.h: Regenerate.
6722 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6724 * elfxx-mips.c (MINUS_TWO): Define.
6725 (mips_elf_higher, mips_elf_highest,
6726 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6727 some bfd_vma values.
6728 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6730 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6732 * som.c (log2): Rename to exact_log2. Adjust all callers.
6734 2004-05-13 Paul Brook <paul@codesourcery.com>
6736 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6737 dwarf3 format CIE entries. Remove comment about the size of the
6738 ra_column field. It is now correctly deduced.
6740 2004-05-13 Joel Sherrill <joel@oarcorp.com>
6742 * config.bfd (or32-*-rtems*): Switch to elf.
6744 2004-05-13 Nick Clifton <nickc@redhat.com>
6746 * po/fr.po: Updated French translation.
6748 2004-05-11 Jakub Jelinek <jakub@redhat.com>
6750 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6751 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6752 Adjust counting of last_local.
6753 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6754 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6755 created by the linker nor !SHF_ALLOC.
6757 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6758 DT_PLTGOT to the start of the .got.plt section instead of the
6759 .got output section. Set sh_entsize for .got section in addition
6761 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6762 is at sgot->output_section->vma.
6763 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6764 DT_PLTGOT to the start of the .got.plt section instead of the
6765 .got output section.
6766 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6767 is at sgot->output_section->vma. Set sh_entsize for .got section
6768 in addition to .got.plt.
6769 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6770 (bfd_section_from_phdr): Likewise.
6771 (map_sections_to_segments): Likewise.
6772 (assign_file_positions_for_segments): Likewise.
6773 (get_program_header_size): Likewise.
6774 * elflink.c (bfd_elf_size_dynamic_sections): Set
6775 elf_tdata (output_bfd)->relro from info->relro.
6776 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6778 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
6780 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6781 a zero symndx for which we hadn't accounted a dynamic relocation.
6782 (_frvfdpic_add_rofixup): Likewise.
6784 2004-05-07 Brian Ford <ford@vss.fsi.com>
6785 DJ Delorie <dj@redhat.com>
6787 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6788 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6789 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6790 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6792 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
6794 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6795 immediately if there's no link info.
6796 (elf32_frvfdpic_copy_private_bfd_data): New.
6797 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6799 2004-05-06 Zack Weinberg <zack@codesourcery.com>
6801 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6802 filename argument is null; do not call strlen on a null pointer.
6804 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
6806 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6809 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
6811 * configure.in (bfd_elf32_frvfdpic_vec): New.
6812 * configure: Rebuilt.
6813 * targets.c (bfd_elf32_frvfdpic_vec): New.
6814 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6816 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6817 frvfdpic instead of frv. Rearrange elf-target macros such that
6818 the FDPIC-specific ones are only defined for this new target
6820 (bfd_elf32_frvfdpic_vec): Declare.
6822 (elf32_frv_relocate_section): Use it to enable segment checking
6823 and to control rofixup emission. Add output section vma to
6824 applied relocation in non-LOAD non-ALLOC sections. Use
6825 _bfd_error_handler for errors.
6826 (_frv_create_got_section): Create .rel.got and .rofixup only in
6827 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6829 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6830 (elf32_frvfdpic_modify_segment_map): Likewise.
6831 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6832 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6833 error message if we miscompute the rofixup size.
6834 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6835 (frvfdpic_elf_encode_eh_address): Likewise.
6836 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6837 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6838 relocs. Reject unknown relocation types.
6839 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6840 (frv_elf_merge_private_bfd_data): Likewise.
6841 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6842 0x4000 for newly-added elf32-frvfdpic.
6844 2004-05-05 Nick Clifton <nickc@redhat.com>
6847 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6848 returning NULL as most users of this function do not check its
6850 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6851 of bfd_cache_lookup().
6852 * sco5-core.c (sco5_core_file_p): Likewise.
6853 * trad-core.c (trad_unix_core_file_p): Likewise.
6855 2004-05-05 Nick Clifton <nickc@redhat.com>
6857 * cache.c (bfd_cache_lookup): Improve formatting.
6858 * archive.c: Fix formatting.
6860 2004-05-05 Peter Barada <peter@the-baradas.com>
6862 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6863 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6864 * bfd-in2.h(bfd_architecture): Regenerate.
6866 2004-05-03 Alan Modra <amodra@bigpond.net.au>
6868 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6870 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6871 those against discarded link-once and SEC_MERGE section symbols.
6873 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6875 * section.c (bfd_get_section_by_name_if): New.
6876 * bfd-in2.h: Regenerated.
6878 2004-05-02 Alan Modra <amodra@bigpond.net.au>
6880 * som.c (som_bfd_is_group_section): Define.
6882 2004-05-01 Alan Modra <amodra@bigpond.net.au>
6884 * section.c (bfd_make_section_anyway): Copy the whole
6885 bfd_hash_entry, not just "next" from existing entry.
6887 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6889 * elf.c (bfd_section_from_shdr): Maintain the section order in
6891 (special_sections): Add ".note.GNU-stack".
6892 (elf_fake_sections): Handle section group for relocatable
6895 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6897 * section.c (bfd_sections_find_if): New.
6898 * bfd-in2.h: Regenerated.
6900 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6902 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6904 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6905 * elf.c (bfd_elf_is_group_section): New function.
6906 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6907 * section.c (bfd_generic_is_group_section): New function.
6908 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6909 (BFD_JUMP_TABLE_LINK): Adjust.
6910 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6911 * aout-target.h (MY_bfd_is_group_section): Define.
6912 * aout-tic30.c (MY_bfd_is_group_section): Define.
6913 * bfd.c (bfd_is_group_section): Define.
6914 * binary.c (binary_bfd_is_group_section): Define.
6915 * bout.c (b_out_bfd_is_group_section): Define.
6916 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6917 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6918 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6919 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6920 * coffcode.h (coff_bfd_is_group_section): Define.
6921 * i386msdos.c (msdos_bfd_is_group_section): Define.
6922 * i386os9k.c (os9k_bfd_is_group_section): Define.
6923 * ieee.c (ieee_bfd_is_group_section): Define.
6924 * ihex.c (ihex_bfd_is_group_section): Define.
6925 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6926 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6927 * mmo.c (mmo_bfd_is_group_section): Define.
6928 * nlm-target.h (nlm_bfd_is_group_section): Define.
6929 * oasys.c (oasys_bfd_is_group_section): Define.
6930 * pef.c (bfd_pef_bfd_is_group_section): Define.
6931 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6932 * srec.c (srec_bfd_is_group_section): Define.
6933 * tekhex.c (tekhex_bfd_is_group_section): Define.
6934 * versados.c (versados_bfd_is_group_section): Define.
6935 * vms.c (vms_bfd_is_group_section): Define.
6936 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6937 * bfd-in2.h: Regenerate.
6938 * libbfd.h: Regenerate.
6940 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6942 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6944 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
6946 * configure.in: Update version to 2.15.91.
6947 * configure: Regenerate.
6949 2004-04-29 Brian Ford <ford@vss.fsi.com>
6951 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6952 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6953 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6954 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6955 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6956 .gnu.linkonce.wi. sections.
6957 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6958 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6960 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6961 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6963 2004-04-28 Chris Demetriou <cgd@broadcom.com>
6965 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6966 * bfd-in2.h: Regenerate.
6967 * libbfd.h: Likewise.
6969 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6971 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6973 (setup_sections): Use som_subspace_dictionary_record struct instead
6974 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6975 is_comdat, is_common or dup_common.
6976 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6977 is_comdat, is_common and dup_common in section subspace_dict from
6979 (som_begin_writing): Use som_subspace_dictionary_record struct.
6980 (som_finish_writing): Likewise.
6981 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6982 is_common and dup_common flags in info for symbol. Add comment
6983 regarding linker support for these fields. Slightly reorganize
6985 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6986 dup_common fields in symbol table from symbol info.
6987 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6988 arguments. Set corresponding fields in copy_data. Change all callers.
6989 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6991 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6992 * som.h (som_subspace_dictionary_record): Define.
6993 (som_copyable_section_data_struct): Add is_comdat, is_common and
6995 (som_section_data_struct): Use som_subspace_dictionary_record struct
6996 instead of subspace_dictionary_record.
6997 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6999 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7001 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7002 if set. Check reloc_done flag before applying relocations. Use
7003 output addresses, both when applying relocations and when comparing
7004 against the specified section.
7005 (elf_xtensa_relocate_section): Use output address to check if dynamic
7006 reloc is in a literal pool. Set section's reloc_done flag.
7008 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7010 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7011 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7013 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7016 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7018 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7019 structure field removed in 2004-04-24 patch.
7020 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7022 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7024 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7025 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7026 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7027 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7028 field before calling elf_backend_section_flags.
7030 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7032 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7033 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7034 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7035 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7036 and BFD_RELOC_32_PCREL.
7037 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7038 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7039 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7040 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7041 (mips_elf_next_relocation): Move comment about matching HI/LO
7043 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7044 R_MIPS_GNU_REL_HI16.
7046 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7048 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7049 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7050 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7051 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7052 and update comments to reflect current usage.
7053 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7054 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7056 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7057 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7058 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7059 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7060 type number to be MIPS_R_PCREL16.
7061 (mips_relocate_section): Remove support for link-time relaxation
7062 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7063 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7064 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7065 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7066 relaxation of branches used by embedded-PIC.
7067 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7068 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7069 related members, update comment.
7070 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7071 code related to embedded-PIC.
7072 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7073 initialization of now-removed 'adjust' member of
7074 'struct ecoff_debug_info'.
7076 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7078 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7080 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7082 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7083 relocs for locally defined symbols during -shared final link.
7084 (elf32_arm_final_link_relocate): Likewise.
7086 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7088 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7089 ELF_LINK_POINTER_EQUALITY_NEEDED.
7090 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7091 if r_type is not R_X86_64_PC32.
7092 (elf64_x86_64_finish_dynamic_symbol): If
7093 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7096 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7098 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7099 (elf_backend_plt_sym_val): Define.
7101 2004-04-22 Andrew Cagney <cagney@redhat.com>
7103 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7105 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7107 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7109 * som.c (som_set_section_contents): Constantify second argument.
7110 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7111 (som_object_setup): Rework to avoid warning.
7112 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7115 2004-04-22 Andrew Cagney <cagney@redhat.com>
7117 * cache.c (bfd_cache_close): Check for a previously closed file.
7119 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7121 * bfd.c (bfd_get_synthetic_symtab): Define.
7122 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7123 NAME##_get_synthetic_symtab.
7124 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7125 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7126 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7128 (_bfd_elf_get_synthetic_symtab): New prototype.
7129 * elfcode.h (elf_get_synthetic_symtab): Define.
7130 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7131 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7132 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7133 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7134 * bfd-in2.h: Rebuilt.
7135 * libbfd.h: Rebuilt.
7136 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7137 (elf_backend_plt_sym_val): Define.
7138 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7139 (elf_backend_plt_sym_val): Define.
7140 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7141 (elf_backend_plt_sym_val): Define.
7142 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7143 (elf_backend_plt_sym_val): Define.
7144 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7145 (elf_backend_plt_sym_val): Define.
7146 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7147 (elf_backend_plt_sym_val): Define.
7148 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7149 (elf_backend_plt_sym_val): Define.
7150 * aout-target.h (MY_get_synthetic_symtab): Define.
7151 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7152 * coff-rs6000.c (rs6000coff_vec): Add
7153 _bfd_nodynamic_get_synthetic_symtab.
7154 (pmac_xcoff_vec): Likewise.
7155 * coff64-rs6000.c (rs6000coff64_vec): Add
7156 _bfd_nodynamic_get_synthetic_symtab.
7157 (aix5coff64_vec): Likewise.
7158 * sunos.c (MY_get_synthetic_symtab): Define.
7159 * vms.c (vms_get_synthetic_symtab): Define.
7161 2004-04-22 Nick Clifton <nickc@redhat.com>
7163 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7165 2004-04-22 Peter Barada <peter@the-baradas.com>
7167 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7168 * bfd2-in.h: Regenerate.
7169 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7171 2004-04-21 Chris Demetriou <cgd@broadcom.com>
7173 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7174 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7175 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7176 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7177 * bfd-in2.h: Regenerate.
7179 2004-04-21 Bob Wilson <bob.wilson@acm.org>
7181 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7182 require relocations against a weak symbol to reference the same
7183 symbol hash entry if not a final, static link.
7184 (get_cached_value, add_value_map): Add final_static_link argument.
7185 (remove_literals): Pass final_static_link argument as needed.
7187 2004-04-21 Andrew Cagney <cagney@redhat.com>
7189 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7190 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7191 (opncls_bwrite, opncls_bclose, opncls_bflush)
7192 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7193 bfd iovec that uses function callbacks.
7194 (bfd_close): Use the iovec's bclose.
7195 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7196 (cache_bclose, cache_bflush, cache_bstat)
7197 (cache_iovec): New functions and global variable, implement a
7198 cache "iovec", where applicable set bfd_error.
7199 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7200 * bfdio.c (struct bfd_iovec): Define.
7201 (real_read): Delete function.
7202 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7203 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7204 assume that bread and bwrite set bfd_error.
7205 * bfd.c (struct bfd): Add "iovec", update comments.
7206 * bfd-in2.h, libbfd.h: Re-generate.
7208 2004-04-21 Andrew Cagney <cagney@redhat.com>
7210 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7212 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7214 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7215 (bfd_elf_gc_sections): Fail if a shared object is being created.
7216 Do not fail if dynamic sections have been created. Instead call
7217 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7218 dynamically referenced symbols. Do not mark the whole graph
7219 rooted at .eh_frame, only the section proper.
7221 2004-04-20 DJ Delorie <dj@redhat.com>
7223 * reloc.c: Add BFD_RELOC_32_SECREL.
7224 * bfd-in2.h: Regenerate.
7225 * libbfd.h: Likewise.
7226 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7227 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7228 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7230 2004-04-19 Jakub Jelinek <jakub@redhat.com>
7232 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7233 relocs against hidden/protected undefweak symbols properly.
7234 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7236 2004-04-18 Mark Kettenis <kettenis@gnu.org>
7238 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7239 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7242 2004-04-17 Brian Ford <ford@vss.fsi.com>
7244 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7245 filepos for the SizeOfHeaders field.
7246 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7248 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7250 2004-04-16 Alan Modra <amodra@bigpond.net.au>
7252 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7253 change reloc_done. Set and restore _cooked_size.
7256 2004-04-15 Mark Kettenis <kettenis@gnu.org>
7258 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7261 2004-04-15 Nick Clifton <nickc@redhat.com>
7263 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7265 2004-04-15 Alan Modra <amodra@bigpond.net.au>
7267 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7269 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7271 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7272 when it is a definition.
7274 2004-04-14 Alan Modra <amodra@bigpond.net.au>
7276 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7277 when statically linking PIC code.
7278 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7280 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7282 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7283 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7284 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7285 * configure: Regenerate.
7287 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
7289 * elflink.c: Include libiberty.h.
7290 * Makefile.am (elflink.lo): Depend on libiberty.h.
7291 * Makefile.in: Regenerate.
7293 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
7295 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7298 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7300 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7301 reserve the memory for dynamic linker
7303 2004-04-05 Mark Kettenis <kettenis@gnu.org>
7305 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7306 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7308 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7310 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7311 RELOC_FOR_GLOBAL_SYMBOL.
7312 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7314 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7316 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7317 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7319 2004-04-01 Paul Brook <paul@codesourcery.com>
7321 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7322 * elf32-arm.h (struct elf32_elf_section_map): New.
7323 (struct _arm_elf_section_data): New.
7324 (elf32_arm_section_data): Define.
7325 (struct elf32_arm_link_hash_table): Add byteswap_code.
7326 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7327 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7328 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7329 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7330 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7331 (bfd_elf32_new_section_hook, elf_backend_write_section,
7332 elf_backend_link_output_symbol_hook): Define.
7334 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
7336 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7337 that keeps the characters in a B_INCL..B_EINCL range.
7338 (_bfd_link_section_stabs): When computing the sum of the
7339 characters in a B_INCL..B_EINCL range also keep a copy of those
7340 characters. Use this information to distinguish between
7341 include sections that have the same sum and the same length
7342 but which are nevertheless unique.
7344 2004-03-31 Paul Brook <paul@codesourcery.com>
7346 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7347 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7349 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
7351 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7352 to 'sum_chars' and add field 'num_chars'.
7353 (_bfd_link_section_stabs): When computing the sum of the
7354 characters in a B_INCL..B_EINCL range also keep a count of the
7355 number of characters. Use this information to help distinguish
7356 between include sections when have the same sum but which
7357 nevertheless are still unique.
7359 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
7361 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7363 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
7364 Tomer Levi <Tomer.Levi@nsc.com>
7366 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7367 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7368 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7369 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7370 (cpu-cr16c.lo): New target.
7371 (elf32-cr16c.lo): Likewise.
7372 * Makefile.in: Regenerate.
7373 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7374 (bfd_archures_list): Add bfd_cr16c_arch.
7375 * config.bfd: Handle cr16c-*-elf*.
7376 * configure.in: Handle bfd_elf32_cr16c_vec.
7377 * configure: Regenerate.
7378 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7379 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7380 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7381 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7382 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7383 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7384 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7385 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7386 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7387 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7388 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7389 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7390 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7391 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7392 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7393 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7394 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7395 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7396 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7397 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7398 * targets.c (bfd_elf32_cr16c_vec): Declare.
7399 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7400 * cpu-cr16c.c: New file.
7401 * elf32-cr16c.c: Likewise.
7402 * libbfd.h: Regenerate.
7403 * bfd-in2.h: Likewise.
7405 2004-03-30 Jakub Jelinek <jakub@redhat.com>
7407 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7409 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7411 * Makefile.am: Remove all mention of elflink.h.
7412 * Makefile.in: Regenerate.
7413 * bfd-in.h (bfd_elf_discard_info): Declare.
7414 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7415 * bfd-in2.h: Regenerate.
7416 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7417 bfd_elf32_link_record_dynamic_symbol,
7418 bfd_elf64_link_record_dynamic_symbol,
7419 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7420 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7421 _bfd_elf32_link_record_local_dynamic_symbol,
7422 _bfd_elf64_link_record_local_dynamic_symbol,
7423 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7424 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7425 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7426 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7427 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7428 _bfd_elf32_reloc_symbol_deleted_p,
7429 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7430 (bfd_elf_link_record_dynamic_symbol,
7431 bfd_elf_link_record_local_dynamic_symbol,
7432 bfd_elf_final_link, bfd_elf_gc_sections,
7433 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7434 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7435 bfd_elf_reloc_symbol_deleted_p): Declare.
7436 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7437 * elf32-arm.h: Update for changed function names. Remove local
7438 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7439 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7440 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7441 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7442 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7443 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7444 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7445 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7446 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7447 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7448 (bfd_elfNN_print_symbol): Define.
7449 * elfcode.h: Don't include elflink.h.
7450 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7451 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7452 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7453 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7454 elf_link_record_local_dynamic_symbol): Don't define.
7455 * elflink.c: Update for changed function names. Move elflink.h
7457 * elflink.h: Delete file.
7458 * po/SRC-POTFILES.in: Regenerate.
7459 * po/bfd.pot: Regenerate.
7461 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7463 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7464 "name" for global syms accidentally removed in 2004-03-20 change.
7466 2004-03-27 Alan Modra <amodra@bigpond.net.au>
7468 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7469 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7470 where Elf_External_* is different for 64 and 32 bit, with
7471 corresponding elf_size_info field.
7472 (struct elf_final_link_info): Use "bfd_byte *" instead
7473 of "Elf_External_Sym *" for external_syms and symbuf.
7474 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7475 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7476 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7477 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7478 (elf_link_sort_cmp2): Adjust.
7479 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7480 using ELF_R_SYM macro. Set u.sym_mask.
7481 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7482 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7483 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7484 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7485 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7486 swap_syn_out functions. Rearrange dyn swap in/out switch.
7487 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7488 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7489 (elf_link_flush_output_syms): Add elf_backend_data arg.
7490 (elf_link_check_versioned_symbol): Likewise.
7491 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7492 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7493 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7494 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7495 ELF_R_TYPE and ELF_R_INFO macros.
7496 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7497 based on size rather than using ELF_R_INFO.
7498 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7500 (struct alloc_got_off_arg): New.
7501 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7502 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7503 (elf_gc_allocate_got_offsets): Adjust.
7504 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7505 ELF_R_SYM. Use bfd_section_from_elf_index.
7506 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7507 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7508 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7510 2004-03-26 Stan Shebs <shebs@apple.com>
7512 Remove MPW support, no longer used.
7513 * config.bfd (powerpc-*-mpw*): Remove configuration.
7514 * mpw-config.in, mpw-make.sed: Remove files.
7515 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7517 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7519 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7520 (ppc64_elf_add_symbol_hook): New function.
7521 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7522 const from Elf_Internal_Sym param.
7523 * elflink.c (elf_link_add_object_symbols): Adjust.
7524 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7525 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7526 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7527 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7528 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7529 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7530 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7531 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7532 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7533 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7534 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7535 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7536 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7537 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7538 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7539 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7541 2004-03-26 Alan Modra <amodra@bigpond.net.au>
7543 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7544 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7545 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7546 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7547 (bfd_elf64_bfd_link_add_symbols): Delete.
7548 (bfd_elf_link_add_symbols): Declare.
7549 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7550 * elflink.c: Include safe-ctype.h.
7551 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7553 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7554 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7556 (elf_link_add_archive_symbols): Rename from
7557 _bfd_elf_link_add_archive_symbols, make static.
7558 (elf_link_add_object_symbols): New function. Corresponding
7559 elflink.h function converted to use elf_size_info.
7560 (bfd_elf_link_add_symbols): Likewise.
7561 (bfd_elf_size_dynamic_sections): Adjust.
7562 * elflink.h (elf_bfd_link_add_symbols): Delete.
7563 (elf_link_add_object_symbols): Delete.
7564 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7565 bfd_elf_link_add_symbols.
7566 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7568 2004-03-25 Alan Modra <amodra@bigpond.net.au>
7570 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7571 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7573 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7574 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7575 (_bfd_elf_add_dt_needed_tag): Declare.
7576 (_bfd_elf_sort_symbol): Declare.
7577 (_bfd_elf_finalize_dynstr): Declare.
7578 (RELOC_FOR_GLOBAL_SYM): Formatting.
7579 * elfcode.h (elf_add_dynamic_entry): Delete.
7580 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7581 elflink.h function converted to use elf_size_info.
7582 (_bfd_elf_add_dt_needed_tag): Likewise.
7583 (_bfd_elf_sort_symbol): Likewise.
7584 (_bfd_elf_finalize_dynstr): Likewise.
7585 (compute_bucket_count): Likewise.
7586 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7587 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7588 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7589 * elflink.h: ..here.
7590 (sort_symbol, add_dt_needed_tag): Delete.
7591 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7592 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7594 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7595 * elf32-cris.c (add_dynamic_entry): Likewise.
7596 * elf32-hppa.c (add_dynamic_entry): Likewise.
7597 * elf32-i370.c (add_dynamic_entry): Likewise.
7598 * elf32-i386.c (add_dynamic_entry): Likewise.
7599 * elf32-m32r.c (add_dynamic_entry): Likewise.
7600 * elf32-m68k.c (add_dynamic_entry): Likewise.
7601 * elf32-ppc.c (add_dynamic_entry): Likewise.
7602 * elf32-s390.c (add_dynamic_entry): Likewise.
7603 * elf32-sh.c (add_dynamic_entry): Likewise.
7604 * elf32-sparc.c (add_dynamic_entry): Likewise.
7605 * elf32-vax.c (add_dynamic_entry): Likewise.
7606 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7607 * elf64-alpha.c (add_dynamic_entry): Likewise.
7608 * elf64-hppa.c (add_dynamic_entry): Likewise.
7609 * elf64-ppc.c (add_dynamic_entry): Likewise.
7610 * elf64-s390.c (add_dynamic_entry): Likewise.
7611 * elf64-sparc.c (add_dynamic_entry): Likewise.
7612 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7613 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7614 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7615 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7616 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7617 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7619 2004-03-23 Paul Brook <paul@codesourcery.com>
7621 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7623 2004-03-22 Bob Wilson <bob.wilson@acm.org>
7625 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7626 literal tables and check for relocs outside of literal pools.
7627 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7628 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7630 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7631 (elf_xtensa_relocate_section): Read literal tables and check for
7632 dynamic relocations in read-only sections and not in literal pools.
7634 2004-03-23 Alan Modra <amodra@bigpond.net.au>
7637 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7639 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
7641 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7642 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7643 not defined by the executable, or defined in a DSO.
7644 <eliding run-time relocation of .got>: Initialize GOT entry for a
7645 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7647 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7648 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7649 a PLT reloc to GOT for an executable.
7650 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7651 .got for a DSO and explain why.
7652 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7653 and unreferenced symbols for which a PLT is defined. Adjust
7654 dynamic-symbol pruning correspondingly, to make sure we don't lose
7655 a dynamic symbol also defined by a DSO.
7657 2004-03-22 Alan Modra <amodra@bigpond.net.au>
7659 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7660 and rel args. Group input and output args. Wrap to 80 columns.
7661 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7662 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7663 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7664 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7665 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7666 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7667 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7668 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7669 RELOC_FOR_GLOBAL_SYMBOL invocation.
7671 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7673 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7674 unresolved symbols in objects aren't allowed.
7676 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7678 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7679 (elf_hppa_unmark_useless_dynamic_symbols):
7680 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7681 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7682 (elf32_hppa_relocate_section): Likewise.
7683 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7684 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7685 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7686 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7687 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7689 * elf-m10200.c (mn10200_elf_relocate_section): Use
7690 RELOC_FOR_GLOBAL_SYMBOL.
7691 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7692 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7693 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7694 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7695 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7696 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7697 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7698 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7699 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7700 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7701 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7702 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7704 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7706 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7707 (final_link_relocate): Likewise.
7708 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7709 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7711 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7713 * Makefile.am: Run "make dep-am".
7714 * Makefile.in: Regenerate.
7715 * aclocal.m4: Regenerate.
7716 * config.in: Regenerate.
7717 * po/bfd.pot: Regenerate.
7719 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7720 H.J. Lu <hongjiu.lu@intel.com>
7722 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7723 type and size change code to where it was previously. Remove
7724 dt_needed param. Treat old weak syms as strong if new sym is
7725 from a shared lib, even when old sym is from another shared
7726 lib. Remove unnecessary tests of oldweak and newweak. Correct
7728 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7729 _bfd_elf_merge_symbol calls.
7730 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7731 dt_needed local var. Update comments.
7732 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7733 (_bfd_elf_add_default_symbol): Likewise.
7735 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7736 strong syms in one shared object overriding weak syms in another.
7738 2004-03-18 Alan Modra <amodra@bigpond.net.au>
7740 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7741 dyn_lib_class field. Rearrange for better packing.
7742 (elf_dt_soname): Delete.
7743 (elf_dyn_lib_class): Define.
7744 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7745 (bfd_elf_set_dt_needed_soname): Delete.
7746 (bfd_elf_set_dyn_lib_class): New function.
7747 * elflink.h (add_dt_needed_tag): New function. Split out from..
7748 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7749 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7750 initialization of soname.
7751 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7753 * bfd-in.h (enum dynamic_lib_link_class): New.
7754 (bfd_elf_set_dt_needed_soname): Delete.
7755 (bfd_elf_set_dyn_lib_class): Declare.
7756 * bfd-in2.h: Regenerate.
7758 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7759 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7760 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7761 symbol loop. Instead use add_needed to flag tag as written.
7763 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7765 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7766 logic for null_input_bfd detection.
7768 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7770 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7772 2004-03-16 Mark Kettenis <kettenis@gnu.org>
7774 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7777 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7779 * elflink.c (elf_link_read_relocs_from_section): Don't use
7780 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7781 (_bfd_elf_link_read_relocs): ..to here.
7782 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7784 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7786 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7787 values selected in configure.host. Require both to be defined
7788 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7789 corresponding BFD_HOST vars with quotes.
7790 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7791 Always require BFD_HOST_64_BIT_DEFINED.
7792 <file_ptr type>: Find off_t size before emitting message. Combine
7793 off_t and ftello64 conditional.
7794 * configure: Regenerate.
7796 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7798 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7799 aliasing warning. Remove trailing whitespace throughout file.
7801 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7803 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7804 input_section in calls to get_dyn_name.
7805 * 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
7807 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7809 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7811 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7812 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7813 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7814 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7815 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7816 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7817 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7819 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7820 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7821 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7822 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7823 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7824 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7825 (read_8_bytes, read_indirect_string, read_address): Likewise.
7826 (read_abbrevs, parse_comp_unit): Likewise.
7827 * targets.c (struct bfd_target): Likewise.
7828 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7829 * hppabsd-core.c: Likewise. Formatting.
7830 * hpux-core.c: Likewise.
7831 * irix-core.c: Likewise.
7832 * netbsd-core.c: Likewise.
7833 * osf-core.c: Likewise.
7834 * ptrace-core.c: Likewise.
7835 * sco5-core.c: Likewise.
7836 * trad-core.c: Likewise.
7837 * configure: Regenerate.
7838 * bfd-in2.h: Regenerate.
7840 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7842 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7843 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7844 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7845 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7846 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7847 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7848 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7849 * libbfd.c: Likewise in function definitions.
7850 (bfd_put_8): Mask with 0xff rather than casting to char.
7851 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7852 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7853 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7854 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7855 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7856 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7857 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7858 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7859 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7860 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7861 * archive.c (do_slurp_coff_armap): Update swap prototype.
7862 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7863 (tic54x_getl_signed_32): Likewise.
7864 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7865 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7866 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7867 (bfd_getp_signed_32, bfd_putp32): Likewise.
7868 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7869 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7870 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7871 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7872 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7873 bfd_h_getx_signed_16, bfd_h_putx16.
7874 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7875 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7876 * hpux-core.c: Likewise.
7877 * irix-core.c: Likewise.
7878 * netbsd-core.c: Likewise.
7879 * osf-core.c: Likewise.
7880 * ptrace-core.c: Likewise.
7881 * sco5-core.c: Likewise.
7882 * trad-core.c: Likewise.
7883 * bfd-in2.h: Regenerate.
7885 2004-03-15 Matt Thomas <matt@3am-software.com>
7887 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7890 2004-03-13 Mark Kettenis <kettenis@gnu.org>
7892 * config.bfd: Add x86_64-*-openbsd*.
7893 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7895 * configure: Regenerate.
7897 2004-03-12 Nick Clifton <nickc@redhat.com>
7898 Dave Murphy <wintermute2k4@ntlworld.com>
7900 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7901 if the input bfd does not contain any code.
7903 2004-03-09 Steve Ellcey <sje@cup.hp.com>
7905 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7907 2004-03-05 Fred Fish <fnf@redhat.com>
7909 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7910 mips16 symbols to be even rather than testing first for even/odd.
7911 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7913 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7915 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7918 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
7920 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7921 undefined symbols as hash_new.
7923 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7925 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7927 * elf32-sh.c: Ditto.
7928 * bfd-in2.h: Regenerate.
7930 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
7932 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7934 (_frv_count_got_plt_entries): Initialize them.
7935 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7937 (frv_pic_relocs_info_for_global): Likewise.
7938 (frv_pic_relocs_info_for_local): Likewise.
7939 (frv_pic_merge_early_relocs_info): New.
7940 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7942 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7943 Check that we don't exceed the allocated count for entry.
7944 (_frv_add_rofixup): Likewise.
7945 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7946 (elf32_frv_finish_dynamic_sections): Improve error message in case
7947 we emit too few rofixup entries.
7949 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
7951 * archures.c (bfd_mach_fr450): New.
7952 * bfd-in2.h: Regenerate.
7953 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7954 (arch_info_500): Link to it.
7955 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7956 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7957 (frv_elf_arch_extension_p): New function.
7958 (frv_elf_merge_private_bfd_data): Use it.
7960 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7962 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7964 * elflink.h (is_global_data_symbol_definition): Moved to
7966 (elf_link_is_defined_archive_symbol): Likewise.
7967 (elf_link_add_archive_symbols): Likewise. Renamed to
7968 _bfd_elf_link_add_archive_symbols.
7970 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7971 of ELF symbol table entry from backend.
7972 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7973 instead of elf_link_add_object_symbols.
7975 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7977 * elf-bfd.h (struct elf_backend_data): Added
7978 elf_backend_can_make_relative_eh_frame,
7979 elf_backend_can_make_lsda_relative_eh_frame and
7980 elf_backend_encode_eh_address.
7981 (_bfd_elf_encode_eh_address): Declare.
7982 (_bfd_elf_can_make_relative): Declare.
7983 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7984 hooks to decide whether to attempt to make_relative and
7986 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7987 (_bfd_elf_can_make_relative): New.
7988 (_bfd_elf_encode_eh_address): New.
7989 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7990 (frv_elf_encode_eh_address): New.
7991 (elf_backend_can_make_relative_eh_frame): Define.
7992 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7993 (elf_backend_encode_eh_address): Define.
7995 (elf_backend_can_make_relative_eh_frame): Define.
7996 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7997 (elf_backend_encode_eh_address): Define.
7998 (elfNN_bed): Add them.
8000 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8002 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8003 complain_on_overflow to signed.
8005 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8007 * elflink.h (sort_symbol): New.
8008 (elf_link_add_object_symbols): Use a sorted symbol array for
8011 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8013 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8014 for pc relative relocs.
8015 (elf_s390_relocate_section): Likewise.
8016 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8017 for pc relative relocs.
8018 (elf_s390_relocate_section): Likewise.
8020 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8022 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8025 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8027 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8028 field to track if a relocation is against readonly section.
8029 (count_dyn_reloc): Take a new argument for rent->reltext.
8030 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8031 (get_reloc_section): Don't set ia64_info->reltext here.
8032 (allocate_dynrel_entries): Set ia64_info->reltext here.
8034 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8036 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8037 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8038 function's descriptor to symbol+offset, and map local undefweak
8039 symbol to NULL function descriptor.
8040 (elf32_frv_relocate_section): Likewise.
8042 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8044 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8046 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8047 (netbsd_core_file_p): Set architecture from machine ID for
8050 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8052 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8053 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8055 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8057 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8058 symbols with non-default visibility.
8060 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8062 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8063 IMAGE_SCN_MEM_WRITE on known sections only.
8065 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8067 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8068 symbols used in PIE relocs.
8070 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8072 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8075 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8077 * configure.in: Update version to 2.15.90.
8078 * configure: Regenerate.
8080 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8081 Richard Sandiford <rsandifo@redhat.com>
8083 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8084 _bfd_elf_symbol_refs_local_p to decide whether to decay
8085 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8086 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8087 relocs if the symbol wasn't defined by a regular object file.
8088 Don't check the symbol's dynindx.
8090 2004-02-16 Andrew Cagney <cagney@redhat.com>
8092 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8094 * bfd-in2.h: Re-generate.
8096 2004-02-14 Andrew Cagney <cagney@redhat.com>
8098 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8099 _LARGEFILE64_SOURCE.
8101 2004-02-13 Andrew Cagney <cagney@redhat.com>
8103 * elf.c (vma_page_aligned_bias): New function.
8104 (assign_file_positions_except_relocs)
8105 (assign_file_positions_for_segments): Replace broken modulo
8106 arithmetic with call to vma_page_aligned_bias.
8108 2004-02-11 Andrew Cagney <cagney@redhat.com>
8110 * bfd-in.h: Update copyright.
8111 (bfd_tell): Change return type to file_ptr.
8112 * bfd-in2.h: Re-generate.
8113 * cache.c: Update copyright.
8114 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8116 (close_one): Use real_ftell.
8117 * bfdio.c: Update copyright.
8118 (real_ftell, real_fseek): New functions.
8119 (bfd_tell): Use real_fseek and real_ftell, change return type to
8121 (bfd_seek): Use real_ftell and real_fseek, change type of
8122 file_position to a file_ptr.
8123 * libbfd-in.h: Update copyright.
8124 (real_ftell, real_fseek): Declare.
8125 * libbfd.h: Re-generate.
8127 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8128 fseeko and fseeko64. Determine bfd_file_ptr.
8129 * configure: Re-generate.
8130 * config.in: Re-generate.
8132 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8134 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8135 * elf32-h8300.c: Likewise.
8137 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
8138 Nick Clifton <nickc@redhat.com>
8140 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8141 GOT entries with no associated GOT subsection.
8143 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
8145 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8146 * elf.c (swap_out_syms): Use it to decide whether local section
8147 symbols should be named.
8148 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8149 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8150 (elf_backend_name_local_section_symbols): Define.
8151 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8153 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8155 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8156 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8159 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
8161 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8162 to bfd_link_hash_entry passed by reference to
8163 _bfd_generic_link_add_one_symbol.
8165 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8167 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8168 relocations against dynamic symbols.
8170 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
8172 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8175 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
8177 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8178 * bfd-in2.h, libbfd.h: Rebuilt.
8180 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8182 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8183 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8184 flag has been cleared.
8186 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8188 * coff-h8300.c: Add and adjust comments about relaxation.
8189 * elf32-h8300.c: Likewise.
8191 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8193 * coff-h8300.c: Fix comment typos.
8194 * elf32-h8300.c: Likewise.
8196 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8198 * coff-h8300.c: Add comments about relaxation.
8199 * elf32-h8300.c: Likewise.
8201 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8203 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8205 * aclocal.m4: Regenerate.
8206 * configure: Regenerate.
8208 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8210 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8211 mips_elf64_rtype_to_howto instead of using howto_table.
8213 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
8215 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8217 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8218 relocs which would not use the PLT.
8220 2004-01-13 Alan Modra <amodra@bigpond.net.au>
8222 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8223 (ppc64_elf_gc_sweep_hook): Likewise.
8224 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8226 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8228 Adds linker relaxation support for bit manipulation insns like
8229 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8231 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8232 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8233 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8234 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8236 2004-01-12 Alan Modra <amodra@bigpond.net.au>
8238 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8240 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8242 * elf32-h8300.c: Fix formatting.
8244 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8246 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8247 dynamic object is present. Declare r_symndx and h in an inner
8249 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8251 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
8253 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8254 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8255 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8256 identically. Do not emit PC24 relocations for shared libraries.
8257 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8258 identically. Don't adjust pc_count.
8259 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8260 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8261 adjust count for branch relocations.
8262 (allocate_dynrelocs): Correct typo in call to
8263 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8264 PC24 or PLT32 relocs when linking.
8266 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8268 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8269 relocation howto with ARM_26 one for consistency.
8270 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8271 that will be converted to ARM_26D ones, since we always want 'done'
8272 relocations to be reflected in section's data.
8273 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8275 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8278 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8280 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8281 are not partial_inplace during a relocatable link.
8283 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8285 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8286 if no dynamic object is present. Declare r_symndx and h in an
8289 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8291 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8292 trampoline if it is known out of range.
8294 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
8296 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8297 * elf32-frv.c (_frv_osec_readonly_p): New.
8298 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8300 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8301 (elf32_frv_relocate_section): Likewise. Error out if attempting
8302 to emit rofixups or dynamic relocs in read-only segments. Use
8303 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8304 dynamic relocations.
8305 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8306 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8307 relocations or fixups involving merged sections correctly. Avoid
8308 crash when undefined symbol is referenced by R_FRV_32 or
8309 R_FRV_FUNCDESC_VALUE.
8310 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8311 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8312 input section holding local symbol to addend of R_FRV_32 or
8313 R_FRV_FUNCDESC_VALUE dynamic relocation.
8314 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8315 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8316 (elf32_frv_always_size_sections): Don't store pointer to
8317 __stacksize symbol in sec_info.
8318 (elf32_frv_modify_segment_map): Look it up here.
8319 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8320 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8321 of the lazy PLT entry, not only its offset, as the low word of a
8322 function descriptor.
8323 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8324 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8325 if a hash table entry already exists but is not a definition.
8326 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8327 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8328 (_frv_add_rofixup): Don't inline.
8329 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8330 for undefweak symbols.
8331 (elf32_frv_relocate_section): Avoid crash while computing
8332 relocation when linking with shared library. Only emit rofixups
8333 and dynamic relocations for alloc&load sections. Mark binaries
8334 with inter-segment relocations for relocation as a unit.
8335 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8336 (DEFAULT_STACK_SIZE): New.
8337 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8338 emit rofixups or dynamic relocs when linking dynamic non-PIE
8340 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8341 shared libs too. Reserve the last entry for the GOT pointer.
8342 (elf32_frv_finish_dynamic_sections): Emit it.
8343 (elf32_frv_always_size_sections): New.
8344 (elf32_frv_modify_segment_map): New.
8345 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8347 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8348 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8349 (elf_backend_always_size_sections): New.
8350 (elf_backend_modify_segment_map): New.
8351 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8352 * config.bfd: Added frv-*-*linux*.
8353 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8354 ABS section, instead of crashing.
8355 (elf32_frv_relocate_section): Don't crash before warning about
8356 different segments in non-PIC relocation.
8357 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8358 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8359 relocs to undefweak symbols.
8360 (elf32_frv_relocate_section): Ditto for undefined symbols.
8361 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8362 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8363 gotfixup section was created.
8364 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8365 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8366 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8367 complain_overflow_signed.
8368 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8369 have not been allocated.
8370 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8371 privfd only if dynamic sections were created.
8372 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8373 for GPREL relocs. When linking relocatable FDPIC executables,
8374 emit warnings for relocations that would be illegal on PIE or
8375 shared libraries. Emit rofixup for R_FRV_32 only if input object
8377 (_frv_create_got_section): Define _gp symbol in the rofixup
8379 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8380 dynamic sections missing, error out requesting -melf32frvfd.
8381 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8382 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8383 computation of addends from section and global or local symbol
8384 value. Change return type to bfd_boolean, and return a failure if
8385 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8386 nonzero addend is required.
8387 (elf32_frv_relocate_section): Likewise. Print error for
8388 unsupported nonzero addends.
8389 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8390 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8391 force everything local.
8392 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8393 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8394 (frv_gotfixup_section): New.
8395 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8396 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8398 (_frv_add_rofixup): New.
8399 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8400 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8401 improve some ugly conditions.
8402 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8403 relocations in fdpic.
8404 (_frv_create_got_section): Create .rofixup.got section.
8405 (struct _frv_dynamic_got_info): Added fixups.
8406 (_frv_count_got_plt_entries): Account in-GOT relocations into
8407 relocs32, relocsfd and relocsfdv. Account them into relocs or
8408 fixups, as appropriate.
8409 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8411 (elf32_frv_finish_dynamic_sections): Verify that the right number
8412 of relocations and fixups was generated.
8413 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8415 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8416 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8417 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8418 descriptor of a (formerly-)global symbol is local.
8419 (struct frv_pic_relocs_info): Adjust comments.
8420 (_frv_emit_got_relocs_plt_entries): Adjust.
8421 (elf32_frv_relocate_section): Likewise.
8422 (_frv_count_got_plt_entries): Likewise.
8423 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8424 symbol's value to addend in the common preamble. Decay dynamic
8425 symbols to section+offset if they bind or call locally, for GOT
8426 and FUNCDESC_VALUE, respectively.
8427 (elf32_frv_relocate_section): Likewise.
8428 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8429 internal or hidden visibility.
8430 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8431 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8432 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8433 (elf32_frv_relocate_section): Pass relocation addend in. Use
8434 original relocation addend to look up the got relocs/plt entries
8435 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8436 processing relocations that reference .scommon symbols.
8437 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8438 Introduce support for dynamic linking.
8439 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8440 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8441 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8442 (frv_reloc_type_lookup): Return REL howtos for executables and
8444 (frv_info_to_howto_rel): New.
8445 (struct frv_elf_link_hash_table): New.
8446 (frv_hash_table, frv_got_section, frv_gotrel_section,
8447 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8448 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8449 (frv_elf_link_hash_table_create): New.
8450 (struct frv_pic_relocs_info): New.
8451 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8452 (frv_pic_relocs_info_find): New.
8453 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8455 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8456 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8457 (_frv_emit_got_relocs_plt_entries): New.
8458 (elf32_frv_relocate_section): Add support for dynamic linking.
8459 Handle new relocations.
8460 (_frv_create_got_section): New.
8461 (elf32_frv_create_dynamic_sections): New.
8462 (ELF_DYNAMIC_INTERPRETER): New.
8463 (struct _frv_dynamic_got_info): New.
8464 (_frv_count_got_plt_entries): New.
8465 (struct _frv_dynamic_got_plt_info): New.
8466 (_frv_compute_got_alloc_data): New.
8467 (_frv_get_got_entry, _frv_get_fd_entry): New.
8468 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8469 (_frv_resolve_final_relocs_info): New.
8470 (elf32_frv_size_dynamic_sections): New.
8471 (elf32_frv_finish_dynamic_sections): New.
8472 (elf32_frv_adjust_dynamic_symbol): New.
8473 (elf32_frv_finish_dynamic_symbol): New.
8474 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8476 (elf_info_to_howto_rel): Define.
8477 (bfd_elf32_bfd_link_hash_table_create): Define.
8478 (elf_backend_create_dynamic_sections): Define.
8479 (elf_backend_adjust_dynamic_symbol): Define.
8480 (elf_backend_size_dynamic_sections): Define.
8481 (elf_backend_finish_dynamic_symbol): Define.
8482 (elf_backend_finish_dynamic_sections): Define.
8483 (elf_backend_want_got_sym): Define.
8484 (elf_backend_got_header_size): Define.
8485 (elf_backend_want_got_plt): Define.
8486 (elf_backend_plt_readonly): Define.
8487 (elf_backend_want_plt_sym): Define.
8488 (elf_backend_plt_header_size): Define.
8489 (elf_backend_may_use_rel_p): Define.
8490 (elf_backend_may_use_rela_p): Define.
8491 (elf_backend_default_use_rela_p): Define.
8492 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8493 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8494 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8495 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8496 (frv_reloc_map): Map the corresponding BFD relocs to them.
8497 (frv_reloc_type_lookup): ... and back to BFD relocs.
8498 * reloc.c: New relocs.
8499 * bfd-in2.h, libbfd.h: Rebuilt.
8500 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8501 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8502 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8503 R_FRV_FUNCDESC_GOTLO): New.
8504 (frv_reloc_map): Map the corresponding BFD relocs to them.
8505 (frv_reloc_type_lookup): ... and back to BFD relocs.
8506 * reloc.c: New relocs.
8507 * bfd-in2.h, libbfd.h: Rebuilt.
8509 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8511 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8512 targets to support pages of up to 64kB.
8513 (elf32_bed): Redefine to get a separate backend data structure for
8514 traditional targets.
8515 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8516 targets to support pages of up to 64kB.
8517 (elf64_bed): Redefine to get a separate backend data structure for
8518 traditional targets.
8519 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8520 targets to support pages of up to 64kB.
8521 (elf32_bed): Redefine to get a separate backend data structure for
8522 traditional targets.
8524 2004-01-04 Mark Kettenis <kettenis@gnu.org>
8526 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8528 2004-01-02 Mark Kettenis <kettenis@gnu.org>
8530 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8531 (elf_i386_grok_psinfo): Likewise.
8533 2004-01-02 Bernardo Innocenti <bernie@develer.com>
8535 * config.bfd: Add m68k-uClinux target.
8537 2004-01-01 Grant Edwards <grante@visi.com>
8539 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8540 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8541 (elf32_h8_gc_sweep_hook): New function.
8542 (elf_backend_gc_mark_hook): Define.
8543 (elf_backend_gc_sweep_hook): Define.
8544 (elf_backend_can_gc_sections): Define.
8546 For older changes see ChangeLog-0203
8552 version-control: never