* libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
[binutils.git] / bfd / ChangeLog
blobc91ffab182d3a699617c29545bc274ac519ea897
1 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3         * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
4         bfd_zalloc2): New prototypes.
5         * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
6         * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
7         * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
8         * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
9         elf_map_symbols, map_sections_to_segments,
10         assign_file_positions_for_segments, copy_private_bfd_data,
11         swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
12         where appropriate.
13         * bfd-in2.h: Rebuilt.
14         * libbfd.h: Rebuilt.
16         * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
17         verdef or verneed section.
18         (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
19         verneed sections gracefully.
20         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
21         bogus relocation values.
22         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
23         * elf64-s390.c (elf_s390_info_to_howto): Likewise.
24         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
25         * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
26         * elfxx-ia64.c (lookup_howto): Likewise.
28         * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
29         the end of strtab and clear it.
30         (elf_read): Remove.
32 2005-07-05  Nick Clifton  <nickc@redhat.com>
34         * po/vi.po: New Vietnamese translation.
35         * configure.in (ALL_LINGUAS): Add vi.
36         * configure: Regenerate.
38 2005-07-05  Peter S. Mazinger <ps.m@gmx.net>
40         * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
41         touchup logic like i386/ppc.
43 2005-07-05  Alan Modra  <amodra@bigpond.net.au>
45         * elf.c (special_sections): Move const qualifier.
46         (special_sections_b..special_sections_t): Likewise.
47         * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
48         const.
49         (elf32_arm_symbian_special_sections): Move const qualifier.
50         * elf32-m32r.c: Similarly.
51         * elf32-m68hc11.c: Similarly.
52         * elf32-m68hc12.c: Similarly.
53         * elf32-mcore.c: Similarly.
54         * elf32-ppc.c: Similarly.
55         * elf32-sh64.c: Similarly.
56         * elf32-v850.c: Similarly.
57         * elf32-xtensa.c: Similarly.
58         * elf64-alpha.c: Similarly.
59         * elf64-hppa.c: Similarly.
60         * elf64-ppc.c: Similarly.
61         * elf64-sh64.c: Similarly.
62         * elfxx-ia64.c: Similarly.
63         * elfxx-mips.c: Similarly.
65 2005-07-04  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
67         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
68         info->executable instead of !info->shared where appropriate.
70 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
72         PR 1042
73         * elf.c (assign_file_positions_for_segments): Remove excluded
74         sections from the segment map.
76 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
78         PR 1004
79         * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr.  Delete
80         special_sections.
81         (_bfd_elf_get_special_section): Declare.
82         (bfd_elf_special_section): Update prototype.
83         * elf.c (special_sections): Remove unused outer entries.
84         (get_special_section): Delete.
85         (_bfd_elf_get_special_section): New function.
86         (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec".  Update
87         special_sections indexing.
88         (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
89         * elf32-arm.c (symbian_special_sections_d): Delete.
90         (symbian_special_sections_g, symbian_special_sections_h): Delete.
91         (symbian_special_sections_i, symbian_special_sections_f): Delete.
92         (symbian_special_sections_p): Delete.
93         (elf32_arm_symbian_special_sections): Merge above to here.
94         (elf32_arm_symbian_get_sec_type_attr): New function.
95         (elf_backend_special_sections): Don't define.
96         (elf_backend_get_sec_type_attr): Define.
97         * elf32-m32r.c: Similarly to elf32-arm.c.
98         * elf32-m68hc11.c: Likewise.
99         * elf32-m68hc12.c: Likewise.
100         * elf32-mcore.c: Likewise.
101         * elf32-sh64.c: Likewise.
102         * elf32-v850.c: Likewise.
103         * elf32-xtensa.c: Likewise.
104         * elf64-alpha.c: Likewise.
105         * elf64-hppa.c: Likewise.
106         * elf64-ppc.c: Likewise.
107         * elf64-sh64.c: Likewise.
108         * elfxx-ia64.c: Likewise.
109         * elfxx-mips.c: Likewise.
110         * elf32-ppc.c: Likewise.
111         (bfd_elf_special_section ppc_alt_plt): New.  Use it if .plt loadable.
112         * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
113         (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
114         (elf_backend_get_sec_type_attr): Define.
115         * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
116         (elf_backend_special_sections): Don't define.
117         (elfNN_bed): Update.
119 2005-07-01  Nick Clifton  <nickc@redhat.com>
121         * cpu-d10v.c: Update to ISO C90 style function declarations and
122         fix formatting.
123         * cpu-d30v.c: Likewsie.
124         * cpu-i370.c: Likewsie.
125         * cpu-xstormy16.c: Likewsie.
126         * elf32-arc.c: Likewsie.
127         * elf32-d10v.c: Likewsie.
128         * elf32-d30v.c: Likewsie.
129         * elf32-dlx.c: Likewsie.
130         * elf32-i370.c: Likewsie.
131         * elf32-i960.c: Likewsie.
132         * elf32-ip2k.c: Likewsie.
133         * elf32-m32r.c: Likewsie.
134         * elf32-mcore.c: Likewsie.
135         * elf32-openrisc.c: Likewsie.
136         * elf32-or32.c: Likewsie.
137         * elf32-pj.c: Likewsie.
138         * elf32-v850.c: Likewsie.
139         * elf32-xstormy16.c: Likewsie.
141 2005-07-01  Alan Modra  <amodra@bigpond.net.au>
143         * elf64-alpha.c (elf64_alpha_create_got_section): Always create
144         a new .got section.
145         (elf64_alpha_create_dynamic_sections): Always make new sections
146         by using bfd_make_section_anyway_with_flags.  Check that .got not
147         already created.
148         (elf64_alpha_check_relocs): Delete "got_created".  Use tdata->gotobj
149         instead.
151 2005-06-30  Alan Modra  <amodra@bigpond.net.au>
153         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
154         _SDA_BASE_ and _SDA2_BASE_ symbols.
155         * elflink.c (_bfd_elf_provide_symbol): Correct comment.  Define
156         sym if not def_regular.
157         (_bfd_elf_provide_section_bound_symbols): Similarly.
159 2005-06-30  Ben Elliston  <bje@gnu.org>
161         * config.bfd: Mark as obsolete:
162             m68*-apollo-*
163             m68*-apple-aux*
164             m68*-bull-sysv*
166 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
168         * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
169         .eh_frame specially..
170         (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
171         Don't recheck sections we have already marked.
172         (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
173         * section.c (struct bfd_section): Add gc_mark_from_eh.
174         (STD_SECTION): Adjust.
175         * ecoff.c (bfd_debug_section): Adjust.
176         * bfd-in2.h: Regenerate.
178 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
180         * elflink.c (elf_gc_sweep): Do not refcount on sections that have
181         not been processed by check_relocs.
183 2005-06-29  Paul Brook  <paul@codesourcery.com>
185         * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
186         * bfd-in2.h: Regenerate.
187         * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
188         relative.
189         * elflink.c (bfd_elf_set_symbol): Add section argument.
190         (_bfd_elf_provide_symbol): Ditto.
191         (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
193 2005-06-27  Carlos O'Donell <carlos@systemhalted.org>
195         * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry): 
196         Use bh_root, and hh.
197         (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
198         (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
199         (struct elf32_hppa_link_hash_table): Use etab and bstab.
200         (stub_hash_newfunc): Use hh.
201         (hppa_link_hash_newfunc): Use hsh_cache.
202         (elf32_hppa_link_hash_table_create): Use etab, and bstab.
203         (elf32_hppa_link_hash_table_free): Use bstab.
204         (hppa_stub_name): Use eh.
205         (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
206         (hppa_add_stub): Use bstab.
207         (hppa_type_of_stub): Use eh.
208         (hppa_build_one_stub): Use hh and bh_root.
209         (elf32_hppa_copy_indirect_symbol): Use hdh_next.
210         (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
211         (elf32_hppa_gc_sweep_hook): Use hdh_next.
212         (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
213         (allocate_plt_static): Use etab.
214         (allocate_dynrelocs): Use etab, and hdh_next.
215         (readonly_dynrelocs): Use hdh_next.
216         (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
217         (get_local_syms): Use eh, bstab, and hh.
218         (elf32_hppa_size_stubs): Use eh, bstab, and hh.
219         (elf32_hppa_set_gp): Use etab.
220         (elf32_hppa_build_stubs): Use bstab.
221         (final_link_relocate): Use eh, bh_root.
222         (elf32_hppa_relocate_section): Use elf, etab.
223         (elf32_hppa_finish_dynamic_sections): Use etab.
225 2005-06-27  H.J. Lu  <hongjiu.lu@intel.com>
227         * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
228         the extra `;'.
230 2005-06-21  Carlos O'Donell <carlos@systemhalted.org>
232         * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
233         (hppa_stub_hash_entry): Define.
234         (stub_hash_newfunc): Rename variables.
235         (hppa_link_hash_newfunc): Likewise.
236         (elf32_hppa_link_hash_table_free): Likewise.
237         (hppa_stub_name): Likewise.
238         (hppa_get_stub_entry): Likewise.
239         (hppa_add_stub): Likewise.
240         (hppa_type_of_stub): Likewise.
241         (hppa_build_one_stub): Likewise.
242         (hppa_size_one_stub): Likewise.
243         (elf32_hppa_create_dynamic_sections): Likewise.
244         (elf32_hppa_copy_indirect_symbol): Likewise.
245         (elf32_hppa_check_relocs): Likewise.
246         (elf32_hppa_gc_mark_hook): Likewise.
247         (elf32_hppa_gc_sweep_hook): Likewise.
248         (elf32_hppa_grok_psinfo): Likewise.
249         (elf32_hppa_hide_symbol): Likewise.
250         (elf32_hppa_adjust_dynamic_symbol): Likewise.
251         (allocate_dynrelocs): Likewise.
252         (clobber_millicode_symbols): Likewise.
253         (readonly_dynrelocs): Likewise.
254         (elf32_hppa_size_dynamic_sections): Likewise.
255         (get_local_syms): Likewise.
256         (elf32_hppa_size_stubs): Likewise.
257         (hppa_record_segment_addr): Likewise.
258         (final_link_relocate): Likewise.
259         (elf32_hppa_relocate_section): Likewise.
260         (elf32_hppa_finish_dynamic_symbol): Likewise.
262 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
264         PR 1025
265         * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
266         symbol.
267         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
268         * elf32-avr.c (elf32_avr_check_relocs): Likewise.
269         * elf32-cris.c (cris_elf_check_relocs): Likewise.
270         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
271         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
272         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
273         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
274         * elf32-i370.c (i370_elf_check_relocs): Likewise.
275         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
276         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
277         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
278         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
279         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
280         * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
281         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
282         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
283         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
284         * elf32-s390.c (elf_s390_check_relocs): Likewise.
285         * elf32-sh.c (sh_elf_check_relocs): Likewise.
286         * elf32-v850.c (v850_elf_check_relocs): Likewise.
287         * elf32-vax.c (elf_vax_check_relocs): Likewise.
288         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
289         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
290         * elf64-s390.c (elf_s390_check_relocs): Likewise.
291         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
292         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
293         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
295 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
297         PR 1022
298         * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
299         symbol.
301 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
303         PR 1025
304         * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
305         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
307 2005-06-18  H.J. Lu  <hongjiu.lu@intel.com>
309         * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
310         BFD_RELOC_X86_64_GOTPC32.
311         * bfd-in2.h: Regenerated.
313 2005-06-17  Jakub Jelinek  <jakub@redhat.com>
315         * elf.c (bfd_section_from_shdr): Kill bogus warning.
317         * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
318         symbol, relocation, group or versym sections.
320         * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
321         is NULL.
322         * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
323         doesn't point into the section.
325 2005-06-17  Jan Beulich  <jbeulich@novell.com>
327         * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
328         and BFD_RELOC_X86_64_GOTPC32.
329         * libbfd.h (bfd_reloc_code_real_names): Likewise.
330         * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
331         R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
332         (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
333         and R_X86_64_GOTPC32.
334         (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
335         (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
336         R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
337         (elf64_x86_64_relocate_section): Likewise.
338         (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
340 2005-06-15  Mark Kettenis  <kettenis@gnu.org>
342         * archive.c: Include "libiberty.h".
344 2005-06-15  Nick Clifton  <nickc@redhat.com>
346         * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
347         produced by the GreenHills toolchain can be assimilated.
349 2005-06-14  Steve Ellcey  <sje@cup.hp.com>
351         * som.c (som_find_inliner_info): New.
353 2005-06-14  H.J. Lu  <hongjiu.lu@intel.com>
355         * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
357 2005-06-14  Jakub Jelinek  <jakub@redhat.com>
359         * elf.c (bfd_section_from_shdr): Fail if name is NULL.
360         Prevent endless recursion on broken objects.
362         * archive.c (do_slurp_coff_armap): Check for overflows.
364 2005-06-10  Daniel Jacobowitz  <dan@codesourcery.com>
366         * elfcode.h (elf_write_relocs): Do nothing if there are no
367         relocations.
369 2005-06-10  Alan Modra  <amodra@bigpond.net.au>
371         * dwarf2.c (decode_line_info): Revert last change.  Instead set
372         initial low_pc to -1 to avoid need to test whether loc_pc has
373         been set.
375 2005-06-09  Christopher Faylor  <cgf@timesys.com>
377         * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
378         either SEC_ALLOC OR SEC_LOAD.
380 2005-06-09  Christopher Faylor  <cgf@timesys.com>
382         * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
383         section header.  Do not add STYP_NOLOAD since it does not appear to be
384         a valid PE flag.
386 2005-06-09  H.J. Lu  <hongjiu.lu@intel.com>
388         PR 1000
389         * dwarf2.c (lookup_address_in_line_info_table): Restore code
390         handling NULL function info, removed with 2005-04-03 change.
392 2005-06-08  Mark Mitchell  <mark@codesourcery.com>
394         * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
396 2005-06-09  Alan Modra  <amodra@bigpond.net.au>
398         * elflink.c (elf_mark_used_section): Delete.
399         (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
400         * reloc.c (bfd_mark_used_section): New function.
401         (bfd_generic_gc_sections): Call bfd_mark_used_section.
403 2005-06-08  Alan Modra  <amodra@bigpond.net.au>
405         * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
406         (bfd_fdopenr): Same.
408 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
410         * opncls.c (bfd_fdopenr): Add missing break statements.
412 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
414         * opncls.c (bfd_fopen): New API.
415         (bfd_openr): Use it.
416         (bfd_fdopenr): Likewise.
417         * bfd-in2.h: Regenerated.
419 2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
420             Michael Snyder  <msnyder@redhat.com>
421             Stan Cox  <scox@redhat.com>
423         * Makefile.am (ALL_MACHINES): Add ms1 support.
424         (ALL_MACHINES_CFILES): Same.
425         (BFD32_BACKENDS): Same.
426         (BFD32_BACKENDS_CFILES): Same.
428         * Makefile.in: Regenerate.
430         * archures.c (bfd_architecture): Add ms1 entries.
431         Externalize bfd_ms1_arch.
432         (bfd_archures_list): Add bfd_ms1_arch.
434         * bfd-in2.h: Regenerate.
436         * cpu-ms1.c: New file.
438         * elf32-ms1.c: New file.
440         * targets.c: Define extern of bfd_elf32_ms1_vec.
441         Add bfd_elf32_ms1_vec to _bfd_target_vector.
443         * configure.in: Add bfd_elf32_ms1_vec case.
445         * configure: Regenerate.
447         * config.bfd: Add ms1-*-elf to table.
449 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
451         * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
453 2005-06-07  Alan Modra  <amodra@bigpond.net.au>
455         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
456         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
458 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
460         PR 990
461         * bfd.c (bfd_find_line): New.
463         * dwarf2.c (comp_unit): Add variable_table.
464         (funcinfo): Add file, line, and sec.
465         (varinfo): New.
466         (lookup_symbol_in_function_table): New.
467         (lookup_symbol_in_variable_table): New.
468         (scan_unit_for_functions): Renamed to ...
469         (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
470         DW_TAG_variable.
471         (comp_unit_find_nearest_line): Updated.
472         (comp_unit_find_line): New.
473         (_bfd_dwarf2_find_line): New.
475         * elf-bfd.h (_bfd_elf_find_line): New.
476         (_bfd_generic_find_line): New. Defined.
478         * elf.c (_bfd_elf_find_line): New.
480         * libbfd-in.h (_bfd_dwarf2_find_line): New.
481         (_bfd_generic_find_line): New.
483         * bfd-in2.h: Regenerated.
484         * libbfd.h: Likewise.
486         * libbfd.c (_bfd_generic_find_line): New.
488         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
489         with _bfd_generic_find_line.
490         (bfd_target): Add _bfd_find_line.
492 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
494         * dwarf2.c (decode_line_info): Properly set low_pc.
496 2005-06-06  Alan Modra  <amodra@bigpond.net.au>
498         * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
499         case, include addend when indexing .opd section map.
500         (ppc64_elf_edit_opd): Add no_opd_opt param.  Do nothing besides
501         clear opd_adjust array if no_opd_opt set.  Tidy code.
502         Ignore zero size .opd.  Check bfd_alloc return value.
503         (ppc_stub_name): Return immediately on bfd_malloc fail.
504         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
506 2005-06-04  H.J. Lu  <hongjiu.lu@intel.com>
508         * dwarf2.c (comp_unit): Fix a typo in comment.
510 2005-06-03  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
512         * elf32-vax.c (rtype_to_howto): Remove PARAMS.
513         (reloc_type_lookup): Dito.
514         (elf_vax_discard_copies): Dito.
515         (elf_vax_instantiate_got_entries): Dito.
516         (elf_vax_link_hash_traverse): Dito.
517         (elf_vax_link_hash_newfunc): Dito.
518         (elf_vax_link_hash_table_create): Dito.
519         (elf32_vax_set_private_flags): Dito.
520         (elf32_vax_merge_private_bfd_data): Dito.
521         (elf32_vax_print_private_bfd_data): Dito.
522         (elf_vax_check_relocs): Dito.
523         (elf_vax_gc_mark_hook): Dito.
524         (elf_vax_gc_sweep_hook): Dito.
525         (elf_vax_size_dynamic_sections): Dito.
526         (elf_vax_discard_copies): Dito.
527         (elf_vax_instantiate_got_entries): Dito.
528         (elf_vax_relocate_section): Dito.
529         (elf_vax_finish_dynamic_symbol): Dito.
530         (elf_vax_finish_dynamic_sections): Dito.
531         (elf_vax_hash_table): Break-up of line isn't needed.
532         (elf_vax_check_relocs): Remove leading whitespace
533         (elf_vax_relocate_section): Remove redundant whitespace
534         (elf_vax_link_hash_newfunc): Don't cast NULL.
535         (elf_vax_link_hash_table_create): Dito.
536         * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
538 2005-06-03  Alan Modra  <amodra@bigpond.net.au>
540         PR 568
541         * configure.in: Bump version
542         * configure: Regenerate.
543         * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
544         discarded section sym refs and kill linker output.
545         * simple.c (simple_dummy_einfo): New function.
546         (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
548         * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
549         for all reloc types.
551 2005-06-02  Alan Modra  <amodra@bigpond.net.au>
553         * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
554         restrictive of func code and func descr for undefined syms as well
555         as defined.
557 2005-05-31  Jim Blandy  <jimb@redhat.com>
559         * Makefile.am: Regenerate dependencies with 'make dep-am'.
560         * Makefile.in: Regenerate.
562 2005-05-31  Richard Henderson  <rth@redhat.com>
564         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
565         (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
566         (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
567         (elf64_alpha_want_plt): Update to match.
568         (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
569         (elf64_alpha_relax_with_lituse): Likewise.  Handle JSRDIRECT.
571 2005-05-31  Zack Weinberg  <zack@codesourcery.com>
573         * elf32-arm.c (elf32_arm_reloc_type_lookup)
574         (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
575         Use ISO C90 function declaration style.
577 2005-05-31  James E Wilson  <wilson@specifixinc.com>
579         * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
580         header PF_R flag on PT_LOAD segments.
582 2005-05-30  Richard Henderson  <rth@redhat.com>
584         * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
585         the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
587 2005-05-29  Richard Henderson  <rth@redhat.com>
589         * configure.in (--enable-secureplt): New.
590         * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
591         (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
592         (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
593         (elf64_alpha_use_secureplt): New.
594         (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
595         (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
596         (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
597         (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
598         (struct alpha_elf_link_hash_entry): Add plt_offset.
599         (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
600         (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
601         (PLT_ENTRY_WORD3): Remove.
602         (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
603         on .plt and create .got.plt.
604         (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
605         (get_got_entry): Initialize plt_offset.
606         (elf64_alpha_want_plt): New.
607         (elf64_alpha_check_relocs): Use it.
608         (elf64_alpha_adjust_dynamic_symbol): Likewise.  Don't allocate
609         plt entries here.
610         (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
611         error as user error.
612         (elf64_alpha_size_plt_section_1): Allocate one plt entry per
613         got subsection.
614         (elf64_alpha_size_plt_section): Size .got.plt section.
615         (elf64_alpha_size_rela_got_1): Don't allocate relocations if
616         plt entries used.
617         (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
618         Add PLTRO DYNAMIC entry.
619         (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
620         (elf64_alpha_finish_dynamic_sections): Likewise.
622 2005-05-28  David Daney  <ddaney@avtrex.com>
624         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections):  Move
625         calculation of DT_RELSZ to occur after all dynamic relocations
626         are created.
628 2005-05-28  Eli Zaretskii  <eliz@gnu.org>
630         * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
631         * config.in, configure: Regenerate.
633 2005-05-26  Mark Kettenis  <kettenis@gnu.org>
634             Maciej W. Rozycki  <macro@linux-mips.org>
636         * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
637         stop processing of options if one of invalid size is
638         encountered.
639         (_bfd_mips_elf_section_from_shdr): Likewise.
640         (_bfd_mips_elf_fake_sections): Reset the type of empty special
641         sections.
643 2005-05-26  Richard Henderson  <rth@redhat.com>
645         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
646         plt_old_section, plt_old_value.
647         (elf64_alpha_adjust_dynamic_symbol): Don't set it.
648         (elf64_alpha_size_plt_section_1): Don't use it.
650 2005-05-26  Jakub Jelinek  <jakub@redhat.com>
652         * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
653         first shdr has sh_size == 0.  Fail if e_shnum is large to cause
654         arithmetic overflow when allocating the i_shdr array.
655         Sanity check sh_link and sh_info fields.  Fix e_shstrndx sanity check.
657 2005-05-25  Richard Henderson  <rth@redhat.com>
659         * elf64-alpha.c: Update all function definitions to ISO C.  Remove
660         all function prototypes; rearrange functions into def-use order.
662 2005-05-25  Richard Henderson  <rth@redhat.com>
664         * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
665         in the presence of deleting elements.
666         (elf64_alpha_size_got_sections): Zero dead got section size.
668 2005-05-23  Fred Fish  <fnf@specifixinc.com>
670         * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
671         (struct funcinfo): Add caller_func, caller_file, caller_line.
672         tag, and nesting_level members.
673         (lookup_address_in_function_table): Change first passed parameter
674         from "struct funcinfo *" to "struct comp_unit *".
675         (lookup_address_in_function_table): Dereference unit to find function
676         table.
677         (lookup_address_in_function_table): Traverse the function list to
678         create a chain of inlined functions back to the first non inlined
679         function.
680         (scan_unit_for_functions): Remember tag and nesting level.  Handle
681         DW_AT_call_file and DW_AT_call_line.
682         (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
683         call to pass unit pointer instead of function table pointer.  For
684         inlined functions, save pointer to the inliner chain.
685         (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
686         (_bfd_dwarf2_find_inliner_info): New function that returns information
687         from the inliner chain after a call to bfd_find_nearest_line.
689         * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
690         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
691         NAME##_find_inliner_info.
692         (bfd_target): Add _bfd_find_inliner_info.
693         * bfd-in2.h: Regenerate.
695         * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
696         macro that always returns bfd_false.
697         (_bfd_dwarf2_find_inliner_info): Declare.
698         * libbfd.h: Regenerate.
700         * elf32-arm.c (elf32_arm_find_inliner_info): New function
701         that calls _bfd_dwarf2_find_inliner_info.
702         (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
704         * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
705         that calls _bfd_dwarf2_find_inliner_info.
706         * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
707         * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
708         _bfd_mips_elf_find_inliner_info.
709         * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
710         * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
712         * elf.c (_bfd_elf_find_inliner_info): New function that calls
713         _bfd_dwarf2_find_inliner_info.
714         * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
715         * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
716         _bfd_elf_find_inliner_info.
718         * coffgen.c (coff_find_inliner_info): New function that
719         calls _bfd_dwarf2_find_inliner_info.
720         * libcoff-in.h (coff_find_inliner_info): Declare.
721         * libcoff.h: Regenerate.
722         * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
723         (pmac_xcoff_vec) Ditto.
724         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
725         (aix5coff64_vec): Ditto.
727         * aout-target.h (MY_find_inliner_info): Define as
728         _bfd_nosymbols_find_inliner_info.
729         * aout-tic30.c (MY_find_inliner_info): Ditto.
730         * binary.c (binary_find_inliner_info): Ditto.
731         * i386msdos.c (msdos_find_inliner_info): Ditto.
732         * ihex.c (ihex_find_inliner_info): Ditto.
733         * libaout.h (aout_32_find_inliner_info): Ditto.
734         * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
735         * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
736         * mmo.c (mmo_find_inliner_info): Ditto.
737         * nlm-target.h (nlm_find_inliner_info): Ditto.
738         * pef.c (bfd_pef_find_inliner_info): Ditto.
739         * ppcboot.c (ppcboot_find_inliner_info): Ditto.
740         * srec.c (srec_find_inliner_info): Ditto.
741         * tekhex.c (tekhex_find_inliner_info): Ditto.
742         * versados.c (versados_find_inliner_info): Ditto.
743         * xsym.c (bfd_sym_find_inliner_info): Ditto.
745         * ieee.c (ieee_find_inliner_info): New function that always
746         returns FALSE.
747         * oasys.c (oasys_find_inliner_info): Ditto.
748         * vms.c (vms_find_inliner_info): Ditto.
750 2005-05-24  Alan Modra  <amodra@bigpond.net.au>
752         * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
753         force old plt layout.
755 2005-05-22  Richard Henderson  <rth@redhat.com>
757         * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
758         sections.
759         (elf64_alpha_check_relocs): Likewise.
760         (elf64_alpha_relocate_section): Don't emit dynamic relocations to
761         non-allocated sections.
763 2005-05-22  Richard Henderson  <rth@redhat.com>
765         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
766         undefweak to use zero register.  Call elf64_alpha_relax_got_load
767         if not all uses removed.
768         (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
769         (elf64_alpha_relax_section): Handle undefweak symbols.
770         (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
771         (elf64_alpha_size_rela_got_1): Likewise.
772         (elf64_alpha_relocate_section): Likewise.
774 2005-05-22  Richard Henderson  <rth@redhat.com>
776         * elf64-alpha.c (elf64_alpha_relax_section): Only operate
777         on SEC_CODE sections.
779 2005-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
781         * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
782         unsigned int *.
783         (som_write_space_strings): Change type of tmp_space and p to char *.
784         (som_write_symbol_strings): Likewise.  Also change type of comp to
785         char *comp[4].
786         (som_begin_writing): Change type of strings_size to unsigned int.
787         (som_finish_writing): Likewise.
788         (som_slurp_reloc_table): Change type of external_relocs to unsigned
789         char *.
790         * som.h (struct som_section_data_struct): Change type of reloc_stream
791         field to unsigned char *.
793 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
795         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
796         copy relocations for VxWorks.
798 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
800         * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
801         has_sda_refs.
802         (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
803         (ppc_elf_check_relocs): Set has_sda_refs.
804         (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
805         copy relocations.  Use has_sda_refs to place variables in .sbss.
806         (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
807         .sbss.
809 2005-05-20  Bob Wilson  <bob.wilson@acm.org>
811         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
812         xtensa_default_isa is initialized.
814 2005-05-20  Alan Modra  <amodra@bigpond.net.au>
816         * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
817         for second and subsequent list entries.  Only allocate multiple
818         glink stubs when shared or pie.
819         (ppc_elf_finish_dynamic_symbol): Break out early when only one
820         glink stub is needed.
822 2005-05-19  Zack Weinberg  <zack@codesourcery.com>
824         * Makefile.am: Have 'all' depend on 'info'.
825         * Makefile.in: Regenerate.
827 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
829         * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
830         init_offset.  Add init_got_refcount, init_plt_refcount,
831         init_got_offset and init_plt_offset.
832         * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
833         (_bfd_elf_link_hash_hide_symbol): Likewise.
834         (_bfd_elf_link_hash_table_init): Likewise.
835         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
836         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
837         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
838         (bfd_elf_size_dynamic_sections): Likewise.
839         * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
840         (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
841         LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
842         (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
843         LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
844         (struct plt_entry): New.
845         (ppc_elf_link_hash_table_create): Set new init_plt fields.
846         (ppc_elf_copy_indirect_symbol): Handle merge of plt plist.  Don't
847         use _bfd_elf_link_hash_copy_indirect.
848         (update_plt_info, find_plt_ent): New functions.
849         (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
850         and adjust for use of plt list rather than refcount.
851         (ppc_elf_gc_sweep_hook): Likewise.
852         (ppc_elf_tls_optimize): Likewise.
853         (ppc_elf_adjust_dynamic_symbol): Likewise.
854         (allocate_dynrelocs): Likewise.
855         (ppc_elf_relax_section): Likewise.
856         (ppc_elf_relocate_section): Likewise.  Adjust R_PPC_PLTREL24 addends
857         when performing a relocatable link.
858         (ppc_elf_finish_dynamic_symbol): Likewise.  Write .glink stubs here..
859         (ppc_elf_finish_dynamic_sections): ..rather than here.  Use new
860         pic resolver stub.
862 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
864         * elf.c (assign_file_positions_for_segments): Use maximum of
865         maxpagesize and section alignment when adjusting initial
866         segment offset and section offsets.
868 2005-05-18  Zack Weinberg  <zack@codesourcery.com>
870         * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
871         unconditional.
873 2005-05-18  H.J. Lu  <hongjiu.lu@intel.com>
875         * elf.c (group_signature): Undo the last change. Check if the
876         symbol table section is correct.
878 2005-05-17  Zack Weinberg  <zack@codesourcery.com>
880         * elf32-arm.c: Wherever possible, use official reloc names
881         from AAELF.
882         (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
883         (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
884         (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
885         (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
886         (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
887         (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
888         elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
889         Add many new relocations from AAELF.
890         (elf32_arm_howto_from_type): Update to match.
891         (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
892         R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
893         R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
894         (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
895         (elf32_arm_final_link_relocate): Add support for
896         R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6.  Remove
897         case entries redundant with default.
899         * reloc.c: Reorganize ARM relocations.  Add Thumb
900         assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
901         BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
902         Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
903         BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
904         Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
905         * bfd-in2.h, libbfd.h: Regenerate.
907 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
909         * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
910         elf_shstrtab.
911         * format.c (bfd_check_format_matches): Set output_has_begun
912         for both_direction.
913         * section.c (bfd_set_section_contents): Use bfd_write_p.  Remove
914         special case for both_direction.
916 2005-05-17  Nick Clifton  <nickc@redhat.com>
918         * elf.c (group_signature): Check for a group section which is
919         actually a (corrupt) symbol table section in disguise and prevent
920         an infinite loop from occurring.
922 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
924         * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
925         2005-02-16.
927 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
929         * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
930         predicate on slot 0 only if slot 0 isn't br.
932 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
934         PR 797
935         * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
936         empty sdynbss section.
937         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
939 2005-05-17  Tavis Ormandy <taviso@gentoo.org>
941         * elf.c (bfd_section_from_shdr): Add sanity check when parsing
942         dynamic sections.
944 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
946         * elf32-ppc.c (LIS_11. LIS_12): Define.
947         (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
948         (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
949         for --data-plt when building non-pie executables.
951 2005-05-17  Nick Clifton  <nickc@redhat.com>
953         * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
954         the situation where a symbols's section is not known but a section
955         relative R_ARM_RELATIVE reloc has to be generated for the Symbian
956         OS.
958         * elf32-v850.c (v850_elf_relocate_section): Move code to test for
959         the presence of a symbol table to just before the symbol table is
960         actually used.
962 2005-05-16  H.J. Lu  <hongjiu.lu@intel.com>
964         PR 834
965         * elfxx-ia64.c (elfNN_ia64_relax_br): New.
966         (elfNN_ia64_relax_section): Use it.
968 2005-05-14  Mark Kettenis  <kettenis@gnu.org>
970         * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
971         of basename.
973 2005-05-14  Alan Modra  <amodra@bigpond.net.au>
975         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
976         not DT_PPC_GLINK.
977         (ppc_elf_finish_dynamic_sections): Likewise.
979 2005-05-13  Fred Fish  <fnf@specifixinc.com>
981         * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
982         * libbfd.h: Rebuilt.
984 2005-05-13  Bob Wilson  <bob.wilson@acm.org>
986         * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
987         periods in linkonce_kind values.
989 2005-05-12  H.J. Lu  <hongjiu.lu@intel.com>
991         * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
992         against protected function when building executable.
994 2005-05-12  Alan Modra  <amodra@bigpond.net.au>
996         * elf32-ppc.c (LWZU_0_X_11): Delete.
997         (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
998         (ppc_elf_select_plt_layout): Set .got flags too.  Formatting.
999         (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1000         table.
1001         (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1002         table.
1003         (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1004         Generate .glink branch table and updated stubs.
1006 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
1008         * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1009         (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1010         * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1011         (CROR_151515, CROR_313131): Delete.
1012         (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1013         LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1014         LWZU_0_X_11): Define.
1015         (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1016         and R_PPC_REL16_HA entries.
1017         (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1018         (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1019         (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1020         new_plt, and old_plt.
1021         (ppc_elf_create_dynamic_sections): Create .glink section.
1022         (ppc_elf_check_relocs): Set new_plt and old_plt.
1023         (ppc_elf_select_plt_layout): New function.
1024         (ppc_elf_tls_setup): Set plt output section elf type and flags.
1025         (allocate_got): Handle differences between old and new got layout.
1026         (allocate_dynrelocs): Likewise for plt.
1027         (ppc_elf_size_dynamic_sections): Likewise.  Allocate memory for
1028         .glink.  Don't allocate memory for old bss .plt.  Emit DT_PPC_GLINK.
1029         (ppc_elf_relax_section): Rename ppc_info to htab.  Handle .glink
1030         destination of R_PPC_PLTREL24 relocs.
1031         (ppc_elf_relocate_section): Handle new relocs and changed destination
1032         of R_PPC_PLTREL24.
1033         (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1034         differences in layout.
1035         (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value.  Don't
1036         put a blrl in new got.  Write glink contents.
1037         * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1038         * libbfd.h: Regenerate.
1039         * bfd-in2.h: Regenerate.
1041 2005-05-11  Andreas Schwab  <schwab@suse.de>
1043         * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1044         warning.
1046 2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1048         * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1049         section if SEC_ALLOC isn't set.
1051 2005-05-09  Kelley Cook  <kcook@gcc.gnu.org>
1053         * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1054         * acinclude.m4: Don't sinclude accross.m4.
1055         * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1057 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1059         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1060         (ppc64_elf_add_symbol_hook): Set has_dotsym.
1061         (ppc64_elf_check_directives): Only process syms when has_dotsym.
1062         (func_desc_adjust): Hide fake function descriptors when function
1063         code entry is defined.
1064         (adjust_opd_syms): Adjust for deleted_section becoming union field.
1066 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1068         * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1070 2005-05-08  Dave Korn   <dave.korn@artimi.com>
1072         * coff-tic80.c:  Undefine _CONST after system headers to prevent
1073         clash with tic80-specific definition in include/coff/tic80.h
1075 2005-05-08  H.J. Lu  <hongjiu.lu@intel.com>
1077         PR 939
1078         * elflink.c (elf_link_output_extsym): Use output_bfd if
1079         h->root.u.def.section is bfd_abs_section_ptr when reporting
1080         error.
1082 2005-05-07  H.J. Lu  <hongjiu.lu@intel.com>
1084         * elf-bfd.h (elf_backend_data): Update special_sections to
1085         array of pointer to bfd_elf_special_section.
1086         * elf.c (special_sections): Likewise.
1087         * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1088         * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1089         * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1090         * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1091         * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1092         * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1093         * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1094         * elf32-v850.c (v850_elf_special_sections): Likewise.
1095         * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1096         * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1097         * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1098         * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1099         * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1100         * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1101         * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1102         * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1104         * elf.c (get_special_section): Updated.
1106 2005-05-07  Alan Modra  <amodra@bigpond.net.au>
1108         * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1109         * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1110         * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1111         got_symbol_offset.
1112         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1113         * elf32-frv.c (_frv_create_got_section): Likewise.
1114         * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1115         (elf_backend_got_symbol_offset): Don't define.
1116         * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1117         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1118         and got_gap.
1119         (ppc_elf_create_got): Tidy.
1120         (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1121         (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1122         (ppc_elf_gc_sweep_hook): Likewise.
1123         (ppc_elf_relocate_section): Likewise.
1124         (ppc_elf_finish_dynamic_symbol): Likewise.
1125         (allocate_got): New function.
1126         (allocate_dynrelocs): Use allocate_got.
1127         (ppc_elf_size_dynamic_sections): Likewise.  Delay tlsld_got allocation
1128         so that local got can refcount it.  Set got_header_size.
1129         (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1130         coded 4.
1131         (ppc_elf_finish_dynamic_sections): Likewise.
1132         (elf_backend_got_symbol_offset): Don't define.
1133         (elf_backend_got_header_size): Ditto.
1135 2005-05-05  Steve Ellcey  <sje@cup.hp.com>
1137         * configure.in (ACX_HEADER_STRING): New.
1138         * configure: Regenerate.
1139         * config.in: Regenerate.
1140         * sysdep.h (STRING_WITH_STRINGS): Use.
1142 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1144         * elf.c (_bfd_elf_close_and_cleanup): Only call
1145         _bfd_dwarf2_cleanup_debug_info on bfd_object.
1147 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1149         * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1150         "__bss_start" instead of "_edata" as fallback.
1152 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1154         * bfd-in2.h: Regenerated.
1156 2005-05-05  Paul Brook  <paul@codesourcery.com>
1158         * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1159         * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1160         elf-vxworks.lo.
1161         * configure: Regenerate.
1162         * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1163         (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1164         (elf32-i386.lo): Depend on elf-vxworks.h.
1165         (elf-vxworks.lo): New rule.
1166         * Makefile.in: Regenerate.
1167         * elf-bfd.h (elf_backend_data): Update type of
1168         elf_backend_emit_relocs.
1169         (_bfd_elf_link_output_relocs): Update prototype.
1170         * elflink.c (_bfd_elf_link_output_relocs): Always use
1171         bed->elf_backend_emit_relocs when outputting relocations.
1172         * elfxx-target.h (elf_backend_emit_relocs): Default to
1173         _bfd_elf_link_output_relocs.
1174         * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1175         (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1176         * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1177         (elf_i386_plt0_entry): Remove padding.
1178         (elf_i386_pic_plt0_entry): Ditto.
1179         (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1180         (PLT_NON_JUMP_SLOT_RELOCS): Define.
1181         (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1182         plt0_pad_byte fields.
1183         (elf_i386_link_hash_table_create): Zero them.
1184         (elf_i386_create_dynamic_sections): Create static relocation section.
1185         (allocate_dynrelocs): Allocate space for static PLT relocations.
1186         (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1187         symbols.  Give PLT symbols function type.  Don't strip PLT sections
1188         if we have exported symbols from them.
1189         (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1190         relocation section.  Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1191         VxWorks.
1192         (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1193         Add relocation for GOT location.  Fill in PLT static relocations.
1194         (elf_i386_vxworks_link_hash_table_create): New function.
1195         (elf_i386_vxworks_link_output_symbol_hook): New function.
1196         * elf-vxworks.h: New file.
1198 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1200         * section.c (bfd_make_section_anyway_with_flags): New.
1201         (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1202         (bfd_make_section_with_flags): New.
1203         (bfd_make_section): Call bfd_make_section_with_flags.
1205         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1206         bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1207         instead of bfd_make_section/bfd_make_section and don't call
1208         bfd_set_section_flags.
1209         (mn10300_elf_check_relocs): Likewise.
1210         (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1211         * elf32-arm.c (create_got_section): Likewise.
1212         (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1213         (elf32_arm_check_relocs): Likewise.
1214         * elf32-cris.c (cris_elf_check_relocs): Likewise.
1215         * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1216         (_frv_create_got_section): Likewise.
1217         (elf32_frvfdpic_create_dynamic_sections): Likewise.
1218         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1219         (elf32_hppa_check_relocs): Likewise.
1220         * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1221         (i370_elf_check_relocs): Likewise.
1222         * elf32-i386.c (create_got_section): Likewise.
1223         (elf_i386_check_relocs): Likewise.
1224         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1225         (create_got_section): Likewise.
1226         (m32r_elf_create_dynamic_sections): Likewise.
1227         (m32r_elf_check_relocs): Likewise.
1228         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1229         * elf32-ppc.c (ppc_elf_create_got): Likewise.
1230         (ppc_elf_create_dynamic_sections): Likewise.
1231         (ppc_elf_add_symbol_hook): Likewise.
1232         (ppc_elf_check_relocs): Likewise.
1233         * elf32-s390.c (create_got_section): Likewise.
1234         (elf_s390_check_relocs): Likewise.
1235         * elf32-sh.c (create_got_section): Likewise.
1236         (sh_elf_create_dynamic_sections): Likewise.
1237         (sh_elf_check_relocs): Likewise.
1238         * elf32-vax.c (elf_vax_check_relocs): Likewise.
1239         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1240         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1241         (add_extra_plt_sections): Likewise.
1242         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1243         (elf64_alpha_create_got_section): Likewise.
1244         (elf64_alpha_create_dynamic_sections): Likewise.
1245         (elf64_alpha_check_relocs): Likewise.
1246         * elf64-hppa.c (get_reloc_section): Likewise.
1247         (get_opd): Likewise.
1248         (get_plt): Likewise.
1249         (get_dlt): Likewise.
1250         (get_stub): Likewise.
1251         (elf64_hppa_create_dynamic_sectionso): Likewise.
1252         * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1253         * elf64-ppc.c (create_linkage_sections): Likewise.
1254         (ppc64_elf_check_relocs): Likewise.
1255         * elf64-s390.c (create_got_section): Likewise.
1256         (elf_s390_check_relocs): Likewise.
1257         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1258         (sh64_elf64_create_dynamic_sections): Likewise.
1259         * elf64-x86-64.c (create_got_section): Likewise.
1260         (elf64_x86_64_check_relocs): Likewise.
1261         * elflink.c (_bfd_elf_create_got_section): Likewise.
1262         (_bfd_elf_link_create_dynamic_sections): Likewise.
1263         (elf_link_add_object_symbols): Likewise.
1264         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1265         (elfNN_ia64_create_dynamic_sections): Likewise.
1266         (get_fptr): Likewise.
1267         (get_pltoff): Likewise.
1268         (get_reloc_section): Likewise.
1269         (elfNN_ia64_object_p): Likewise.
1270         * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1271         (mips_elf_create_compact_rel_section): Likewise.
1272         (mips_elf_create_got_section): Likewise.
1273         (_bfd_mips_elf_create_dynamic_sections): Likewise.
1274         * elfxx-sparc.c (create_got_section): Likewise.
1275         (_bfd_sparc_elf_check_relocs): Likewise.
1277         * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1278         on linker created sections.
1280 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1282         PR 882
1283         * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1284         script on executable.
1286 2005-05-05  John Levon  <levon@movementarian.org>
1288         * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1289         allocated memory before returning.
1290         (decode_line_info): Likewise.
1291         (_bfd_dwarf2_cleanup_debug_info): New function:  Frees memory
1292         allocated by functions in this file.
1293         * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1294         * elf.c (_bfd_elf_close_and_cleanup): Call
1295         _bfd_dwarf2_cleanup_debug_info.
1297 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1299         * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1300         * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1301         * configure, config.in, Makefile.in: Regenerate.
1302         * sysdep.h (stpcpy): Revert last change.
1304 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1306         * sysdep.h (stpcpy): Wrap declaration in parentheses.
1308 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1310         * elfxx-ia64.c (ARCH_SIZE): New.
1311         (LOG_SECTION_ALIGN): Likewise.
1312         (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1313         align relocation sections.
1314         (get_fptr): Likewise.
1315         (get_reloc_section): Likewise.
1316         (elfNN_ia64_tprel_base): Likewise.
1317         (elfNN_ia64_check_relocs): Support 32bit relocations.
1318         (allocate_global_fptr_got): Likewise.
1319         (allocate_dynrel_entries): Likewise.
1320         (set_got_entry): Likewise.
1321         (set_pltoff_entry): Likewise.
1322         (elfNN_ia64_relocate_section): Likewise.
1324 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1326         * configure.in: Add AC_CHECK_DECLS(stpcpy).
1327         * configure: Regenerate.
1328         * config.in: Likewise.
1330         * sysdep.h (stpcpy): New.
1332 2005-05-04  Nick Clifton  <nickc@redhat.com>
1334         * Update the address and phone number of the FSF organization in
1335         the GPL notices in the following files:
1336         aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1337         aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1338         aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1339         archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1340         bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1341         cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1342         coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1343         coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1344         coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1345         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1346         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1347         coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1348         coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1349         coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1350         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1351         cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1352         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1353         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1354         cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1355         cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1356         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1357         cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1358         cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1359         cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1360         cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1361         cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1362         dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1363         efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1364         elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1365         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1366         elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1367         elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1368         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1369         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1370         elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1371         elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1372         elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1373         elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1374         elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1375         elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1376         elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1377         elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1378         elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1379         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1380         elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1381         elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1382         epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1383         genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1384         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1385         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1386         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1387         libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1388         libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1389         libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1390         m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1391         mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1392         netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1393         nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1394         nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1395         opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1396         pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1397         pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1398         pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1399         ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1400         sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1401         sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1402         syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1403         vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1404         vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1405         xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1406         hosts/alphavms.h
1408 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1410         * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1411         * bfd-in2.h: Regenerated.
1413         * elflink.c (bfd_elf_set_symbol): New.
1414         (_bfd_elf_provide_symbol): Call it.
1415         (_bfd_elf_provide_section_bound_symbols): New.
1417 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1419         * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1420         at the end, if a strong definition has already been seen.
1422 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
1424         * section.c (struct bfd_section): Replace link_order_head and
1425         link_order_tail with map_head and map_tail union.
1426         (STD_SECTION): Update.
1427         (_bfd_strip_section_from_output): Delete.
1428         * aoutx.h: Update throughout for above changes.
1429         * coff-ppc.c: Likewise.
1430         * cofflink.c: Likewise.
1431         * ecoff.c: Likewise.
1432         * elf-eh-frame.c: Likewise.
1433         * elf-m10300.c: Likewise.
1434         * elf.c: Likewise.
1435         * elf32-arm.c: Likewise.
1436         * elf32-cris.c: Likewise.
1437         * elf32-hppa.c: Likewise.
1438         * elf32-i386.c: Likewise.
1439         * elf32-m32r.c: Likewise.
1440         * elf32-m68hc1x.c: Likewise.
1441         * elf32-m68k.c: Likewise.
1442         * elf32-ppc.c: Likewise.
1443         * elf32-s390.c: Likewise.
1444         * elf32-sh.c: Likewise.
1445         * elf32-vax.c: Likewise.
1446         * elf32-xtensa.c: Likewise.
1447         * elf64-alpha.c: Likewise.
1448         * elf64-hppa.c: Likewise.
1449         * elf64-ppc.c: Likewise.
1450         * elf64-s390.c: Likewise.
1451         * elf64-sh64.c: Likewise.
1452         * elf64-x86-64.c: Likewise.
1453         * elflink.c: Likewise.
1454         * elfxx-ia64.c: Likewise.
1455         * elfxx-mips.c: Likewise.
1456         * elfxx-sparc.c: Likewise.
1457         * linker.c: Likewise.
1458         * merge.c: Likewise.
1459         * pdp11.c: Likewise.
1460         * xcofflink.c: Likewise.
1461         * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1462         out from bfd_elf_size_dynamic_sections.
1463         * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1464         * bfd-in2.h: Regenerate.
1466 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
1468         * section.c (bfd_section_list_remove): Don't clear s->next.
1469         (bfd_section_list_append): Always init s->prev.
1470         (bfd_section_list_prepend): Define.
1471         (bfd_section_list_insert_after): Minor optimization.
1472         (bfd_section_removed_from_list): Rewrite.
1473         * elf.c (assign_section_numbers): Simplify list traversal now that
1474         bfd_section_list_remove doesn't destroy removed section next ptr.
1475         * sunos.c (sunos_add_dynamic_symbols): Likewise.
1476         * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1477         * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1478         * bfd-in2.h: Regenerate.
1480 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
1482         * bfd.c (bfd): Remove section_tail and add section_last.
1483         (bfd_preserve): Likewise.
1484         (bfd_preserve_save): Likewise.
1485         (bfd_preserve_restore): Likewise.
1486         * opncls.c (_bfd_new_bfd): Likewise.
1488         * coffcode.h (coff_compute_section_file_positions): Updated.
1489         (coff_compute_section_file_positions): Likewise.
1490         * elf.c (assign_section_numbers): Likewise.
1491         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1492         * elf64-mmix.c (mmix_elf_final_link): Likewise.
1493         * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1494         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1495         * sunos.c (sunos_add_dynamic_symbols): Likewise.
1496         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1498         * ecoff.c (bfd_debug_section): Initialize prev.
1500         * section.c (bfd_section): Add prev.
1501         (bfd_section_list_remove): Updated.
1502         (bfd_section_list_append): New.
1503         (bfd_section_list_insert_after): New.
1504         (bfd_section_list_insert_before): New.
1505         (bfd_section_list_insert): Removed.
1506         (bfd_section_removed_from_list): Updated.
1507         (STD_SECTION): Initialize prev.
1508         (bfd_section_init): Updated.
1509         (bfd_section_list_clear): Updated.
1511         * bfd-in2.h: Regenerated.
1513 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
1515         * elf.c (_bfd_elf_new_section_hook): Don't call
1516         _bfd_elf_get_sec_type_attr on sections from input files.
1518 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
1520         * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1521         hash table size 16699 instead of bfd_hash_table_init.
1523 2005-05-01  Paul Brook  <paul@codesourcery.com>
1525         * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1526         definition has already been seen.
1528 2005-05-01  Paul Brook  <paul@codesourcery.com>
1530         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1531         R_ARM_PLT32 the same as R_ARM_PC24.
1532         (arm_add_to_rel): Ditto.
1534 2005-04-29  Ralf Corsepius <ralf.corsepius@rtems.org>
1536         * config.bfd: Add h8300*-*-rtemscoff.
1537         Switch h8300*-*-rtems* to elf.
1539 2005-04-29  Daniel Jacobowitz  <dan@codesourcery.com>
1541         * aclocal.m4, Makefile.in: Regnerated.
1543 2005-04-28  Paul Brook  <paul@codesourcery.com>
1545         Merge changes only applied to Makefile.in.
1546         * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1547         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1548         (elfxx-sparc.lo): New rule.
1549         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1550         (elf64-sparc.lo): Likewise.
1552 2005-04-28  Julian Brown  <julian@codesourcery.com>
1554         * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1555         import.
1557 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
1559         * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1561         * elf.c (bfd_elf_sym_name): Updated.
1562         (group_signature): Likewise.
1563         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1564         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1565         (ppc64_elf_edit_toc): Likewise.
1566         (ppc64_elf_relocate_section): Likewise.
1567         * elfcode.h (elf_slurp_symbol_table): Likewise.
1568         * elflink.c (elf_link_input_bfd): Likewise.
1570         * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1571         bfd_elf_sym_name to get local symbol name when reporting errors.
1573 2005-04-27  Nick Clifton  <nickc@redhat.com>
1575         * elflink.c (elf_link_input_bfd): Handle the case where a badly
1576         formatted input file results in a reloc which has no associated
1577         global symbol.
1579 2005-04-26  Jerome Guitton  <guitton@gnat.com>
1581         * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1583 2005-04-25  David S. Miller  <davem@davemloft.net>
1585         * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1586         (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1587         sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1588         Likewise.
1590 2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
1592         PR 858
1593         * elflink.c (elf_link_input_bfd): Make non-debugging reference
1594         to discarded section an error.
1596 2005-04-21  Jerome Guitton  <guitton@gnat.com>
1598         * configure.in: Replace BFD_NEED_DECLARATION checks by the
1599         corresponding AC_CHECK_DECLS.
1600         * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1601         HAVE_DECL_*.
1602         * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1603         * configure: Regenerate.
1604         * config.in: Ditto.
1606 2005-04-21  Andreas Schwab  <schwab@suse.de>
1608         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1609         unsigned from type of dynamic_interpreter.
1610         * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1611         casts again.
1613         * elf.c (assign_section_numbers): Fix comment.
1615 2005-04-21  Jerome Guitton  <guitton@gnat.com>
1617         * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1618         for struct som_exec_auxhdr fields.
1620 2005-04-21  Nick Clifton  <nickc@redhat.com>
1622         * aout-adobe.c: Convert to ISO C and fix formatting.
1623         * aout-arm.c: Convert to ISO C and fix formatting.
1624         * aout-cris.c: Convert to ISO C and fix formatting.
1625         * aout-ns32k.c: Convert to ISO C and fix formatting.
1626         * aout-tic30.c: Convert to ISO C and fix formatting.
1627         * coffcode.h: Convert to ISO C and fix formatting.
1628         * coffswap.h: Convert to ISO C and fix formatting.
1629         * i386aout.c: Convert to ISO C and fix formatting.
1630         * libaout.h: Convert to ISO C and fix formatting.
1631         * libcoff-in.h: Convert to ISO C and fix formatting.
1632         * libcoff.h: Convert to ISO C and fix formatting.
1633         * libecoff.h: Convert to ISO C and fix formatting.
1634         * libnlm.h: Convert to ISO C and fix formatting.
1635         * libpei.h: Convert to ISO C and fix formatting.
1636         * libxcoff.h: Convert to ISO C and fix formatting.
1637         * nlm-target.h: Convert to ISO C and fix formatting.
1638         * nlm.c: Convert to ISO C and fix formatting.
1639         * nlm32-alpha.c: Convert to ISO C and fix formatting.
1640         * nlm32-i386.c: Convert to ISO C and fix formatting.
1641         * nlm32-ppc.c: Convert to ISO C and fix formatting.
1642         * nlm32-sparc.c: Convert to ISO C and fix formatting.
1643         * nlmcode.h: Convert to ISO C and fix formatting.
1644         * nlmswap.h: Convert to ISO C and fix formatting.
1645         * pe-mips.c: Convert to ISO C and fix formatting.
1646         * peXXigen.c: Convert to ISO C and fix formatting.
1647         * peicode.h: Convert to ISO C and fix formatting.
1648         * vms-gsd.c: Convert to ISO C and fix formatting.
1649         * vms-hdr.c: Convert to ISO C and fix formatting.
1650         * vms-misc.c: Convert to ISO C and fix formatting.
1651         * vms-tir.c: Convert to ISO C and fix formatting.
1652         * vms.c: Convert to ISO C and fix formatting.
1653         * vms.h: Convert to ISO C and fix formatting.
1655         * coffgen.c (coff_print_symbol): Restore correct formatting of
1656         output.
1658 2005-04-20  David S. Miller  <davem@davemloft.net>
1660         * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1661         (_bfd_sparc_elf_link_hash_table_create): Likewise.
1662         (allocate_dynrelocs): Likewise.
1664 2005-04-20  Jerome Guitton  <guitton@gnat.com>
1666         * configure.in: Fix the check for basename declaration. Add check
1667         for declarations of ftello, ftello64, fseeko, fseeko64.
1668         * configure: Regenerate.
1669         * config.in: Ditto.
1670         * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1672 2005-04-19  David S. Miller  <davem@davemloft.net>
1674         * elfxx-sparc.c: New file.
1675         * elfxx-sparc.h: New file.
1676         * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1677         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1678         (elfxx-sparc.lo): New rule.
1679         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1680         (elf64-sparc.lo): Likewise.
1681         * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1682         (bfd_elf64_sparc_vec): Likewise.
1683         * configure: Regenerate.
1684         * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1685         * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1686         which is more consistent with elf32-sparc.c
1688 2005-04-19  Daniel Jacobowitz  <dan@codesourcery.com>
1690         * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1691         (mips_elf_create_local_got_entry): Check h->root.forced_local.
1693 2005-04-19  Alan Modra  <amodra@bigpond.net.au>
1695         * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1696         dynamic relocs in non-SEC_ALLOC sections.
1697         (ppc_elf_gc_sweep_hook): Likewise.
1698         (ppc_elf_relax_section): Likewise.
1699         (ppc_elf_relocate_section): Likewise.
1701 2005-04-18  Nick Clifton  <nickc@redhat.com>
1703         * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1704         assigning a value to return_value.
1706 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
1708         PR 855
1709         * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1710         created group data.
1712 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
1714         PR 855
1715         * elf.c (setup_group): Properly handle zero group count.
1717 2005-04-17  Mark Kettenis  <kettenis@gnu.org>
1719         * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1720         (som_is_subspace, compare_subspaces, som_compute_checksum)
1721         (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1722         protoypes.
1723         (hppa_som_reloc, compare_syms, compare_subspaces)
1724         (som_print_symbol, som_get_section_contents)
1725         (som_set_section_contents): Remove space after 'void *'.
1726         (som_bfd_print_private_bfd_data): Use %lx to print longs.
1727         (som_bfd_merge_private_bfd_data)
1728         (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1729         defines.
1731 2004-04-15  Julian Brown  <julian@codesourcery.com>
1733         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1734         * bfd-in2.h: Regenerate.
1735         * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1736         (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1737         (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1738         (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1739         relocations if requested to.
1740         (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1741         use_blx rather than symbian_p.
1742         (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1743         use_blx is in effect.
1744         (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1745         for SymbianOS.
1747 2005-04-15  Nick Clifton  <nickc@redhat.com>
1749         * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1750         values.
1752 2005-04-15  Alan Modra  <amodra@bigpond.net.au>
1754         PR ld/815
1755         * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1756         used as a list pointer.
1758 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
1760         * Makefile.am (NO_WERROR): Define.
1761         * warning.m4: New file
1762         * acinclude.m4: Include warning.m4.
1763         * configure.in: Invoke AM_BINUTILS_WARNINGS.
1764         * Makefile.in: Regenerate.
1765         * configure: Regenerate.
1767 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
1769         * merge.c (sec_merge_emit): Tidy.  Check for bfd_zmalloc errors.
1770         Write trailing padding.
1772         * merge.c (merge_strings): Round up section size for alignment.
1774 2005-04-14  David S. Miller  <davem@davemloft.net>
1776         Add TLS support for 64-bit Sparc ELF.
1777         *  elf64-sparc.c (sparc64_elf_dyn_relocs,
1778         sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1779         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1780         sparc64_elf_hash_entry, sparc64_elf_tdata,
1781         sparc64_elf_local_got_tls_type): New defines.
1782         (sparc64_elf_mkobject): New function.
1783         (sparc64_elf_link_hash_table): Add members for dynamic linker
1784         sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
1785         uion to track TLS GOT references.  Add sym_sec to cache
1786         mappings from local sym to section.
1787         (link_hash_newfunc): New function.
1788         (sparc64_elf_bfd_link_hash_table_create): Rename to
1789         sparc64_elf_link_hash_table_create for consistency.
1790         Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1791         (sparc64_elf_create_dynamic_sections): Initialize new section
1792         members of sparc64_elf_link_hash_table.  Only init srelbss
1793         if not-shared.
1794         (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1795         New functions.
1796         (SPARC_NOP): Define.
1797         (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1798         sparc64_elf_plt_ptr_offset): Delete.
1799         (sparc64_plt_entry_build): New function to build PLT entries
1800         gradually instread of all at once at the end of linking.
1801         (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1802         local vars.  Get them from sparc64_elf_hash_table instead.
1803         Check early on if r_symndx is in bounds.  Handle TLS transitions.
1804         Account for TLS GOT references and DF_STATIC_TLS, as needed.
1805         For TLS relocs, record the tls_type in either
1806         sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1807         appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1808         to the __tls_get_addr symbol.  For PLT relocs, track references
1809         via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1810         PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
1811         symbol references, count the number of relocations needed for
1812         that symbol.  For default switch case, don't error, this lets
1813         the TLS relocs not explicitly handled by this function get
1814         accepted.
1815         (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1816         (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1817         it from sparc64_elf_hash_table.  Store the real PLT offset
1818         in h->plt.offset, and build PLT entries one at a time.  Also
1819         get .dynbss section pointer from htab.
1820         (allocate_dynrelocs, readonly_dynrelocs,
1821         sparc64_omit_section_dynsym): New functions.
1822         (sparc64_elf_omit_section_dynsym): Use these new functions as
1823         helpers.
1824         (dtpoff_base, tpoff): New functions.
1825         (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1826         locals, get them from sparc64_elf_hash_table.  Handle TLS
1827         relocations and refcounting in main relocation loop.
1828         (sparc64_elf_finish_dynamic_symbol): Use
1829         sparc64_elf_link_hash_table.  Build PLT entries as we see
1830         them.  Handle TLS GOT relocations.
1831         (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1832         from sparc64_elf_hash_table.  Initialize only PLT header
1833         not all entries since we not build PLT entries one by one.
1834         (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1835         elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1836         elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1838 2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>
1840         * elflink.c (elf_link_input_bfd): Update check for removed
1841         sections.
1843 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
1845         * Makefile.am: Run "make dep-am".
1846         * Makefile.in: Regenerate.
1847         * aclocal.m4: Regenerate.
1848         * libcoff.h: Regenerate.
1850 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
1852         * linker.c (_bfd_generic_link_output_symbols): Also check if
1853         the output section of an input section has been removed from
1854         the output file.
1856         * section.c (bfd_section_list_remove): Clear the next field
1857         of the removed section.
1858         (bfd_section_removed_from_list): New.
1859         * bfd-in2.h: Regenerated.
1861 2005-04-11  David S. Miller  <davem@davemloft.net>
1863         * elf32-sparc.c (elf32_sparc_relocate_section,
1864         R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1865         R_SPARC_TLS_LE_{HIX22,LOX10}.
1866         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1867         xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1868         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1869         or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1871 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
1873         * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1875 2005-04-11  Nick Clifton  <nickc@redhat.com>
1877         * aout-target.h:  Convert to ISO C.
1878         * aoutf1.h:  Convert to ISO C.
1879         * aoutx.h:  Convert to ISO C.
1880         * bout.c:  Convert to ISO C.
1881         * dwarf1.c:  Convert to ISO C.
1882         * ecoffswap.h:  Convert to ISO C.
1883         * freebsd.h:  Convert to ISO C.
1884         * genlink.h:  Convert to ISO C.
1885         * ieee.c:  Convert to ISO C.
1886         * ihex.c:  Convert to ISO C.
1887         * libcoff-in.h:  Convert to ISO C.
1888         * mach-o.c:  Convert to ISO C.
1889         * mach-o.h:  Convert to ISO C.
1890         * netbsd.h:  Convert to ISO C.
1891         * ns32k.h:  Convert to ISO C.
1892         * ns32knetbsd.c:  Convert to ISO C.
1893         * oasys.c:  Convert to ISO C.
1894         * pdp11.c:  Convert to ISO C.
1895         * pef-traceback.h:  Convert to ISO C.
1896         * pef.c:  Convert to ISO C.
1897         * pef.h:  Convert to ISO C.
1898         * riscix.c:  Convert to ISO C.
1899         * som.c:  Convert to ISO C.
1900         * som.h:  Convert to ISO C.
1901         * srec.c:  Convert to ISO C.
1902         * stabs.c:  Convert to ISO C.
1903         * sunos.c:  Convert to ISO C.
1904         * tekhex.c:  Convert to ISO C.
1905         * versados.c:  Convert to ISO C.
1906         * version.h:  Convert to ISO C.
1907         * xcoff-target.h:  Convert to ISO C.
1908         * xcofflink.c:  Convert to ISO C.
1909         * xsym.c:  Convert to ISO C.
1910         * xsym.h:  Convert to ISO C.
1912 2005-04-08  Paul Brook  <paul@codesourcery.com>
1914         * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1915         (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1916         (ARM2THUMB_PIC_GLUE_SIZE): Define.
1917         (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1918         (elf32_arm_to_thumb_stub): Create PIC stubs.
1919         (record_arm_to_thumb_glue): Use different stub size for relocatable
1920         images.
1922 2005-04-05  Alan Modra  <amodra@bigpond.net.au>
1924         * elf64-ppc.c (dec_dynrel_count): New function split out from
1925         ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1926         (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1927         (ppc64_elf_tls_optimize): Likewise.
1929 2005-04-05  Mark Kettenis  <kettenis@gnu.org>
1931         * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1932         CORE_WCOOKIE_OFFSET.
1933         (SPARC64_WCOOKIE_OFFSET): New.
1934         (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1936 2005-04-05  Nick Clifton  <nickc@redhat.com>
1938         * po/rw.po: New translation: Kinyarwanda
1939         * configure.in (ALL_LINGUAS): Add rw
1940         * configure: Regenerate.
1942 2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1944         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1945         (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1946         SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
1947         section flags.
1948         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1949         to check for SHT_MIPS_OPTIONS sections.
1950         (_bfd_mips_elf_set_section_contents): Likewise.
1952 2005-04-04  Eric Christopher  <echristo@redhat.com>
1954         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1955         Clean up gp handling code.
1957 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
1959         * elf.c (bfd_elf_set_group_contents): Ignore linker created
1960         group section.
1961         (assign_section_numbers): Accept link_info. Check SHT_GROUP
1962         sections for relocatable files only. Remove the linker created
1963         group sections.
1964         (_bfd_elf_compute_section_file_positions): Pass link_info to
1965         assign_section_numbers.
1967         * elfxx-ia64.c (elfNN_ia64_object_p): New.
1968         (elf_backend_object_p): Defined.
1970 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
1972         * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1974 2005-04-03  Fred Fish  <fnf@specifixinc.com>
1976         * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1977         dwarf_ranges_size members.
1978         (struct comp_unit): Add base_address member.
1979         (struct funcinfo): Replace low/high members with an arange.
1980         (arange_add): Replace incoming "unit" parameter with "abfd" and
1981         "first_arange" pointers.  Reorganize/rewrite function body.
1982         (decode_line_info): Change arange_add call to pass bfd and arange
1983         pointers.
1984         (lookup_address_in_line_info_table): Use arange list instead of
1985         individual low/high members.  Walk function's arange list to find
1986         lowest PC in list, to test for overlapping functions.
1987         (read_debug_ranges): New function, reads the debug_ranges section.
1988         (lookup_address_in_function_table): Use arange list instead of
1989         individual low/high members.  Rewrite to find smallest range that
1990         matches.
1991         (read_rangelist): Read a given rangelist from debug_ranges.
1992         (scan_unit_for_functions): Use arange list instead of individual
1993         low/high members.  Handle a DW_AT_ranges attribute.
1994         (parse_comp_unit): Use arange list instead of individual low/high
1995         members.  Save comp unit base address.  Handle a DW_AT_ranges
1996         attribute.
1998 2005-04-01  H.J. Lu  <hongjiu.lu@intel.com>
2000         * elf.c (assign_section_numbers): Really use the kept section.
2002 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2004         * elf-bfd.h (_bfd_elf_check_kept_section): New.
2006         * elf.c (assign_section_numbers): When sh_link points to a
2007         discarded section, call _bfd_elf_check_kept_section to see if
2008         the kept section can be used. Otherwise reject sh_link
2009         pointing to discarded section.
2011         * elflink.c (_bfd_elf_check_kept_section): New.
2012         (elf_link_input_bfd): Use it.
2014 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2016         * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2017         that we no longer need.
2019 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2021         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2022         rather than 0.
2023         (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2025 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2027         * elf.c (assign_section_numbers): Fix a typo.
2029 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2031         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2032         error message.
2033         (_bfd_elf_section_already_linked): Likewise.
2035 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2037         * config.in: Regenerate.
2039 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2041         * config.in (HAVE_DECL_BASENAME): New configure macro.
2042         * configure.in: Check for basename.
2043         * configure: Regenerate.
2045 2005-03-30  Julian Brown  <julian@codesourcery.com>
2047         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2048         bfd_elf32_is_arm_mapping_symbol_name.
2049         * bfd-in2.h: Regenerate.
2050         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2051         bfd_elf32_is_arm_mapping_symbol_name.
2052         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2053         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2054         (arm_elf_find_function): Likewise.
2055         (elf32_arm_output_symbol_hook): Likewise.
2057 2005-03-30  Julian Brown  <julian@codesourcery.com>
2059         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2060         * bfd-in2.h: Regenerate.
2061         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2062         bfd_elf32_is_arm_mapping_symbol_name.
2063         (elf32_arm_output_symbol_hook): Likewise.
2064         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2065         mapping symbols.
2066         (is_arm_mapping_symbol_name): Function moved from here...
2067         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2068         and made global.
2070 2005-03-29  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
2072         * configure.in: Check for ffs decl and alphabetize.
2073         * config.in: Regenerate.
2074         * configure: Regenerate.
2075         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2077 2005-03-29  Fred Fish  <fnf@specifixinc.com>
2079         * dwarf2.c (struct comp_unit): Fix typo.
2080         (scan_unit_for_functions): Remove unused local variable "name"
2081         and dead code that set it.
2083 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2084             Phil Blundell  <philb@gnu.org>
2086         * bfd-in2.h, libbfd.h: Regenerated.
2087         * reloc.c: Add ARM TLS relocations.
2088         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2089         relocations.
2090         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2091         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2092         (elf32_arm_tls_ie32_howto): New.
2093         (elf32_arm_howto_from_type): Support TLS relocations.
2094         (elf32_arm_reloc_map): Likewise.
2095         (elf32_arm_reloc_type_lookup): Likewise.
2096         (TCB_SIZE): Define.
2097         (struct elf32_arm_obj_tdata): New.
2098         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2099         (elf32_arm_mkobject): New function.
2100         (struct elf32_arm_relocs_copied): Add pc_count.
2101         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2102         (GOT_TLS_IE): Define.
2103         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2104         (elf32_arm_link_hash_newfunc): Initialize tls_type.
2105         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2106         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2107         (dtpoff_base, tpoff): New functions.
2108         (elf32_arm_final_link_relocate): Handle TLS relocations.
2109         (IS_ARM_TLS_RELOC): Define.
2110         (elf32_arm_relocate_section): Warn about TLS mismatches.
2111         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2112         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
2113         TLS relocations and pc_count.
2114         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2115         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
2116         calls.
2117         (elf32_arm_size_dynamic_sections): Handle TLS.
2118         (elf32_arm_finish_dynamic_symbol): Likewise.
2119         (bfd_elf32_mkobject): Define.
2121 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2123         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2124         relocation types.  Don't count relocations which will use a PLT.
2126 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2128         * elf.c (elfcore_grok_nto_status): Print tid as long.
2129         (elfcore_grok_nto_regs): Likewise.
2131 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2133         * irix-core.c: Remove some unnecessary prototypes.
2135 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2137         * irix-core.c: Convert to ISO C.
2139 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2141         * irix-core.c (do_sections): Replace + by | in expression.
2142         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2143         to unused parameters to avoid a compiler warning.
2145 2005-03-28  Mark Kettenis  <kettenis@gnu.org>
2147         * netbsd-core.c: Convert to ISO C.  Fix formatting.
2149 2005-03-24  Eric Christopher  <echristo@redhat.com>
2151         * elfxx-mips.c: Revert previous patch.
2153 2005-03-24  Nick Clifton  <nickc@redhat.com>
2155         * targets.c (_bfd_target_vector): Only include the
2156         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2157         all targets enabled.
2159 2005-03-24  James E Wilson  <wilson@specifixinc.com>
2161         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2162         (BFD64_BACKENDS): Add elf32-ia64.lo.
2163         * Makefile.in: Regenerate.
2165 2005-03-23  Eric Christopher  <echristo@redhat.com>
2167         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2168         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2169         after emitting relocation.
2170         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2171         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2172         and readonly_reloc.
2174 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
2175             Nick Clifton  <nickc@redhat.com>
2177         * config.bfd: Accept any C library to accompany a GNU Linux
2178         implementation, not just the GNU C library.
2179         * configure.in: Likewise.
2180         * configure: Regenerate.
2182 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2184         * bfd-in.h (_bfd_elf_provide_symbol): New.
2185         * bfd-in2.h: Regenerated.
2187         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2188         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2189         of set_linker_sym.
2191         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2192         from elf32-ppc.c.
2194 2005-03-22  Hans-Peter Nilsson  <hp@axis.com>
2196         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2198 2005-03-22  Bob Wilson  <bob.wilson@acm.org>
2200         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2201         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2202         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2203         (xtensa_opcode_decode): Rearrange code.
2205 2005-03-22  Nick Clifton  <nickc@redhat.com>
2207         * binary.c: Convert to ISO C90 formatting.
2208         * coff-arm.c: Convert to ISO C90 formatting.
2209         * coffgen.c: Convert to ISO C90 formatting.
2210         * elf32-gen.c: Convert to ISO C90 formatting.
2211         * elf64-gen.c: Convert to ISO C90 formatting.
2212         * hash.c: Convert to ISO C90 formatting.
2213         * ieee.c: Convert to ISO C90 formatting.
2215 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2217         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2218         unresolved symbols in R_ARM_NONE relocations.
2220 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2222         * elf32-arm.c (elf32_arm_final_link_relocate): Add
2223         UNRESOLVED_RELOC_P argument.  Set it appropriately.
2224         (elf32_arm_relocate_section): Update call to
2225         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
2226         unresolved_reloc instead.
2228 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
2230         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2231         .gnu.warning.* sections.
2233 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2235         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2236         written_address_p.
2237         (ppc_elf_create_linker_section): Don't try to reuse existing section.
2238         (elf_create_pointer_linker_section): Delete info parm.  Don't make
2239         h dynamic.  Don't set written_address_p.
2240         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2241         (bfd_put_ptr): Delete.
2242         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2243         Always write section contents.  Assert global sym is def_regular.
2244         Use offset bottom bit as a written flag.
2245         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2246         calls.
2248 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2250         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2251         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
2252         and end syms.
2254 2005-03-21  Nick Clifton  <nickc@redhat.com>
2256         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2257         targets.
2258         (t2a1_bx_pc_insn): Likewise.
2259         (t2a2_noop_insn): Likewise.
2260         (t2a3_b_insn): Likewise.
2261         (t2a1_push_insn): Likewise.
2262         (t2a2_ldr_insn): Likewise.
2263         (t2a3_mov_insn): Likewise.
2264         (t2a4_bx_insn): Likewise.
2265         (t2a5_pop_insn): Likewise.
2266         (t2a6_bx_insn): Likewise.
2267         (coff_arm_relocate_section): Only declare the high_address
2268         variable for non WINCE targets.
2270 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2272         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2273         SEC_LINKER_CREATED.  Attach to dynobj.
2274         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2276 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2278         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2279         sym_offset.  Add name, bss_name, sym_name, sym_val.
2280         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2281         Add sdata array of elf_linker_section_t.
2282         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2283         (enum elf_linker_section_enum): Delete.
2284         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
2285         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2286         the special sections are needed.  Adjust htab->sdata refs.
2287         Ensure dynobj is set in sreloc code.
2288         (ppc_elf_size_dynamic_sections): Strip sdata sections.
2289         (ppc_elf_set_sdata_syms): New function.
2290         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2291         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
2292         sym_val instead of sym_hash.
2293         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2295 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2297         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2298         (ppc_elf_merge_private_bfd_data): Likewise.
2300 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2302         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2303         (ppc_elf_create_linker_section): Don't create rel_section.
2304         (elf_create_pointer_linker_section): Don't size relocs.
2305         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2306         Don't generate relocs.
2307         (ppc_elf_relocate_section): Adjust calls to
2308         elf_finish_pointer_linker_section.
2310 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2312         * elf32-ppc.c (is_ppc_elf_target): New function.
2313         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2314         for bfd_target_elf_flavour.  Do this test before endian check.
2315         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2316         (ppc_elf_size_dynamic_sections): Likewise.
2318 2005-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2320         * elf-bfd.h (elf_backend_data): Add int to
2321         elf_backend_section_from_shdr.
2322         (bfd_elf_section_data): Update comment for this_idx.
2323         (_bfd_elf_make_section_from_shdr): Add int.
2324         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2326         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2327         and use it to set this_idx in bfd_elf_section_data.
2328         (bfd_section_from_shdr): Pass shindex to
2329         _bfd_elf_make_section_from_shdr.
2330         (_bfd_elf_section_from_bfd_section): Use this_idx in
2331         bfd_elf_section_data to find section index.
2333         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2334         index and pass it to _bfd_elf_make_section_from_shdr.
2335         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2336         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2337         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2338         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2339         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2340         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2341         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2342         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2343         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2345 2005-03-19  Danny Smith <dannysmith@users.sourceforge.net>
2346             Ross Ridge  <rridge@csclub.uwaterloo.ca>
2348         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2349         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2350         cases.  Add comment.
2352 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2354         * elflink.c (elf_mark_used_section): Remove check for special
2355         sections.
2357 2005-03-18  Andreas Schwab  <schwab@suse.de>
2359         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2360         from bfd_vma to ia64_insn, remove broken cast.
2362 2005-03-18  C Jaiprakash  <cjaiprakash@noida.hcltech.com>
2364         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2365         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2366          elf_m68k_finish_dynamic_sections): Use it.
2368 2005-03-17  Paul Brook <paul@codesourcery.com>
2369             Dan Jacobowitz <dan@codesourcery.com>
2370             Mark Mitchell  <mark@codesourcery.com>
2372         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2373         (elf32_arm_additional_program_headers): Likewise.
2374         (elf_backend_modify_segment_map): Define.
2375         (elf_backend_additional_program_headers): Likewise.
2376         (elf32_arm_symbian_modify_segment_map): Use
2377         elf32_arm_modify_segment_map.
2379 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2381         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2382         for special sections.
2384 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
2386         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2387         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2388         section_sym_count param, and return number of section symbols.
2389         (bfd_elf_size_dynamic_sections): Clear section symbol area of
2390         .dynsym contents.  Don't bother calling swap_symbol_out on the
2391         first all-zero dynsym.
2392         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
2393         special sections like bfd_abs_section.
2394         (bfd_elf_gc_sections): Spelling fix.
2396 2005-03-16  Fred Fish  <fnf@specifixinc.com>
2398         PR binutils/790
2399         * dwarf2.c (read_indirect_string): Fix apparent typo, check
2400         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2402 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
2404         * elflink.c (elf_mark_used_section): New.
2405         (bfd_elf_gc_sections): Call elf_gc_mark_section for
2406         non-relocatable link if we don't do GC.
2408 2005-03-16  Nick Clifton  <nickc@redhat.com>
2409             Ben Elliston  <bje@au.ibm.com>
2411         * configure.in (werror): New switch: Add -Werror to the
2412         compiler command line.  Enabled by default.  Disable via
2413         --disable-werror.
2414         * configure: Regenerate.
2416 2005-03-16  Nick Clifton  <nickc@redhat.com>
2418         * ecoff.c: Convert to ISO C90 formatting.
2420 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
2422         * elf32-ppc.c: Divide file into general and linker specific
2423         functions.  Sort linker functions into roughly the order in which
2424         they are called by the ELF linker code.
2426 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
2428         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2429         on section.  Correct comment, and add FIXME.
2430         (ppc_elf_additional_program_headers): Don't bump header count for
2431         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2432         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2433         do allocate memory if they need it.
2435 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
2437         * config.bfd (x86_64-elf): Add target.
2439 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
2441         * po/es.po: Commit new Spanish translation.
2443 2005-03-14  H.J. Lu  <hongjiu.lu@intel.com>
2445         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2446         for global symbol when reporting overflow.
2448 2005-03-11  Jakub Jelinek  <jakub@redhat.com>
2450         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2451         * libbfd.h: Rebuilt.
2452         * archive.c (_bfd_ar_spacepad): New function.
2453         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2454         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2455         coff_write_armap): Use it.
2456         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
2457         uid/gid support.
2458         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2460 2005-03-10  Mark Kettenis  <kettenis@gnu.org>
2462         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2463         has_table to the start of the function.
2465 2005-03-10  Ben Elliston  <bje@au.ibm.com>
2467         * archive.c: Include hashtab.h.
2468         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2469         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2470         (hash_file_ptr): New function.
2471         (eq_file_ptr): Likewise.
2472         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2473         * libbfd-in.h: Include hashtab.h.
2474         (struct artdata): Change `cache' member type to htab_t.
2475         * libbfd.h: Rebuild.
2477 2005-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
2479         * configure.in: Bump version to 2.16.90.
2480         * configure: Regenerated.
2482 2005-03-07  Jakub Jelinek  <jakub@redhat.com>
2484         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2485         close is a function like macro in system headers.
2487 2005-03-07  Alan Modra  <amodra@bigpond.net.au>
2489         PR ld/778
2490         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2491         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2493 2005-03-06  Alan Modra  <amodra@bigpond.net.au>
2495         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2497 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
2499         * po/bfd.pot: Regenerate.
2501 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
2503         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2504         with is_func.
2505         (func_desc_adjust): Force dot-syms local in executables as well
2506         as shared libs.
2508 2005-03-04  David Daney  <ddaney@avtrex.com>
2510         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2511         '__gnu_local_gp' symbol used by gas -mno-shared.
2513 2005-03-03  H.J. Lu  <hongjiu.lu@intel.com>
2515         * elf-bfd.h (elf_backend_data): Add "const char *" to
2516         elf_backend_section_from_phdr.
2518         * elf.c (bfd_section_from_phdr): Pass "proc" to the
2519         elf_backend_section_from_phdr hook.
2521 2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
2522             Joseph Myers  <joseph@codesourcery.com>
2524         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2525         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2526         and tls_ldm_offset.
2527         (struct mips_elf_got_per_bfd_arg): Add global_count.
2528         (struct mips_elf_count_tls_arg): New.
2529         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2530         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2531         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2532         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2533         (TLS_RELOC_P): Define.
2534         (TP_OFFSET, DTP_OFFSET): Define.
2535         (dtprel_base, tprel_base): New functions.
2536         (mips_elf_link_hash_newfunc): Initialize tls_type.
2537         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2538         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2539         TLS entries.
2540         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2541         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2542         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2543         (mips_tls_got_index): New functions.
2544         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2545         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
2546         mips_tls_got_index.
2547         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2548         Handle TLS entries.
2549         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2550         mips_elf_create_local_got_entry.
2551         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2552         arguments.  Handle TLS entries.
2553         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2554         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
2555         TLS entries.
2556         (mips_elf_record_global_got_symbol): Likewise.
2557         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2558         Count TLS entries.
2559         (mips_elf_merge_gots): Handle TLS entries when merging.
2560         (mips_elf_initialize_tls_index): New function.
2561         (mips_elf_set_global_got_offset): Handle TLS entries.
2562         (mips_elf_adjust_gp): Handle TLS.
2563         (mips_elf_multi_got): Remove redundant call to
2564         mips_elf_resolve_final_got_entries.  Initialize global_count.
2565         Correct a comment.  Initialize new TLS members of mips_got_info.
2566         Assign TLS GOT indexes for new GOTs.
2567         (mips_elf_create_got_section): Initialize new TLS members of
2568         mips_got_info.
2569         (mips_elf_calculate_relocation): Handle TLS relocs.
2570         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
2571         functions.
2572         (_bfd_mips_elf_always_size_sections): Handle TLS.
2573         (_bfd_mips_elf_size_dynamic_sections): Likewise.
2574         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
2575         changed functions.
2576         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2577         (_bfd_mips_elf_hide_symbol): Handle TLS.
2578         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2579         (mips_reloc_map): Add TLS relocs.
2580         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2581         * elf64-mips.c (mips_elf64_howto_table_rel)
2582         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2583         * reloc.c: Define new MIPS TLS relocations.
2584         * libbfd.h, bfd-in2.h: Regenerated.
2586 2005-03-02  Jan Beulich  <jbeulich@novell.com>
2588         * Makefile.am: Add dependency of cache.o on libiberty.h.
2589         * cache.c: Include libiberty.h.
2590         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2592 2005-03-01  Zack Weinberg  <zack@codesourcery.com>
2594         * elf.c (bfd_section_from_shdr <default case>): Call
2595         elf_backend_section_from_shdr hook unconditionally, and return
2596         what it returns.
2597         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2598         * elfxx-target.h (elf_backend_section_from_shdr)
2599         (elf_backend_section_from_phdr): Default to
2600         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2601         respectively.
2603 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
2605         * targets.h: Typo fix.
2606         * bfd-in2.h: Regenerate.
2608         * bout.c (b_out_write_object_contents): Don't use sizeof on host
2609         structs to size on-disk structures.
2610         (b_out_set_section_contents): Size the external struct, not the
2611         internal one for on-disk size.
2612         (b_out_sizeof_headers): Likewise.
2614 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
2616         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2617         entry points with the func descriptor as well as undefweak.
2619 2005-02-28  Ross Ridge  <rridge@csclub.uwaterloo.ca>
2621         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2622         present when IMPORT_NAME_UNDOECRATE is used.
2624 2005-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2626         PR 757
2627         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2628         int.
2630         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2631         to _bfd_elf_merge_symbol.
2633         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2634         unsigned int to return the alignment of the old common symbol
2635         in the dynamic object.
2636         (_bfd_elf_add_default_symbol): Pass NULL to
2637         _bfd_elf_merge_symbol.
2638         (elf_link_add_object_symbols): Pass &old_alignment to
2639         _bfd_elf_merge_symbol. Get the alignment of the new common
2640         symbol in the dynamic object.
2642 2005-02-24  Ben Elliston  <bje@au.ibm.com>
2644         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2645         * format.c (bfd_check_format_matches): Likewise.
2646         * archive.c (BFD_GNU960_ARMAG): Likewise.
2647         (bfd_generic_archive_p): Likewise.
2648         (_bfd_write_archive_contents): Likewise.
2650 2005-02-24  H.J. Lu  <hongjiu.lu@intel.com>
2652         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2653         * configure: Regenerate.
2655 2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
2657         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2658         COMDAT group sections to have default visibility.
2660 2005-02-24  Alan Modra  <amodra@bigpond.net.au>
2662         * coffcode.h (coff_print_aux): Warning fix.
2663         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2664         instead of section pointer to identify.
2665         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
2666         the correct size buffer for local sym mangling too.
2667         (h8300_bfd_link_add_symbols): Likewise.
2668         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2669         warning.
2670         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2671         * elf32-xtensa.c (literal_value_hash): Warning fix.
2672         * versados.c (process_otr): Warning fix.
2673         (versados_canonicalize_reloc): Likewise.
2674         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2675         * vms.c (fill_section_ptr): Warning fix.
2677 2005-02-23  H.J. Lu  <hongjiu.lu@intel.com>
2679         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2680         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2682 2005-02-23  Nick Clifton  <nickc@redhat.com>
2684         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2685         the relvaddr field of the Elf32_crinfo structure.
2687         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2688         variables that are passed by reference to
2689         m68hc11_get_relocation_value in case that function does not
2690         initialise them.
2692         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2693         return statements and replace with a single return at the end of
2694         the function.  This helps pacify the flow analysis code in gcc 4.0.
2696         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2697         strtab to avoid compile time warning.
2699 2005-02-23  Ben Elliston  <bje@au.ibm.com>
2701         * opncls.c (bfd_zalloc): Document this function.
2703 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
2705         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2706         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2707         Replace SEC_SHARED with SEC_COFF_SHARED.
2708         (styp_to_sec_flags): Likewise.
2710         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2711         (TARGET_LITTLE_SYM): Likewise.
2713         * section.c (SEC_ARCH_BIT_0): Removed.
2714         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2715         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2716         (SEC_SHARED): Renamed to ...
2717         (SEC_COFF_SHARED): This.
2718         (SEC_BLOCK): Renamed to ...
2719         (SEC_TIC54X_BLOCK): This.
2720         (SEC_CLINK): Renamed to ...
2721         (SEC_TIC54X_CLINK): This.
2722         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2723         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2724         end.
2725         * bfd-in2.h: Regenerated.
2727 2005-02-21  Fred Fish  <fnf@specifixinc.com>
2729         * dwarf2.c (find_abstract_instance_name): Call recursively
2730         to handle a DW_AT_specification.
2732 2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
2734         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2735         mips_elf_create_dynamic_relocation,
2736         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2737         Remove #if 0'd code.
2739 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
2741         * Makefile.am: Run "make dep-am"
2742         * Makefile.in: Regenerate.
2744 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
2746         * coffgen.c (bfd_coff_get_comdat_section): Check that
2747         coff_section_data isn't NULL.
2749 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
2751         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2752         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2753         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
2754         useless assignments.
2755         (xcoff_write_archive_contents_big): Likewise.
2756         (_bfd_xcoff_put_ldsymbol_name): Likewise.
2757         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2758         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2759         * cofflink.c (process_embedded_commands): Warning fixes.
2760         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
2761         Warning fixes.
2762         * dwarf2.c: Warning fixes.
2763         * elf-bfd.h: Likewise.
2764         * elf-eh-frame.c: Likewise.
2765         * elf-strtab.c: Likewise.
2766         * elf.c: Likewise.
2767         * elf32-m68k.c: Likewise.
2768         * elf32-ppc.c: Likewise.
2769         * elf32-sh-symbian.c: Likewise.
2770         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
2771         * elf64-sh64.c: Likewise.
2772         * peicode.h: Likewise.
2773         * elf64-mmix.c: Warning fixes.
2774         * elfcode.h: Likewise.
2775         * elfxx-mips.c: Likewise.
2776         * libbfd-in.h: Likewise.
2777         * libbfd.c: Likewise.
2778         * mach-o.c: Likewise.
2779         * merge.c: Likewise.
2780         * mmo.c: Likewise.
2781         * opncls.c: Likewise.
2782         * pef.c: Likewise.
2783         * srec.c: Likewise.
2784         * vms-hdr.c: Likewise.
2785         * vms-tir.c: Likewise.
2786         * xtensa-isa.c: Likewise.
2787         * xtensa-modules.c: Likewise.
2788         * xsym.c: Likewise.
2789         (pstrcmp): Use correct choice of string lengths.  Fix return value.
2790         (bfd_sym_module_name): Correct string length.
2791         * bfd-in2.h: Regenerate.
2792         * libbfd.h: Regenerate.
2794 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
2796         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2797         uninitialized check_segment[1] in TLSMOFF case.
2798         Reported by Alan Modra.
2799         (elf32_frv_relocate_section): Improve errors and warnings.
2801 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
2803         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2805 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
2807         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2808         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2809         * pef.c (bfd_pef_scan): Don't ignore return value of
2810         bfd_pef_scan_start_address.
2811         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2812         bfd_mach_o_scan_start_address.
2813         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2814         * elfxx-mips.c: Remove unnecessary prototypes.
2815         (sort_dynamic_relocs_64): Abort if not BFD64.
2817 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
2819         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2820         Skip toc reloc adjust if reloc_count is zero.
2822 2005-02-15  Nigel Stephens  <nigel@mips.com>
2823             Maciej W. Rozycki  <macro@mips.com>
2825         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2826         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2827         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2828         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2829         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
2830         dst_mask.
2831         (mips16_gprel_reloc): Remove bit shuffling; call
2832         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2833         and _bfd_mips16_elf_reloc_shuffle() instead.
2834         (mips16_reloc_map): New reloc map for MIPS16 relocs.
2835         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2836         relocs.
2837         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2838         elf_mips16_howto_table_rel.
2839         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2840         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
2841         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2842         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2843         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
2844         dst_mask.
2845         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2846         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2847         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2848         placeholders.
2849         (mips16_gprel_reloc): Remove bit shuffling; call
2850         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2851         and _bfd_mips16_elf_reloc_shuffle() instead.
2852         (mips16_reloc_map): New reloc map for MIPS16 relocs.
2853         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2854         relocs.
2855         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2856         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2857         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2858         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2859         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2860         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2861         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
2862         dst_mask.
2863         (mips16_gprel_reloc): Remove bit shuffling; call
2864         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2865         and _bfd_mips16_elf_reloc_shuffle() instead.
2866         (mips16_reloc_map): New reloc map for MIPS16 relocs.
2867         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2868         relocs.
2869         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2870         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2871         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2872         handle bit shuffling for MIPS16 relocs.
2873         (_bfd_mips16_elf_reloc_shuffle): Likewise.
2874         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2875         and _bfd_mips16_elf_reloc_shuffle().
2876         (_bfd_mips_elf_generic_reloc): Likewise.
2877         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
2878         and R_MIPS16_LO16.
2879         (mips_elf_obtain_contents): Remove bit shuffling.
2880         (mips_elf_perform_relocation): Likewise; call
2881         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2882         instead.
2883         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
2884         and R_MIPS16_LO16.
2885         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2886         (_bfd_mips16_elf_reloc_shuffle): Likewise.
2887         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2888         (BFD_RELOC_MIPS16_HI16_S): Likewise.
2889         (BFD_RELOC_MIPS16_LO16): Likewise.
2890         * bfd-in2.h: Regenerate.
2891         * libbfd.h: Regenerate.
2893 2005-02-15  Jan Beulich  <jbeulich@novell.com>
2895         * elfxx-ia64.c (ia64_howto_table): Correct strings for
2896         R_IA64_DTPMOD64[LM]SB.
2898 2005-02-14  H.J. Lu  <hongjiu.lu@intel.com>
2900         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2901         backward branch in the same section.
2902         (elfNN_ia64_relocate_section): Inform users that the input
2903         section is too big to relax br instruction when overflow
2904         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2905         and R_IA64_PCREL21F.
2907 2005-02-14 Orjan Friberg <orjanf@axis.com>
2909         * elfcore.h (elf_core_file_p): Move the call to
2910         elf_backend_object_p to allow the correct machine to be set before
2911         processing the program headers.
2913 2005-02-14  Nick Clifton  <nickc@redhat.com>
2915         PR binutils/716
2916         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2917         aware flag from the input bfd to the output bfd.
2919 2005-02-11  Maciej W. Rozycki  <macro@mips.com>
2921         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2922         R_MIPS_LITERAL relocations for external symbols.
2923         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2924         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2926 2005-02-11  H.J. Lu  <hongjiu.lu@intel.com>
2928         * bfd-in2.h: Rebuilt.
2930 2005-02-11  Paul Brook  <paul@codesourcery.com>
2932         * elf-bfd.h (struct elf_link_hash_table): Add
2933         is_relocatable_executable.
2934         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2935         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2936         symbols in relocatable executables.
2937         (bfd_elf_record_link_assignment): Create dynamic section symbols in
2938         relocatable executables.
2939         (_bfd_elf_link_renumber_dynsyms): Ditto.
2940         (bfd_elf_final_link): Ditto.
2941         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2942         relocations into relocatable executables.
2943         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2944         executables.  Also copy absolute relocations.
2945         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2946         in relocatable executables.
2947         (allocate_dynrelocs): Copy relocations for relocatable executables.
2948         Output dynamic symbols for symbols defined in linker scripts.
2950 2005-02-11  Nick Clifton  <nickc@redhat.com>
2952         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2953         to avoid a compile time warning.
2955         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2956         BFD_ASSERT.
2958         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2959         inclusion of coffcode.h so that it is actually picked up.
2961         * coffcode.h (coff_std_swap_table): Add an unused attribute in
2962         case it is not used.
2964         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2965         structure and macro.
2967         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2968         array.
2970         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2971         to protect the declaration of this array.
2973         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2974         Avoid call to memcpy with a size of 0.
2976 2005-02-12  Alan Modra  <amodra@bigpond.net.au>
2978         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2979         old-style branches to undefined dot-symbols which will be
2980         satisfied by a plt call.
2982 2005-02-11  Alan Modra  <amodra@bigpond.net.au>
2984         * elf64-ppc.c (move_plt_plist): New function, extracted from..
2985         (ppc64_elf_copy_indirect_symbol): ..here.
2986         (func_desc_adjust): Use move_plt_plist.
2988 2005-02-10  Paul Brook  <paul@codesourcery.com>
2990         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2992 2005-02-10  Paul Brook  <paul@codesourcery.com>
2994         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2995         symbols local.
2996         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2997         (elf_link_renumber_local_hash_table_dynsyms): New function.
2998         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3000 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
3002         * bfd-in.h (BFD_LINKER_CREATED): Define.
3003         * bfd-in2.h: Rebuilt.
3004         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3005         BFD_LINKER_CREATED bfds when determining input bfds without
3006         .note.GNU-stack section.
3008 2005-02-10  Maciej W. Rozycki  <macro@mips.com>
3010         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3011         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3012         relocations against external symbols unchanged.
3014 2005-02-08  Paul Brook  <paul@codesourcery.com>
3016         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3017         sections.
3019 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
3021         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3022         prefix here.
3024 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3026         * elf64-mips.c: Fix formatting throughout.
3028 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3030         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3032 2005-02-07  Alexandre Oliva  <aoliva@redhat.com>
3034         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3035         *ABS*/*UND* sections.
3036         (elf32_frv_relocate_section): Move zero-addend-required error...
3037         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
3038         missing needed TLS section.
3040 2005-02-07  Hans-Peter Nilsson  <hp@axis.com>
3042         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3043         being the last symbol.
3044         (aout_link_add_symbols): Just return TRUE if a warning
3045         symbol was last.
3047 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3049         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3050         R_MIPS_GPREL32 relocations against external symbols.
3051         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3052         comment.
3054 2005-02-07  Alan Modra  <amodra@bigpond.net.au>
3056         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3057         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3058         elf_string_from_elf_strtab.
3059         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3060         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3061         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
3062         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3063         looking at cached symtab info first, before iterating over headers.
3064         For SHT_REL and SHT_RELA, load dynsymtab if needed.
3065         * elfcode.h (elf_object_p): Don't load section header stringtab
3066         specially.
3068 2005-02-06  H.J. Lu  <hongjiu.lu@intel.com>
3070         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3071         against protected function when building shared library.
3073         PR 584
3074         * elf64-x86-64.c (is_32bit_relative_branch): New.
3075         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3076         protected function symbol when building shared library for
3077         32bit relative branch instruction.
3079 2005-02-06  Alan Modra  <amodra@bigpond.net.au>
3081         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3082         syms when doing a relocatable link.
3083         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3084         at u.def.section.
3085         (ppc64_elf_tls_setup): Likewise.
3086         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3088 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3090         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3091         (link_hash_newfunc): Clear all locals using memset.
3092         (make_fdh): Remove flags param.  Always create fake func desc
3093         weak.  Link the descriptor with the code entry sym.
3094         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3095         (add_symbol_adjust): Adjust make_fdh call.
3096         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
3097         descriptor to strong undefined if code entry is strong.
3099 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3101         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3102         lookup here.  Set to new before calling bfd_link_repair_undef_list.
3103         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3105 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3107         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3109 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3111         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3112         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3113         before the as-needed lib was loaded.  Abort on unexpected refs.
3115 2005-02-02  Alan Modra  <amodra@bigpond.net.au>
3117         * elflink.c (elf_smash_syms): Expand comments.
3118         (elf_link_add_object_symbols): Only call elf_smash_syms for
3119         as-needed dynamic objects.
3121         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3122         everything, just the field specific to ia64.
3123         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3125 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3127         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3128         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
3129         undefined syms.
3130         (struct add_symbol_adjust_data): New.
3131         (add_symbol_adjust): Make an undefweak func desc for old ABI
3132         objects to link with --as-needed shared libs.  Return fail status.
3133         Don't adjust old ABI func entry sym to weak if func desc syms
3134         isn't defined.
3135         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3136         and return status.
3138 2005-02-01  Hans-Peter Nilsson  <hp@axis.com>
3140         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3141         for clarity.
3143 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3145         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3146         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3147         remove anything but new and undefweak.
3148         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3149         existing _DYNAMIC.
3150         (_bfd_elf_create_dynamic_sections): Formatting.
3151         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3152         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3153         (struct elf_smash_data): New.
3154         (elf_smash_syms): New function.
3155         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
3156         unneeded dynamic objects to loaded list.
3157         (elf_link_output_extsym): Don't handle as-needed here.  Strip
3158         bfd_link_hash_new symbols.
3159         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3160         delref when dynindx is already -1.
3161         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3162         symbols.
3163         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3165 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3167         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3169 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3171         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3172         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3173         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3174         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3175         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3176         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3177         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3178         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3179         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3180         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3181         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3182         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3183         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3184         throughout. Similarly, collapse #if 1'd code.
3186 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3188         * elf-bfd.h (bfd_elf_discard_group): Remove.
3189         * elf.c (bfd_elf_discard_group): Likewise.
3190         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3192 2005-01-31  Richard Sandiford  <rsandifo@redhat.com>
3194         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3195         (_bfd_elf_eh_frame_address_size): Declare.
3196         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3197         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3198         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3199         (elf_backend_eh_frame_address_size): Define.
3200         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3201         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3202         size from the new backend hook.
3203         (_bfd_elf_write_section_eh_frame): Likewise.
3204         (_bfd_elf_eh_frame_address_size): New function.
3206 2005-01-31  Andrew Cagney  <cagney@gnu.org>
3208         * configure: Regenerate to track ../gettext.m4.
3210 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3212         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3213         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3215 2005-01-31  Nick Clifton  <nickc@redhat.com>
3217         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3218         sparc-lynxos, vax-vms) be obsolete.
3220 2005-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
3222         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3223         * elf32-arm.c (ELF_MINPAGESIZE): Define.
3224         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3225         * elfcode.h (elf_object_p): Use minpagesize instead of
3226         maxpagesize.
3227         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3228         (elfNN_bed): Include ELF_MINPAGESIZE.
3230 2005-01-28  Julian Brown  <julian@codesourcery.com>
3232         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3233         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3234         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3235         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3236         passing flag value from ld. Set flag value in global hash table entry.
3237         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3238         relocation.
3240 2005-01-27  Andrew Cagney  <cagney@gnu.org>
3242         * configure: Regenerate to track ../gettext.m4 change.
3244 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
3246         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3247         SymbianOS.
3249 2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
3251         2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
3252         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3253         for TLSMOFF.
3254         * reloc.c: Add R_FRV_TLSMOFF.
3255         * elf32-frv.c (elf32_frv_howto_table): Likewise.
3256         (frv_reloc_map, frv_reloc_type_lookup): Map it.
3257         (elf32_frv_relocate_section): Handle it.
3258         (elf32_frv_check_relocs): Likewise.
3259         * libbfd.h, bfd-in2.h: Rebuilt.
3260         2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
3261         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3262         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
3263         such that they return the constant in gr9.
3264         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3265         symbols.
3266         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3267         too, such that they shrink on relaxation.
3268         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3269         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3270         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3271         if we can guarantee the use of 16-bit constants.
3272         2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
3273         Introduce TLS support for FR-V FDPIC.
3274         * reloc.c: Add TLS relocations.
3275         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3276         (elf32_frv_rel_tlsdesc_value_howto): New.
3277         (elf32_frv_rel_tlsoff_howto): New.
3278         (frv_reloc_map): Add new mappings.
3279         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3280         reloc information.
3281         (frvfdpic_dynamic_got_plt_info): New.
3282         (frvfdpic_plt_tls_ret_offset): New.
3283         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3284         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
3285         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3286         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3287         section as local.
3288         (struct frvfdpic_relocs_info): Add TLS fields.
3289         (frvfdpic_relocs_info_hash): Warning clean up.
3290         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3291         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3292         (FRVFDPIC_TLS_BIAS): Define.
3293         (tls_biased_base): New.
3294         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3295         relocations.
3296         (frv_reloc_type_lookup): Likewise.
3297         (frvfdpic_info_to_howto_rel): Likewise.
3298         (elf32_frv_relocate_section): Likewise.
3299         (_frv_create_got_section): Create the PLT section here.
3300         (elf32_frvfdpic_create_dynamic_sections): Not here.
3301         (_frvfdpic_count_nontls_entries): Move out of...
3302         (_frvfdpic_count_got_plt_entries): ... here.
3303         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
3304         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
3305         support.
3306         (_frvfdpic_relax_tls_entries): New.
3307         (_frvfdpic_compute_got_alloc_data): Add TLS support.
3308         (_frvfdpic_get_tlsdesc_entry): New.
3309         (_frvfdpic_assign_got_entries): Add TLS support.
3310         (_frvfdpic_assign_plt_entries): Likewise.
3311         (_frvfdpic_reset_got_plt_entries): New.
3312         (_frvfdpic_size_got_plt): Move out of...
3313         (elf32_frvfdpic_size_dynamic_sections): ... here.
3314         (_frvfdpic_relax_got_plt_entries): New.
3315         (elf32_frvfdpic_relax_section): New.
3316         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3317         (elf32_frv_check_relocs): Add TLS support.
3318         (bfd_elf32_bfd_relax_section): Define for FDPIC.
3319         * libbfd.h, bfd-in2.h: Rebuilt.
3321 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3323         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3324         loadable reloc sections.
3325         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3326         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3328 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3330         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3331         sections immediately when linking shared libs.  Instead, wait until
3332         we know a lib is needed.
3333         (_bfd_elf_link_create_dynstrtab): Extract from..
3334         (_bfd_elf_link_create_dynamic_sections_): ..here.
3335         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3336         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
3337         for non-existent .dynamic.
3338         (elf_link_output_extsym): Don't complain about undefined symbols
3339         in as-needed dynamic libs that aren't actually linked.
3341 2005-01-24  Andrew Cagney  <cagney@gnu.org>
3343         * configure: Regenerate, ../gettext.m4 was updated.
3345 2005-01-21  Ben Elliston  <bje@au.ibm.com>
3347         * aout-encap.c: Remove unused file.
3349 2005-01-19  H.J. Lu  <hongjiu.lu@intel.com>
3351         PR 679
3352         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3353         non-function symbols are local.
3354         (_bfd_elf_symbol_refs_local_p): Likewise.
3356 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
3358         * bfd.c (bfd_link_just_syms): Add abfd param.
3359         * bfd-in2.h: Regenerate.
3361 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3363         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3364         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3365         instructions.  If the amount of padding is known, reduce the size
3366         of the CIE or FDE by that amount.
3368 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3370         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3371         augmentation_size.  Use bfd_signed_vmas for data_align.
3372         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3373         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3374         functions.  Don't read past the end of the enclosing CIE or FDE.
3375         (skip_bytes): New utility function.
3376         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3377         sanity checking.
3378         (_bfd_elf_write_section_eh_frame): Use new functions.
3380 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3382         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3383         assert-style REQUIRE() macro to handle sanity checks.
3385 2005-01-17  H.J. Lu  <hongjiu.lu@intel.com>
3387         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3388         (comp_unit): Here.
3389         (read_unsigned_leb128): Removed.
3390         (read_signed_leb128): Removed.
3391         (find_abstract_instance_name): Updated.
3392         (parse_comp_unit): Accept info_ptr_unit.
3393         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3394         comp unit and pass it to parse_comp_unit.
3396         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3397         (read_signed_leb128): Moved to ...
3398         * libbfd.c: Here.
3400         * libbfd-in.h (read_unsigned_leb128): New prototype.
3401         (read_signed_leb128): Likewise.
3402         * libbfd.h: Regenerated.
3404 2005-01-17  Andrew Stubbs  <andrew.stubbs@st.com>
3405             Nick Clifton   <nickc@redhat.com>
3407         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3408         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3409         arch_sh4a_nofpu_up in order to match the external names and make the
3410         testsuite's job easier.
3411         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3412         names.
3413         * bfd-in2.h: Regenerate.
3415 2005-01-15  Andrew Cagney  <cagney@gnu.org>
3417         * bfd.m4: New file.
3418         * acinclude.m4: Move BFD_NEED_DECLARATION,
3419         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3420         the new file bfd.m4.  Include ../bfd/bfd.m4.
3421         * configure: Re-generate.
3423 2005-01-12  Alan Modra  <amodra@bigpond.net.au>
3425         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3426         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3427         reaching PLT.
3428         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3429         R_PPC_RELAX32PC_PLT.
3431 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
3433         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3434         symbols.
3435         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3436         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3437         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3438         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3439         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3440         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3441         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3442         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3443         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3444         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3445         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3446         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3447         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3448         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3450 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
3452         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3453         .dynsbss flags.
3455 2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
3457         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3458         * bfd-in2.h:  Regenerate.
3459         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3460         to support these new machine values.
3461         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3462         the maxq10.
3463         (bfd_maxq_arch): Update values for the maxq20.
3465 2005-01-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
3467         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3468         non-shared object, do not reserve space in .plt and .rela.plt for
3469         regular symbols neither defined nor referenced in shared objects.
3471 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
3473         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3474         to zero the structure.
3475         (create_got_section): Use BFD_ASSERT instead of abort.
3476         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3477         'srelgot' fields.
3478         (create_got_section): New function.
3479         (sparc64_elf_create_dynamic_sections): Likewise.
3480         (sparc64_elf_check_relocs): Invoke create_got_section instead of
3481         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
3482         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3483         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3484         (sparc64_elf_finish_dynamic_symbol): Likewise.
3485         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3486         (elf_backend_create_dynamic_sections): Define to
3487         sparc64_elf_create_dynamic_sections.
3489 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
3491         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3492         (elf_backend_omit_section_dynsym): Define to it.
3493         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3494         (elf_backend_omit_section_dynsym): Define to it.
3496 2005-01-07  Jakub Jelinek  <jakub@redhat.com>
3498         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3499         PT_DYNAMIC segment, unless .dynamic.
3501 2005-01-06  Paul Brook  <paul@codesourcery.com>
3503         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3504         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3505         * configure: Regenerate.
3506         * elf32-arm.c: Add VxWorks target bfd.
3507         (USE_REL): Remove.
3508         (elf32_arm_link_hash_table): Add use_rel.
3509         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3510         elf32_arm_relocate_section): Replace USE_REL with runtime check.
3511         Correct offset calculation for RELA case.
3512         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3513         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3514         (elf32_arm_vxworks_link_hash_table_create): New function.
3515         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3516         (bfd_elf32_littlearm_vxworks_vec): Ditto.
3517         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3519 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
3521         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3522         multi_toc_needed.
3523         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3524         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3525         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3526         (ppc64_elf_next_toc_section): Heed no_multi_toc.
3527         (ppc64_elf_reinit_toc): Set multi_toc_needed.
3528         (toc_adjusting_stub_needed): Rewrite.
3529         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3530         toc tests.  Adjust for toc_adjusting_stub_needed changes.
3531         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3532         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3533         * section.c: Expand comment on backend bits.
3534         * bfd-in2.h: Regenerate.
3535         * libbfd.h: Regenerate.
3537 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
3539         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3540         toc adjusting stub, do not test source section flags.
3542 2005-01-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
3544         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3545         from STABS debugging sections again.
3547 2005-01-05  Fred Fish  <fnf@specifixinc.com>
3549         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3550         (find_abstract_instance_name): New function.
3551         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3552         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3553         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3555 2004-12-31  Paul Brook  <paul@copdesourcery.com>
3557         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3559 2004-12-31  Alan Modra  <amodra@bigpond.net.au>
3561         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3562         Commit missing changes from 2004-12-22.
3563         * bfd-in2.h: Regenerate.
3565 2004-12-23  Tomer Levi  <Tomer.Levi@nsc.com>
3567         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3569 2004-12-21  Kris Warkentin  <kewarken@qnx.com>
3571         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3572         Add 'base' argument for constructing register sections.  Reformat.
3573         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3574         gp and fp regs.  Reformat.
3576 2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
3578         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3579         * bfd-in2.h: Regenerate.
3580         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3581         (avr_reloc_map): Likewise.
3582         (avr_final_link_relocate): Likewise.
3584 2004-12-22  Alan Modra  <amodra@bigpond.net.au>
3586         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3587         as-needed dynamic libs as undefined.
3588         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3589         libs when finding they are needed.
3591 2004-12-20  Alan Modra  <amodra@bigpond.net.au>
3593         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3594         (opd_entry_value): Use opd_relocs if available.
3595         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
3596         copy .opd relocations to opd_relocs.
3597         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3599 2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
3601         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3602         * elf32-v850.c (v850_elf_howto_table): Add entry for
3603         R_V850_LO16_SPLIT_OFFSET.
3604         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3605         (v850_elf_perform_lo16_relocation): New function, extracted from...
3606         (v850_elf_perform_relocation): ...here.  Use it to handle
3607         R_V850_LO16_SPLIT_OFFSET.
3608         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3609         R_V850_LO16_SPLIT_OFFSET.
3610         * libbfd.h, bfd-in2.h: Regenerate.
3612 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
3614         * config.bfd: Add s390x-ibm-tpf support.
3616 2004-12-14  Tomer Levi  <Tomer.Levi@nsc.com>
3618         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3619         to prototype, to make hash info available.
3620         Prevent wrapped symbols from being adjusted twice.
3622 2004-12-14  Richard Sandiford  <rsandifo@redhat.com>
3624         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3625         overflow for calls to undefined weak symbols.
3627 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
3629         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3630         canonical sections syms have a name.
3632 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
3634         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3635         have been adjusted for output.
3636         (ppc64_elf_relocate_section): Mark sections with reloc_done.
3638 2004-12-10  Alan Modra  <amodra@bigpond.net.au>
3640         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3641         add symtab_hdr param.
3642         (group_signature): Update calls.
3643         * elf-bfd.h (bfd_elf_sym_name): Update.
3644         * elf32-ppc.c (ppc_elf_relocate_section): Update.
3645         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3646         (ppc64_elf_relocate_section): Update.
3647         * elflink.c (elf_link_input_bfd): Update.
3649 2004-12-10  Jakub Jelinek  <jakub@redhat.com>
3651         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3652         st_shndx on STT_SECTION sections.
3654 2004-12-09  Daniel Jacobowitz  <dan@codesourcery.com>
3656         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3657         ELF section symbols.
3659 2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
3661         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3662         return a real value, unless it is a PLT symbol.
3663         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3664         bal if possible.
3666         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3667         R_MIPS_JALR entry to 0.
3669         * archures.c: Define bfd_mach_mips9000.
3670         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3671         (mips_set_isa_flags): Handle bfd_mach_mips9000.
3672         * cpu-mips.c (I_mips9000): Define.
3673         (arch_info_struct): Add case for bfd_mach_mips9000.
3674         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3675         * bfd-in2.h: Regenerate.
3677 2004-12-08  Ian Lance Taylor  <ian@wasabisystems.com>
3679         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3680         overflow.
3682 2004-12-07  Ben Elliston  <bje@gnu.org>
3684         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3686 2004-12-06  Daniel Jacobowitz  <dan@debian.org>
3688         Suggested by Fergal Daly <fergal@esatclear.ie>:
3689         * simple.c (simple_dummy_multiple_definition): New function.
3690         (bfd_simple_get_relocated_section_contents): Use it.
3692 2004-12-03  Jan Beulich  <jbeulich@novell.com>
3694         * elf.c (elf_find_function): Don't use the last file symbol ever,
3695         seen, but the last one seen prior to the symbol being reported.
3696         Don't report a filename at all for global symbols when that might
3697         be ambiguous/wrong.
3699 2004-12-01  Paul Brook  <paul@codesourcery.com>
3701         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3702         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3703         version.
3705 2004-12-01  Paul Brook  <paul@codesourcery.com>
3707         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3708         sections undefined.
3710 2004-11-30  Paul Brook  <paul@codesourcery.com>
3712         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3713         no_pipeline_knowledge
3714         (elf32_arm_link_hash_table_create): Ditto.
3715         (bfd_elf32_arm_process_before_allocation): Ditto.
3716         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
3717         handling.
3718         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3719         prototype.
3720         * bfd-in2.h: Regenerate.
3722 2004-11-30  Randolph Chung  <tausq@debian.org>
3724         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3725         (elf32_hppa_grok_psinfo): New function.
3726         (elf_backend_grok_prstatus): Define.
3727         (elf_backend_grok_psinfo): Define.
3729 2004-11-24  H.J. Lu  <hongjiu.lu@intel.com>
3731         PR 574:
3732         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3734 2004-11-24  Paul Brook  <paul@codesourcery.com>
3736         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3738 2004-11-24  Paul Brook  <paul@codesourcery.com>
3740         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3741         (elf32_arm_swap_symbol_out): New function.
3742         (elf32_arm_size_info): Add.
3743         (elf_backend_size_info): Define.
3745 2004-11-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3747         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3748         make_bfd_asection.
3750 2004-11-19  Alan Modra  <amodra@bigpond.net.au>
3752         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3753         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3754         * nlmcode.h (nlm_write_object_contents): Warning fix.
3756 2004-11-18  Bob Wilson  <bob.wilson@acm.org>
3758         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3760 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
3762         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3763         (elf32_arm_plt_thumb_stub): New.
3764         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3765         and plt_got_offset.
3766         (elf32_arm_link_hash_traverse): Fix typo.
3767         (elf32_arm_link_hash_table): Add obfd.
3768         (elf32_arm_link_hash_newfunc): Initialize new fields.
3769         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3770         (elf32_arm_link_hash_table_create): Initialize obfd.
3771         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3772         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3773         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3774         interworking BFD is not dynamic.
3775         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
3776         not emit glue for PLT references.
3777         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
3778         emit glue for PLT references.  Support the Thumb PLT prefix.
3779         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3780         plt_thumb_refcount.
3781         (elf32_arm_check_relocs): Likewise.
3782         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3783         plt_thumb_refcount.
3784         (allocate_dynrelocs): Handle Thumb PLT references.
3785         (elf32_arm_finish_dynamic_symbol): Likewise.
3786         (elf32_arm_symbol_processing): New function.
3787         (elf_backend_symbol_processing): Define.
3789 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
3791         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3792         add_fde_encoding.  Remove need_relative.
3793         * elf-eh-frame.c (extra_augmentation_string_bytes)
3794         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3795         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3796         in cases where the CIE has no existing 'R' augmentation.  Use
3797         size_of_output_cie_fde when assigning offsets.  Use the final offset
3798         as the new section size.
3799         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3800         Account for any extra augmentation bytes in the returned offset.
3801         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3802         moved before being modified.  Pad growing entries with DW_CFA_nops.
3803         Add 'z' and 'R' augmentations as directed by add_augmentation_size
3804         and add_fde_encoding.
3806 2004-11-15  Mark Mitchell  <mark@codesourcery.com>
3808         * elf32-arm.c (elf32_arm_relocate_section): Use
3809         arm_real_reloc_type.
3811 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
3813         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3814         for discard relocations; don't add an R_MIPS_NONE to the main body
3815         of .rel.dyn.
3817 2004-11-04  Paul Brook  <paul@codesourcery.com>
3819         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3820         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3821         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
3822         default version definition for unversioned symbols.
3823         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3824         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3825         _bfd_elf_slurp_version_tables.  Set default version for unversioned
3826         imported symbols.
3828 2004-11-15  Paul Brook  <paul@codesourcery.com>
3830         * elflink.c (elf_link_add_object_symbols): Don't assume version
3831         indices are consecutive.
3833 2004-11-14  Richard Sandiford  <rsandifo@redhat.com>
3835         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3836         composite relocations against the personality data.
3838 2004-11-13  Paul Brook  <paul@codesourcery.com>
3840         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3841         R_ARM_PREL31 relocations to PLT entries.
3842         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3843         (elf32_arm_check_relocs): Ditto.
3845 2004-11-12  Bob Wilson  <bob.wilson@acm.org>
3847         * xtensa-isa.c (xtensa_interface_class_id): New.
3849 2004-11-11  Bob Wilson  <bob.wilson@acm.org>
3851         * elf32-xtensa.c (property_table_compare): Remove assertion about
3852         entries with the same address and non-zero size.
3853         (xtensa_read_table_entries): Report such entries as errors.
3855 2004-11-11  Mark Mitchell  <mark@codesourcery.com>
3857         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3858         R_ARM_RELATIVE on Symbian OS.
3860 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
3862         * som.c (som_bfd_print_private_bfd_data): New function.
3863         (som_object_setup): Save the auxiliary header.  Don't assume that
3864         zero is an invalid entry point for a shared library.
3865         (som_object_p): Allocate the auxiliary header on the heap.
3867         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3868         declaration.
3869         (elf32_arm_symbian_modify_segment_map): Likewise.
3871 2004-11-09  Daniel Jacobowitz  <dan@debian.org>
3873         From David Poole <daveml@mbuf.com>:
3874         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3875         (elf32_arm_size_dynamic_sections): Call it.
3877 2004-11-09  Alan Modra  <amodra@bigpond.net.au>
3879         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3880         (ALL_MACHINES_CFILES): Fix typo.
3881         * Makefile.in: Regenerate.
3882         * po/SRC-POTFILES.in: Regenerate.
3884 2004-11-08  Mark Mitchell  <mark@codesourcery.com>
3886         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3887         R_ARM_RELATIVE relocation for Symbian OS, mention the section
3888         symbol in the relocation.
3890 2004-11-08  Inderpreet Singh  <inderpreetb@nioda.hcltech.com>
3891             Vineet Sharma  <vineets@noida.hcltech.com>
3893         * coff-maxq.c: New File.
3894         * cpu-maxq.c: New File.
3895         * coffcode.h: Likewise.
3896         * config.bfd: Likewise.
3897         * configure.in (maxqcoff_vec): New target vector.
3898         * Makefile.am: Add support for maxq target.
3899         * configure.in: Likewise.
3900         * archures.c:. Likewise.
3901         * targets.c: Likewise.
3902         * bfd_in2.h : Regenerated.
3903         * Makefile.in: Regenerated.
3904         * configure: Regenerated.
3905         * doc/Makefile.in: Regenerated.
3907 2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3909         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3910         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3911         C_NT_WEAK aux entries.
3912         (_bfd_coff_generic_relocate_section): Handle undefined
3913         aliases.
3915 2004-11-07  Andreas Schwab  <schwab@suse.de>
3917         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3918         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3919         non-default visibility.
3921 2004-11-01  Mark Mitchell  <mark@codesourcery.com>
3923         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3924         D_PAGED.
3925         (elf32_arm_symbian_modify_segment_map): Don't
3926         reset includes_filehdr and includes_phdrs here.
3928 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
3930         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3931         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
3932         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
3933         dependency.
3934         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3935         to a new removed list.  Remove normal configuration stanzas.
3936         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3937         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3938         elfarm-nabi.lo with elf32-arm.lo.
3939         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3940         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
3941         * elf32-arm.h: Remove.
3942         * elfarm-oabi.c: Remove.
3943         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3944         and bfd_elf32_littlearm_oabi_vec.
3945         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3947 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
3949         * config.bfd: Support crisv32-*-* like cris-*-*.
3950         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3951         (bfd_mach_cris_v10_v32): New macros.
3952         * cpu-cris.c: Tweak formatting.
3953         (get_compatible): New function.
3954         (N): New macro.
3955         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3956         bfd_arch_info_type:s.
3957         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3958         get_compatible for member compatible and link bfd_cris_arch_v32 as
3959         next.
3960         * elf32-cris.c (cris_elf_pcrel_reloc)
3961         (cris_elf_set_mach_from_flags): New functions.
3962         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3963         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3964         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3965         numbers for bfd_mach_cris_v32.
3966         (PLT_ENTRY_SIZE_V32): New macro.
3967         (elf_cris_plt0_entry): Drop last comma in initializer.
3968         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3969         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3970         PLT initializers.
3971         (cris_elf_relocate_section): Change all "%B(%A)" messages to
3972         "%B, section %A".
3973         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3974         (elf_cris_finish_dynamic_sections): Similar.
3975         (elf_cris_adjust_dynamic_symbol): Similar.
3976         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3977         section %A".
3978         <switch with PIC relocs>: Emit error and return FALSE for
3979         bfd_mach_cris_v10_v32.
3980         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3981         Emit warning when generating textrel reloc.
3982         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3983         (cris_elf_final_write_processing): Set flags according to mach.
3984         (cris_elf_print_private_bfd_data): Display
3985         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3986         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3987         new_flags.  Don't call cris_elf_final_write_processing.  Don't
3988         look at the actual elf header flags at all; use
3989         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
3990         in bfd_get_mach for ibfd and obfd and handle merging of compatible
3991         objects.
3992         (bfd_elf32_bfd_copy_private_bfd_data): Define.
3993         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3994         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3995         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3996         * bfd-in2.h, libbfd.h: Regenerate.
3998 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
4000         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4001         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4002         comment.
4003         (struct adjust_toc_info): New.
4004         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4006 2004-11-03  Bob Wilson  <bob.wilson@acm.org>
4008         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4009         if there are no segments.
4011 2004-11-02  Daniel Jacobowitz  <dan@debian.org>
4013         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4015 2004-11-02  Nick Clifton  <nickc@redhat.com>
4017         * elf32-iq2000.c: Convert to ISO C90 formatting.
4019 2004-11-02  Hans-Peter Nilsson  <hp@axis.com>
4021         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4023 2004-10-28  H.J. Lu  <hongjiu.lu@intel.com>
4025         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4026         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4027         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4029 2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4031         * elf32-sh.c (tpoff): Take alignment into account.
4033 2004-10-28  Nick Clifton  <nickc@redhat.com>
4035         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4036         performing a relocatable link.
4037         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
4038         for MIPS ports under Irix.
4040 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
4042         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4043         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4044         (elf32_arm_final_link_relocate): Ditto.
4045         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4046         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4047         (elf32_arm_adjust_dynamic_symbol): Ditto.
4048         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4049         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4050         (elf32_arm_r_howto): ... To here.
4051         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4053 2004-10-26  H.J. Lu  <hongjiu.lu@intel.com>
4055         PR 475
4056         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4057         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4058         and R_IA64_SECREL64LSB.
4060 2004-10-26  Paul Brook  <paul@codesourcery.com>
4062         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4063         (bfd_elf_size_dynamic_sections): Create default version definition.
4064         (elf_link_output_extsym): Adjust for default symbol version.
4066 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4068         * mmo.c: Adjust to ISO C.
4070         * mmo.c (mmo_write_section_description): New function broken out
4071         of mmo_internal_write_section.
4072         (mmo_internal_write_section): For each of .text and .data, call
4073         mmo_write_section_description before outputting contents if it has
4074         nontrivially deducible vma or contents.
4075         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4076         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4077         symbols if found within the .data address range.
4079 2004-10-24  Daniel Jacobowitz  <dan@debian.org>
4081         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4083 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4085         * mmo.c (File Layout): Correct place of misplaced blurb about
4086         special data.
4088 2004-10-22  Mark Kettenis  <kettenis@gnu.org>
4090         * config.bfd: Add mips64*-*-openbsd.
4092 2004-10-21  Bob Wilson  <bob.wilson@acm.org>
4094         * elf32-xtensa.c (ebb_propose_action): Put declarations before
4095         statements.
4097 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4099         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4100         * configure: Regenerate.
4102 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4104         PR 463
4105         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4106         to linker reloc_overflow callback.
4107         (aout_link_input_section_ext): Likewise.
4108         (aout_link_reloc_link_order): Likewise.
4109         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4110         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4111         Likewise.
4112         (alpha_relocate_section): Likewise.
4113         * coff-arm.c (coff_arm_relocate_section): Likewise.
4114         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4115         * coff-h8500.c (extra_case): Likewise.
4116         * coff-i960.c (coff_i960_relocate_section): Likewise.
4117         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4118         * coff-mips.c (mips_relocate_section): Likewise.
4119         * coff-or32.c (coff_or32_relocate_section): Likewise.
4120         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4121         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4122         * coff-sh.c (sh_relocate_section): Likewise.
4123         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4124         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4125         * coff-z8k.c (extra_case): Likewise.
4126         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4127         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4128         (_bfd_coff_generic_relocate_section): Likewise.
4129         * ecoff.c (ecoff_reloc_link_order): Likewise.
4130         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4131         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4132         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4133         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4134         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4135         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4136         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4137         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4138         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4139         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4140         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4141         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4142         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4143         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4144         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4145         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4146         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4147         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4148         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4149         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4150         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4151         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4152         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4153         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4154         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4155         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4156         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4157         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4158         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4159         * elf32-vax.c (elf_vax_relocate_section): Likewise.
4160         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4161         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4162         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4163         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4164         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4165         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4166         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4167         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4168         * elflink.c (elf_reloc_link_order): Likewise.
4169         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4170         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4171         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4172         * linker.c (_bfd_generic_reloc_link_order): Likewise.
4173         * pdp11.c (pdp11_aout_link_input_section): Likewise.
4174         (aout_link_reloc_link_order): Likewise.
4175         * reloc.c (bfd_generic_get_relocated_section_contents):
4176         Likewise.
4177         * xcofflink.c (xcoff_reloc_link_order): Likewise.
4178         * simple.c (simple_dummy_reloc_overflow): Updated.
4180 2004-10-20  Andreas Schwab  <schwab@suse.de>
4182         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4183         (elf_backend_plt_sym_val): Define.
4185 2004-10-19  Danny Smith  <dannysmith@users.sourceforege.net>
4187         * config.bfd: Set targ_underscore=yes for PE COFF targets
4189 2004-10-19  Alan Modra  <amodra@bigpond.net.au>
4191         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4192         (ppc64_elf_edit_opd): Likewise.
4194 2004-10-18  Mark Mitchell  <mark@codesourcery.com>
4196         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4197         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4198         set SEC_ALLOC and SEC_LOAD.
4200 2004-10-18  Nick Clifton  <nickc@redhat.com>
4202         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4203         'name' for relocs against both local and global symbols.
4205 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
4207         * bfd-in2.h: Regenerate.
4208         * bfd.c (struct bfd): Add no_export.
4209         * elflink.c (elf_link_add_object_symbols): Handle no_export.
4211 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4213         * config.bfd: Whitespace cleanup.
4214         * Makefile.am: Run "make dep-am"
4215         * Makefile.in: Regenerate.
4217 2004-10-15  Jakub Jelinek  <jakub@redhat.com>
4219         * elflink.c (struct already_linked_section): Removed.
4220         (try_match_symbols_in_sections, already_linked): Removed.
4221         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4222         prefix of section names when finding already_linked_table
4223         chain.  Compare section names.  Instead of calling already_linked,
4224         do it inline and only for sections in the same already_linked_list.
4226 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4228         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4229         parameter.  If called after _bfd_elf_write_section_eh_frame,
4230         don't allow a -2 return unless need_* bit is already set, and
4231         handle offsets adjusted for output_offset.
4232         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4233         * elf.c (_bfd_elf_section_offset): Update call.
4235 2004-10-13  H.J. Lu  <hongjiu.lu@intel.com>
4237         PR 440
4238         * coffcode.h (coff_compute_section_file_positions): Cast to
4239         bfd_vma when computing page alignment.
4241 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
4243         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4244         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4246 2004-10-12  Mark Mitchell  <mark@codesourcery.com>
4248         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4249         relocations use a virtual address, not a section offset.
4251 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4253         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4254         (narrow_instruction, widen_instruction): Remove unnecessary calls to
4255         xtensa_format_encode.
4256         (ebb_propose_action): Inline call to ebb_add_proposed_action.
4257         (ebb_add_proposed_action): Delete.
4259 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4261         * elf32-xtensa.c: Use ISO C90 formatting.
4263 2004-10-12  Paul Brook  <paul@codesourcery.com>
4265         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4266         message.
4268 2004-10-12  Paul Brook  <paul@codesourcery.com>
4270         * elf32-arm.h: Support EABI version 4 objects.
4272 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4274         PR 325
4275         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4276         Don't mark as default.
4277         (bfd_x86_64_arch): Don't mark as default.
4279 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4281         * elflink.c (enum action_discarded): New.
4282         (elf_section_complain_discarded): Delete.
4283         (elf_action_discarded): New function subsuming the above and also
4284         controlling reloc behaviour.
4285         (elf_link_input_bfd): Use it.
4287 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
4289         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4290         (special_sections): Add .gnu.liblist and .gnu.conflict.
4291         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4293 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4295         PR 233
4296         * elflink.c (elf_link_input_bfd): Try harder to support
4297         relocations against symbols in removed linkonce sections.
4299 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4301         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4303         PR 354
4304         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4305         sections do not reference symbols in non-SEC_ALLOC sections.
4307 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4309         PR 437
4310         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4311         (_bfd_elf_link_omit_section_dynsym): Formatting.
4313 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4315         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4316         * libbfd.h: Regnerate.
4317         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4318         * elf32-frv.c: Likewise.
4319         * elf32-m32r.c: Likewise.
4320         * elf32-ppc.c: Likewise.
4321         * elf64-hppa.c: Likewise.
4322         * elfxx-ia64.c: Likewise.
4323         * opncls.c: Likewise.
4325 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4327         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4328         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4329         offsets stored in struct eh_cie_fde entries before doing other
4330         work.
4332         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4333         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4334         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4335         setting offsets for removed CIEs.  Don't set "sec", instead set
4336         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
4337         CIE in hdr_info.  Only set make_relative and make_lsda_relative
4338         for CIEs.  Use pointers rather than array indices.
4339         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4340         make_lsda_relative, need_* on cie_inf for FDEs.
4341         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4342         section output_offset.  Delete cie_offset, instead use cie_inf
4343         pointer to CIE entry.  Use need_relative and need_lsda_relative on
4344         CIE entry for FDEs.  Use pointers rather than array indices.
4346 2004-10-09  Alan Modra  <amodra@bigpond.net.au>
4348         * coff-rs6000.c (rs6000coff_vec): Add initializer for
4349         bfd_is_target_special_symbol.
4350         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4351         * som.c (som_bfd_is_target_special_symbol): Define.
4353 2004-10-08  Nick Clifton  <nickc@redhat.com>
4355         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4356         * configure: Regenerate.
4357         * bfd-in2.h: Regenerate.
4358         * syms.c (bfd_is_target_special_symbol): New interface function.
4359         Returns true when a symbol should be considered to be special.
4360         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4361         the symbol jump table.
4362         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4363         Return true iff the symbol is a mapping symbol.
4364         (bfd_elf32_bfd_is_target_special_symbol): Define.
4365         * elfxx-target.h: Provide a default definition for
4366         bfd_is_target_special_symbol.
4367         * aout-target.h: Likewise.
4368         * aout-tic30.c: Likewise.
4369         * binary.c: Likewise.
4370         * coffcode.h: Likewise.
4371         * i386msdos.c: Likewise.
4372         * ieee.c: Likewise.
4373         * ihex.c: Likewise.
4374         * libaout.h: Likewise.
4375         * libbfd-in.h: Likewise
4376         * libecoff.h: Likewise.
4377         * mach-o.c: Likewise.
4378         * mmo.c: Likewise.
4379         * nlm-target.h: Likewise.
4380         * oasys.c: Likewise.
4381         * pef.c: Likewise.
4382         * ppcboot.c: Likewise.
4383         * srec.c: Likewise.
4384         * tekhex.c: Likewise.
4385         * versados.c: Likewise.
4386         * vms.c: Likewise.
4387         * xcoff-target.h: Likewise.
4388         * xsym.c: Likewise.
4389         * libbfd.h: Regenerate.
4391 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
4393         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4394         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4395         (elf_backend_section_from_shdr): Define.
4397 2004-10-08  Alan Modra  <amodra@bigpond.net.au>
4399         * syms.c (bfd_is_local_label): Return false for file symbols.
4401 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
4402             David Heine  <dlheine@tensilica.com>
4404         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4405         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4406         (elf32xtensa_no_literal_movement): New global variable.
4407         (elf_howto_table): Add entries for new relocations.
4408         (elf_xtensa_reloc_type_lookup): Handle new relocations.
4409         (property_table_compare): When addresses are equal, compare sizes and
4410         various property flags.
4411         (property_table_matches): New.
4412         (xtensa_read_table_entries): Extend to read new property tables.  Add
4413         output_addr parameter to indicate that output addresses should be used.
4414         Use bfd_get_section_limit.
4415         (elf_xtensa_find_property_entry): New.
4416         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4417         (elf_xtensa_check_relocs): Handle new relocations.
4418         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
4419         relocations.  Use new xtensa-isa.h functions.
4420         (build_encoding_error_message): Remove encode_result parameter.  Add
4421         new target_address parameter used to detect alignment errors.
4422         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
4423         error handling.  Use new is_operand_relocation function.
4424         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4425         Use underbar macro for error messages.  Formatting.
4426         (get_const16_opcode): New.
4427         (get_l32r_opcode): Add a separate flag for initialization.
4428         (get_relocation_opnd): Operand number is no longer explicit in the
4429         relocation.  Change to decode the opcode and analyze its operands.
4430         (get_relocation_slot): New.
4431         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
4432         Use new xtensa-isa.h functions to handle multislot instructions.
4433         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
4434         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4435         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4436         check_loop_aligned, check_branch_target_aligned_address, narrowable,
4437         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4438         get_single_format, init_op_single_format_table): New.
4439         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4440         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
4441         (contract_asm_expansion): Add error_message parameter and pass it to
4442         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
4443         with R_XTENSA_SLOT0_OP.
4444         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4445         instructions.  Use new xtensa-isa.h functions.
4446         (r_reloc struct): Add new virtual_offset field.
4447         (r_reloc_init): Add contents and content_length parameters.  Set
4448         virtual_offset field to zero.  Add contents to target_offset field for
4449         partial_inplace relocations.
4450         (r_reloc_is_defined): Check for null.
4451         (print_r_reloc): New debug function.
4452         (source_reloc struct): Replace xtensa_operand field with pair of the
4453         opcode and the operand position.  Add is_abs_literal field.
4454         (init_source_reloc): Specify operand by opcode/position pair.  Set
4455         is_abs_literal field.
4456         (source_reloc_compare): When target_offsets are equal, compare other
4457         fields to make sorting predictable.
4458         (literal_value struct): Add is_abs_literal field.
4459         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4460         (init_literal_value): New.
4461         (is_same_value): Replace with ...
4462         (literal_value_equal): ... this function.  Add comparisons of
4463         virtual_offset and is_abs_literal fields.
4464         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
4465         failure.  Initialize has_last_loc field.
4466         (value_map_hash_table_delete): New.
4467         (hash_literal_value): Rename to ...
4468         (literal_value_hash): ... this.  Include is_abs_literal flag and
4469         virtual_offset field in the hash value.
4470         (get_cached_value): Rename to ...
4471         (value_map_get_cached_value): ... this.  Update calls to
4472         literal_value_hash and literal_value_equal.
4473         (add_value_map): Check for allocation failure.  Update calls to
4474         value_map_get_cached_value and literal_value_hash.
4475         (text_action, text_action_list, text_action_t): New types.
4476         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4477         text_action_add, text_action_add_literal, offset_with_removed_text,
4478         offset_with_removed_text_before_fill, find_insn_action,
4479         print_action_list, print_removed_literals): New.
4480         (offset_with_removed_literals): Delete.
4481         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4482         fix_array, fix_array_count, allocated_relocs, relocs_count, and
4483         allocated_relocs_count fields.
4484         (init_xtensa_relax_info): Initialize new fields.
4485         (reloc_bfd_fix struct): Add new translated field.
4486         (reloc_bfd_fix_init): Add translated parameter and use it to set the
4487         translated field.
4488         (fix_compare, cache_fix_array): New.
4489         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4490         section via get_xtensa_relax_info.  Use cache_fix_array to set up
4491         sorted fix_array and use bsearch instead of linear search.
4492         (section_cache_t): New struct.
4493         (init_section_cache, section_cache_section, clear_section_cache): New.
4494         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4495         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4496         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4497         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4498         New.
4499         (retrieve_contents): Use bfd_get_section_limit.
4500         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
4501         to compute_removed_literals.  Free value_map_hash_table when no longer
4502         needed.
4503         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
4504         compute_text_actions for all sections.
4505         (find_relaxable_sections): Mark sections as relaxable if they contain
4506         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
4507         call.  Increment relax_info src_count field only for appropriate
4508         relocation types.  Remove is_literal_section check.
4509         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
4510         r_reloc_init and find_associated_l32r_irel.  Check
4511         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
4512         literals.  Pass is_abs_literal flag to init_source_reloc.
4513         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
4514         CONST16 instructions.  Adjust calls to r_reloc_init and
4515         pcrel_reloc_fits.  Handle weak symbols conservatively.
4516         (find_associated_l32r_irel): Add bfd parameter and pass it to
4517         is_l32r_relocation.
4518         (compute_text_actions, compute_ebb_proposed_actions,
4519         compute_ebb_actions, check_section_ebb_pcrels_fit,
4520         check_section_ebb_reduces, text_action_add_proposed,
4521         compute_fill_extra_space): New.
4522         (remove_literals): Replace with ...
4523         (compute_removed_literals): ... this function.  Call
4524         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
4525         Call xtensa_read_table_entries to get the property table.  Skip
4526         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
4527         is_removable_literal, remove_dead_literal, and
4528         identify_literal_placement functions.
4529         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4530         instead of linear search.
4531         (is_removable_literal, remove_dead_literal,
4532         identify_literal_placement): New.
4533         (relocations_reach): Update check for literal not referenced by any
4534         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
4535         (coalesce_shared_literal, move_shared_literal): New.
4536         (relax_section): Use bfd_get_section_limit.  Call
4537         translate_section_fixes.  Update calls to r_reloc_init and
4538         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
4539         Add call to pin_internal_relocs.  Add special handling for
4540         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
4541         info to calculate new addend_displacement variable.  Replace code for
4542         deleting literals with more general code to perform the actions
4543         determined by the action_list for the section.
4544         (translate_section_fixes, translate_reloc_bfd_fix): New.
4545         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
4546         find_removed_literal only if is_operand_relocation.  Update call to
4547         offset_with_removed_text.  Use new target_offset and removed_bytes
4548         variables.
4549         (move_literal): New.
4550         (relax_property_section):  Use bfd_get_section_limit.  Set new
4551         is_full_prop_section flag and handle new property tables.  Update calls
4552         to r_reloc_init and offset_with_removed_text.  Check
4553         is_relaxable_asm_section flag.  Handle expansion of zero-sized
4554         unreachable entries, with use of offset_with_removed_text_before_fill.
4555         For relocatable links, combine entries only for literal tables.
4556         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
4557         calls to offset_with_removed_text.  Translate st_size field for
4558         function symbols.
4559         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4560         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
4561         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
4562         R_XTENSA_ASM_EXPAND relocs.
4563         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
4564         call to get_bfd_fix.  Include offset from contents for partial_inplace
4565         relocations.
4566         (is_reloc_sym_weak): New.
4567         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4568         (prop_sec_len): New.
4569         (xtensa_is_property_section): Handle new property sections.
4570         (is_literal_section): Delete.
4571         (internal_reloc_compare): When r_offset matches, compare r_info and
4572         r_addend to make sorting predictable.
4573         (internal_reloc_matches): New.
4574         (xtensa_get_property_section_name): Handle new property sections.
4575         (xtensa_get_property_predef_flags): New.
4576         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4577         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4578         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4579         (xtisa_errno, xtisa_error_msg): New variables.
4580         (xtensa_isa_errno, xtensa_isa_error_msg): New.
4581         (xtensa_insnbuf_alloc): Add error handling.
4582         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
4583         use xtensa_format_decode.  Add error handling.
4584         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
4585         instruction length to find the number of bytes to copy.
4586         (xtensa_isa_init): Add error handling.  Replace calls to
4587         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4588         tables in the xtensa_modules structure.
4589         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4590         xtensa_extend_isa): Delete.
4591         (xtensa_isa_free): Change to only free lookup tables.
4592         (opname_lookup_compare): Replace with ...
4593         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
4594         (xtensa_insn_maxlength): Rename to ...
4595         (xtensa_isa_maxlength): ... this.
4596         (xtensa_insn_length): Delete.
4597         (xtensa_insn_length_from_first_byte): Replace with ...
4598         (xtensa_isa_length_from_chars): ... this function.
4599         (xtensa_num_opcodes): Rename to ...
4600         (xtensa_isa_num_opcodes): ... this.
4601         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4602         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4603         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4604         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4605         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4606         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4607         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4608         (xtensa_opcode_lookup): Add error handling.
4609         (xtensa_decode_insn): Replace with ...
4610         (xtensa_opcode_decode): ... this function, with new format and
4611         slot parameters.  Add error handling.
4612         (xtensa_encode_insn): Replace with ...
4613         (xtensa_opcode_encode): ... this function, which does the encoding via
4614         one of the entries in the "encode_fns" array.  Add error handling.
4615         (xtensa_opcode_name): Add error handling.
4616         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4617         xtensa_opcode_is_call): New.
4618         (xtensa_num_operands): Replace with ...
4619         (xtensa_opcode_num_operands): ... this function.  Add error handling.
4620         (xtensa_opcode_num_stateOperands,
4621         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4622         xtensa_opcode_funcUnit_use, xtensa_operand_name,
4623         xtensa_operand_is_visible): New.
4624         (xtensa_get_operand, xtensa_operand_kind): Delete.
4625         (xtensa_operand_inout): Add error handling and special-case for
4626         "sout" operands.
4627         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4628         operate on one slot of an instruction.  Added error handling.
4629         (xtensa_operand_encode): Handle default operands with no encoding
4630         functions.  Check for success by comparing against decoded value.
4631         Add error handling.
4632         (xtensa_operand_decode): Handle default operands.  Return decoded value
4633         through argument pointer.  Add error handling.
4634         (xtensa_operand_is_register, xtensa_operand_regfile,
4635         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4636         (xtensa_operand_isPCRelative): Rename to ...
4637         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
4638         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4639         through argument pointer.  Add error handling.
4640         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4641         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4642         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4643         xtensa_regfile_shortname, xtensa_regfile_view_parent,
4644         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4645         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4646         xtensa_state_is_exported, xtensa_sysreg_lookup,
4647         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4648         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4649         xtensa_interface_num_bits, xtensa_interface_inout,
4650         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4651         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4652         * xtensa-modules.c: Rewrite to use new data structures.
4653         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4654         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4655         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4656         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4657         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4658         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4659         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4660         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4661         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4662         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4663         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4664         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4665         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4666         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4667         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4668         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4669         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4670         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4671         * Makefile.in: Regenerate.
4672         * bfd-in2.h: Likewise.
4673         * libbfd.h: Likewise.
4675 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
4677         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4678         against the absolute section.
4679         (mips_elf64_write_rela): Likewise.
4681 2004-10-07  Jan Beulich <jbeulich@novell.com>
4683         * elf.c (elf_find_function): Don't generally check for matching
4684         section, just for non-file symbols.  Remove redunant comparison
4685         for the latter.
4686         * elf32-arm.h (arm_elf_find_function): Likewise.
4688 2004-10-07  Jeff Baker  <jbaker@qnx.com>
4690         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4691         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4692         was specified.
4694 2004-10-04  Roland McGrath  <roland@redhat.com>
4696         * hash.c (bfd_hash_set_default_size): Use const for table.
4697         Use size_t instead of int for variable compared to sizeof results.
4699 2004-10-05  Alan Modra  <amodra@bigpond.net.au>
4701         PR 425
4702         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4704 2004-10-01  Paul Brook  <paul@codesourcery.com>
4706         * elf32-arm.h (elf32_arm_fake_sections,
4707         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4708         functions.
4709         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4711 2004-10-01  Alan Modra  <amodra@bigpond.net.au>
4713         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4714         need_lsda_relative.
4715         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4716         need_relative or need_lsda_relative if we are processing an
4717         offset for a reloc on a FDE initial loc or LSDA field
4718         respectively.
4719         (_bfd_elf_write_section_eh_frame): Test need_relative and
4720         need_lsda_relative in place of corresponding make_* field
4721         when deciding to use pc-relative encodings.
4723 2004-09-30  Paul Brook  <paul@codesourcery.com>
4725         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4726         target2 relocation type.
4728 2004-09-30  H.J. Lu  <hongjiu.lu@intel.com>
4730         PR 414
4731         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4733 2004-09-30  Paul Brook  <paul@codesourcery.com>
4735         * reloc.c: Add BFD_RELOC_ARM_SMI.
4736         * bfd-in2.h: Regenerate.
4737         * libbfd.h: Ditto.
4739 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
4741         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4742         vma and output offset to address.
4743         * simple.c (simple_save_output_info): Only set output section
4744         and offset for debug sections, or those not already set up by
4745         the linker.
4746         (bfd_simple_get_relocated_section_contents): Update comment.
4748 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
4750         * elf.c (IS_LOADED): Delete.
4751         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4752         Restore SEC_HAS_CONTENTS test to the one place it was used prior
4753         to 2004-09-22.
4755 2004-09-23  Alan Modra  <amodra@bigpond.net.au>
4757         PR gas/396
4758         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4759         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
4760         redundant assignment of EM_SPARC.
4762 2004-09-22  Brian Ford  <ford@vss.fsi.com>
4764         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4765         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4766         constants.
4767         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4769 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
4771         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4772         (elf_backend_modify_segment_map): Don't define.
4774 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
4776         * elf.c (IS_LOADED): Define.
4777         (assign_file_positions_for_segments): Don't round up file offset of
4778         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4779         Delete code handling link script adjustment of lma.  Do the adjust
4780         in later code handling similar ajustments.  Remove dead code error
4781         check.  Warn if section lma would require a negative offset
4782         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
4783         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
4784         update voff in section loop.  Change voff in segment loop to be an
4785         adjustment on top of "off".  Set sec->filepos and update "off" later.
4786         Test for loadable sections consistently using IS_LOADED.  Similarly,
4787         test for alloc-only sections other than .tbss consistently.
4788         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
4789         Tidy PT_NOTE handling.  Use %B and %A in error messages.
4790         (assign_file_positions_except_relocs): Use %B in error message.
4792 2004-09-17  H.J. Lu  <hongjiu.lu@intel.com>
4794         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4795         (CONFIG_STATUS_DEPENDENCIES): New.
4796         (Makefile): Removed.
4797         (config.status): Likewise.
4798         * Makefile.in: Regenerated.
4800 2004-09-17  Paul Brook  <paul@codesourcery.com>
4802         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4803         (bfd_elf32_arm_process_before_allocation): Update prototype.
4804         * bfd-in2.h: Regenerate.
4805         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4806         (elf32_arm_link_hash_table_create): Set it.
4807         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4808         (bfd_elf32_arm_set_target_relocs): New function.
4809         (arm_real_reloc_type): New function.
4810         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
4811         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
4812         (elf32_arm_gc_sweep_hook): Ditto.
4813         (elf32_arm_check_relocs): Ditto.
4814         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4815         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4816         R_ARM_GOT_TARGET2.
4817         (elf32_arm_got_prel): New variable.
4818         (elf32_arm_howto_from_type): New function.
4819         (elf32_arm_info_to_howto): Use it.
4820         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4821         BFD_RELOC_ARM_TARGET2.
4822         * libbfd.h: Regenerate.
4823         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4825 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
4827         * ecoff.c: Update u.undef.next refs.
4828         * elf64-ppc.c: Likewise.
4829         * elflink.c: Likewise.
4830         * linker.c: Likewise.
4831         * xcofflink.c: Likewise.
4833         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
4834         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
4835         fields to indirect struct.
4836         * elf-m10300.c: Update u.weakdef refs.
4837         * elf32-arm.h: Likewise.
4838         * elf32-cris.c: Likewise.
4839         * elf32-frv.c: Likewise.
4840         * elf32-hppa.c: Likewise.
4841         * elf32-i370.c: Likewise.
4842         * elf32-i386.c: Likewise.
4843         * elf32-m32r.c: Likewise.
4844         * elf32-m68k.c: Likewise.
4845         * elf32-ppc.c: Likewise.
4846         * elf32-s390.c: Likewise.
4847         * elf32-sh.c: Likewise.
4848         * elf32-sparc.c: Likewise.
4849         * elf32-vax.c: Likewise.
4850         * elf32-xtensa.c: Likewise.
4851         * elf64-alpha.c: Likewise.
4852         * elf64-hppa.c: Likewise.
4853         * elf64-ppc.c: Likewise.
4854         * elf64-s390.c: Likewise.
4855         * elf64-sh64.c: Likewise.
4856         * elf64-sparc.c: Likewise.
4857         * elf64-x86-64.c: Likewise.
4858         * elfxx-ia64.c: Likewise.
4859         * elfxx-mips.c: Likewise.
4860         * elflink.c: Likewise.  Also u.elf_hash_value.
4861         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4862         indirection.
4863         (elf_gc_smash_unused_vtentry_relocs): Likewise.
4864         (bfd_elf_gc_record_vtinherit): Alloc vtable.
4865         (bfd_elf_gc_record_vtentry): Likewise.
4866         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4868 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
4870         * Makefile.am: Run "make dep-am".
4871         * Makefile.in: Regenerate.
4872         * bfd-in2.h: Regenerate.
4873         * po/SRC-POTFILES.in: Regenerate.
4874         * po/bfd.pot: Regenerate.
4876 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
4878         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4879         with bitfields.  Make "type" and "other" bitfields too.
4880         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4881         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4882         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4883         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4884         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4885         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4886         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4887         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4888         * elf-hppa.h: Update all uses of elf_link_hash_flags.
4889         * elf-m10300.c: Likewise.
4890         * elf.c: Likewise.
4891         * elf32-arm.h: Likewise.
4892         * elf32-cris.c: Likewise.
4893         * elf32-frv.c: Likewise.
4894         * elf32-hppa.c: Likewise.
4895         * elf32-i370.c: Likewise.
4896         * elf32-i386.c: Likewise.
4897         * elf32-m32r.c: Likewise.
4898         * elf32-m68k.c: Likewise.
4899         * elf32-ppc.c: Likewise.
4900         * elf32-s390.c: Likewise.
4901         * elf32-sh-symbian.c: Likewise.
4902         * elf32-sh.c: Likewise.
4903         * elf32-sh64.c: Likewise.
4904         * elf32-sparc.c: Likewise.
4905         * elf32-vax.c: Likewise.
4906         * elf32-xtensa.c: Likewise.
4907         * elf64-alpha.c: Likewise.
4908         * elf64-hppa.c: Likewise.
4909         * elf64-ppc.c: Likewise.
4910         * elf64-s390.c: Likewise.
4911         * elf64-sh64.c: Likewise.
4912         * elf64-sparc.c: Likewise.
4913         * elf64-x86-64.c: Likewise.
4914         * elflink.c: Likewise.
4915         * elfxx-ia64.c: Likewise.
4916         * elfxx-mips.c: Likewise.
4917         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4918         * configure: Regenerate.
4919         * aclocal.m4: Regenerate.
4921 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
4923         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4924         around uses of R_ARM_TARGET1.
4925         (elf32_arm_check_relocs): Likewise.
4927 2004-09-13  Paul Brook  <paul@codesourcery.com>
4929         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4930         prototype.
4931         * bfd-in2.h: Regenerate.
4932         * libbfd.h: Regenerate.
4933         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4934         (elf32_arm_link_hash_table_create): Set target1_is_rel.
4935         (bfd_elf32_arm_process_before_allocation): Ditto.
4936         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4937         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4938         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4939         * reloc.c: Ditto.
4941 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
4943         * hpux-core.c (thread_section_p): New function.
4944         (hpux_core_core_file_p): Fix computation of offset in call
4945         to bfd_seek. Create a ".reg" section from an arbitrary
4946         ".reg/<id>" section if none was created after having read
4947         all sections.
4949 2004-09-11  Andreas Schwab  <schwab@suse.de>
4951         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4952         * aclocal.m4: Rebuild.
4953         * configure: Rebuild.
4955 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
4957         * section.c (bfd_sections_find_if): Fix parameter name in
4958         comment to match code.
4960 2004-09-10  Alan Modra  <amodra@bigpond.net.au>
4962         * elf.c  (assign_file_positions_except_relocs): Assign relocs
4963         stored in a bfd section.
4965 2004-09-08  Hans-Peter Nilsson  <hp@axis.com>
4967         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4968         h->gotplt_refcount to 0, not -1.
4970 2004-09-07  Hans-Peter Nilsson  <hp@axis.com>
4972         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4973         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4974         symname.
4975         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4976         handle symbol visibility here.
4978 2004-09-07  Alan Modra  <amodra@bigpond.net.au>
4980         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4981         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
4982         callers.
4983         (ppc_stub_name): Remove trailing "+0" on stub name.
4984         (create_linkage_sections): Create relocations for
4985         branch lookup table when --emit-relocs as well as when --shared.
4986         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
4987         relbrlt test.  For --emit-stub-syms, always output a sym even when
4988         one already exists on a plt call stub.  Put stub type in the stub
4989         symbol name.
4990         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
4991         test.
4992         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
4993         reloc_count in stub sections.  Adjust relbrlt test.
4994         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
4995         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4996         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4997         for relocs against discarded symbols.  Fix comments.
4999 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
5001         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5002         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5003         from ...
5004         (map_sections_to_segments): ... here.  Use it.  Assign a file
5005         position to the .dynamic section if it is not loadable, but part
5006         of the PT_DYNAMIC segment.
5007         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5008         offsets, not VMAs, for the BPABI.  Do not fill in the header in
5009         the .got.plt section for the BPABI.
5010         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5011         PT_DYNAMIC segment.
5012         (elf_backend_want_got_plt): Define to zero for Symbian OS.
5014 2004-09-06  Nick Clifton  <nickc@redhat.com>
5016         * elflink.c (elf_link_add_object_symbols): Set the error code to
5017         bfd_error_wrong_format when the input format does not match the
5018         output format.
5020 2004-09-06  Alan Modra  <amodra@bigpond.net.au>
5022         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5023         (ppc64_elf_check_directives): ..here.
5024         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5025         before accessing ppc64_elf_tdata.
5026         (ppc64_elf_finish_dynamic_sections): And here too.
5028 2004-09-04  Alan Modra  <amodra@bigpond.net.au>
5030         * bfd.c (_bfd_default_error_handler): Correct loop exit.
5032 2004-09-03  Mark Mitchell  <mark@codesourcery.com>
5034         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5035         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5036         (bfd_elf32_littlearm_symbian_vec): Likewise.
5037         * configure: Regenerated.
5038         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5039         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5040         (PLT_ENTRY_SIZE): Likewise.
5041         (bfd_vma_elf32_arm_symbian_plt_entry): New
5042         variable.
5043         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5044         and symbian_p.
5045         (create_got_section): Don't create sections when generating BPABI
5046         objects.
5047         (elf32_arm_create_dynamic_sections): Tidy.
5048         (elf32_arm_link_hash_table_create): Set plt_header_size,
5049         plt_entry_size, and symbian_p.
5050         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5051         generating BPABI objects.
5052         (allocate_dynrelocs): Use htab->plt_header_size, not
5053         PLT_HEADER_SIZE.  Do not add to .got.plt when
5054         generating BPABI objects.
5055         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5056         * elfarm-nabi.c: Add SymbianOS target vectors.
5057         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5058         (_bfd_elf_link_create_dynamic_sections): Likewise.
5059         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5060         (elfNN_bed): Use it.
5061         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5062         (bfd_elf32_littlearm_symbian_vec): Likewise.
5063         (_bfd_target_vector): Add them.
5065 2004-09-03  Nick Clifton  <nickc@redhat.com>
5067         PR 360
5068         * coffcode.h (handle_COMDAT): Replace abort with an warning
5069         message and allow the scan to continue.
5071 2004-09-02  Alan Modra  <amodra@bigpond.net.au>
5073         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5074         in when reading relocs, not our sorted syms.  Remove unnecessary
5075         var.
5077 2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
5079         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5081 2004-08-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5083         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5084         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5085         replace uses of *_alias with *_noncanonical.
5086         * aclocal.m4: Rebuild with aclocal 1.4p6.
5087         * Makefile.in: Rebuild with automake 1.4p6.
5088         * doc/Makefile.in: Rebuild with automake 1.4p6.
5089         * configure.in: Autoupdate with autoupdate 2.59.
5090         * config.in: Regenerate with autoheader 2.59.
5091         * configure: Regnerate with autoconf 2.59.
5093 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5095         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5096         symbol pointer arrays before modifying.
5098 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5100         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5101         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5102         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5103         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5104         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5105         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5106         Use both symbol tables on non-relocatable objects.  Use a common
5107         error exit.  Fix "mid" warning.
5108         * libbfd.h: Regenerate.
5109         * bfd-in2.h: Regenerate.
5111 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5113         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5114         object file.
5115         (struct sfpr_def_parms): Save some space.
5116         (sfpr_define): Here too.
5118         * elf64-ppc.c (compare_symbols): Put section syms first.
5119         (sym_exists_at): New function.
5120         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5121         points only for relocatable files.  Use .opd section contents
5122         otherwise.  Generally clean up the code.
5124 2004-08-27  Alan Modra  <amodra@bigpond.net.au>
5126         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5127         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5128         (struct sfpr_def_parms): New.
5129         (sfpr_define): New function.
5130         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5131         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5132         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5133         (savefpr1_tail, restfpr1_tail): New functions.
5134         (savevr, savevr_tail, restvr, restvr_tail): New functions.
5135         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5136         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5137         code.  Define all ABI mandated _save and _rest functions.
5139 2004-08-26  Paul Brook  <paul@codesourcery.com>
5141         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5143 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5145         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5146         TRUE or FALSE.
5148 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5150         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5151         that pcrel correction is applied for R_386_PC32.
5153 2004-08-25  Alan Modra  <amodra@bigpond.net.au>
5155         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5156         for R_386_32 and R_386_PC32 relocs against symbols defined in
5157         discarded sections.
5159 2004-08-25  Dmitry Diky  <diwil@spec.ru>
5161         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5162         Add new relocations.
5163         * bfd-in2.h: Regenerate.
5164         * libbfd.h: Regenerate.
5165         * elf32-msp430.c: Clean-up code.
5166         (elf_msp430_howto_table): Add new relocation entries.
5167         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5168         (msp430_elf_relax_section): New function.
5169         (msp430_elf_relax_delete_bytes): New function.
5170         (msp430_elf_symbol_address_p): New function.
5172 2004-08-24  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
5174         * elf32-m32r.c (m32r_elf_relocate_section): Handle
5175         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5177 2004-08-20  Daniel Jacobowitz  <dan@debian.org>
5179         * elflink.c (_bfd_elf_section_already_linked): Handle
5180         SEC_LINK_DUPLICATES_SAME_CONTENTS.
5182 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
5184         * config.bfd (arm*-*-symbianelf*): New target.
5185         (arm*-*-eabi*): Likewise.
5187 2004-08-19  Alan Modra  <amodra@bigpond.net.au>
5189         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5190         "struct ppc_link_hash_entry *".
5191         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
5192         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5194 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
5196         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5197         entries (where fd_aux overlaps next entry's fd_func).
5198         Add non_overlapping argument, use it.
5199         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5200         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5201         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5202         as indexes into opd_sym_map/opd_adjust array.
5203         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5205 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5207         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5208         if we can look up their function descriptor in a regular file.
5210 2004-08-18  Nick Clifton  <nickc@redhat.com>
5212         PR 324
5213         * cofflink.c (coff_link_add_symbols): Check that the comdat
5214         pointer in the coff_section_data structure has been initialised
5215         before using it.
5217 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5219         PR 338
5220         * elflink.c (bfd_elf_record_link_assignment): Add comment about
5221         changing bfd_link_hash_undefined to bfd_link_hash_new.
5223 2004-08-17  Jakub Jelinek  <jakub@redhat.com>
5225         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5226         if not yet defined.
5227         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5228         (synthetic_opd, synthetic_relocatable): New variables.
5229         (compare_symbols, compare_relocs): New helper routines.
5230         (ppc64_elf_get_synthetic_symtab): New function.
5231         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5232         to relsyms.
5233         * bfd-in2.h: Regenerated.
5234         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5235         to relsyms.  Return 0 if abfd is relocatable.
5237 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5239         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5241 2004-08-17  Nick Clifton  <nickc@redhat.com>
5243         * (is_arm_mapping_symbol_name): New function - return true
5244         when a symbol name matches the requirements for an ARM mapping
5245         symbol name.
5246         (arm_elf_find_function): New function based on
5247         elf_find_function in elf.c but skipping ARM mapping symbols
5248         and including thumb function symbols.
5249         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5250         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5252 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5254         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5255         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5256         (ppc64_elf_brtaken_reloc): Here too.
5258 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5260         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5261         symbol visibility.
5262         (ppc64_elf_check_directives): Check that we have the right hash
5263         table before proceeding.
5265 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5267         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5268         (adjust_opd_syms): Attach opd syms for deleted entries to one of
5269         the sections that will be discarded.
5271 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5273         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5275 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5277         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5278         free space available.
5280 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5282         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
5283         occurrences with bfd_byte * thoughout file.
5285         * coff-rs6000.c (do_shared_object_padding): Warning fix.
5286         (xcoff_write_armap_big): Likewise.
5287         (xcoff_write_archive_contents_old): Likewise.
5288         (xcoff_write_archive_contents_big): Likewise.
5290         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5292 2004-08-13  Nick Clifton  <nickc@redhat.com>
5294         * elf32-arm.h: Convert to ISO C90.
5296 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5298         PR 293
5299         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5300         zero the plt field.
5302 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5304         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5305         (bfd_archive_filename, bfd_get_section_ident): Delete.
5306         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5307         bfd_archive_filename.
5308         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5309         to warn about symbols in discarded sections.  Use _bfd_error_handler.
5310         * aout-adobe.c (aout_adobe_callback): See below.
5311         * aout-cris.c (swap_ext_reloc_in): ..
5312         * coff-arm.c (find_thumb_glue, find_arm_glue,
5313         coff_arm_relocate_section, bfd_arm_process_before_allocation,
5314         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5315         coff_arm_copy_private_bfd_data): ..
5316         * coff-i860.c (i860_reloc_processing): ..
5317         * coff-mcore.c (mcore_coff_unsupported_reloc,
5318         coff_mcore_relocate_section): ..
5319         * coff-ppc.c (coff_ppc_relocate_section): ..
5320         * coff-rs6000.c (xcoff_create_csect_from_smclas
5321         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5322         sh_swap_insns, sh_relocate_section): ..
5323         * coff-tic54x.c (tic54x_reloc_processing): ..
5324         * coff-tic80.c (coff_tic80_relocate_section): ..
5325         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5326         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5327         coff_slurp_symbol_table, coff_classify_symbol,
5328         coff_slurp_reloc_table): ..
5329         * coffgen.c (_bfd_coff_read_string_table): ..
5330         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5331         _bfd_coff_generic_relocate_section): ..
5332         * cpu-arm.c (bfd_arm_merge_machines): ..
5333         * cpu-sh.c (sh_merge_bfd_arch): ..
5334         * elf-hppa.h (elf_hppa_relocate_section): ..
5335         * elf.c (bfd_elf_string_from_elf_section, setup_group,
5336         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5337         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5338         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5339         * elf32-arm.h (find_thumb_glue, find_arm_glue,
5340         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5341         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5342         elf32_arm_relocate_section, elf32_arm_set_private_flags,
5343         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5344         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5345         cris_elf_merge_private_bfd_data
5346         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5347         * elf32-gen.c (elf32_generic_link_add_symbols): ..
5348         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5349         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5350         elf32_hppa_relocate_section): ..
5351         * elf32-i370.c (i370_elf_merge_private_bfd_data,
5352         i370_elf_check_relocs, i370_elf_relocate_section): ..
5353         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5354         elf_i386_relocate_section): ..
5355         * elf32-m32r.c (m32r_elf_relocate_section,
5356         m32r_elf_merge_private_bfd_data): ..
5357         * elf32-m68hc1x.c (m68hc12_add_stub,
5358         _bfd_m68hc11_elf_merge_private_bfd_data): ..
5359         * elf32-m68k.c (elf_m68k_relocate_section): ..
5360         * elf32-mcore.c (mcore_elf_unsupported_reloc,
5361         mcore_elf_relocate_section): ..
5362         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5363         ppc_elf_check_relocs, ppc_elf_relocate_section,
5364         ppc_elf_begin_write_processing): ..
5365         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5366         elf_s390_relocate_section): ..
5367         * elf32-sh-symbian.c (sh_symbian_import_as,
5368         sh_symbian_process_embedded_commands,
5369         sh_symbian_relocate_section): ..
5370         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5371         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5372         sh_elf_merge_private_data): ..
5373         * elf32-sparc.c (elf32_sparc_check_relocs,
5374         elf32_sparc_relocate_section,
5375         elf32_sparc_merge_private_bfd_data): ..
5376         * elf32-v850.c (v850_elf_check_relocs,
5377         v850_elf_merge_private_bfd_data): ..
5378         * elf32-xtensa.c (elf_xtensa_check_relocs,
5379         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5380         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5381         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5382         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5383         * elf64-gen.c (elf64_generic_link_add_symbols): ..
5384         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5385         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5386         ppc64_elf_relocate_section): ..
5387         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5388         elf_s390_relocate_section): ..
5389         * elf64-sh64.c (sh_elf64_relocate_section): ..
5390         * elf64-sparc.c (sparc64_elf_check_relocs,
5391         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5392         sparc64_elf_merge_private_bfd_data): ..
5393         * elf64-x86-64.c (elf64_x86_64_check_relocs,
5394         elf64_x86_64_relocate_section): ..
5395         * elflink.c (_bfd_elf_add_default_symbol,
5396         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5397         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5398         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5399         elf_get_linked_section_vma, elf_fixup_link_order,
5400         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5401         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5402         * elfxx-ia64.c (elfNN_ia64_relax_section,
5403         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5404         * elfxx-mips.c (mips_elf_perform_relocation,
5405         _bfd_mips_elf_check_relocs,
5406         _bfd_mips_elf_merge_private_bfd_data): ..
5407         * ieee.c (ieee_slurp_external_symbols): ..
5408         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5409         * libbfd.c (_bfd_generic_verify_endian_match): ..
5410         * linker.c (_bfd_generic_link_add_one_symbol,
5411         _bfd_generic_section_already_linked): ..
5412         * pdp11.c (translate_to_native_sym_flags): ..
5413         * pe-mips.c (coff_pe_mips_relocate_section): ..
5414         * peicode.h (pe_ILF_build_a_bfd): ..
5415         * srec.c (srec_bad_byte): ..
5416         * stabs.c (_bfd_link_section_stabs): ..
5417         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5418         Replace all uses of bfd_archive_filename and bfd_get_section_ident
5419         with corresponding %B and %A in _bfd_error_handler format string.
5420         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5421         calls to use %A and %B.  Fix "against symbol .. from section" and
5422         similar error messages.  Combine multiple _bfd_error_handler calls
5423         where they were separated due to bfd_archive_filename deficiencies.
5424         * bfd-in2.h: Regenerate.
5426 2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
5428         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5429         relocation.
5431 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
5433         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5434         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5435         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5436         Add twiddled_syms.
5437         (link_hash_newfunc): Init was_undefined.
5438         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5439         Use undefweak instead.
5440         (ppc64_elf_check_directives): Fix undefs chain.
5441         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5442         references.
5443         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5444         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5445         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5447 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5449         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5450         error, test input_section flags rather than sec.
5452 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
5454         * elf-bfd.h (struct elf_backend_data): Add
5455         elf_backend_archive_symbol_lookup.
5456         (_bfd_elf_archive_symbol_lookup): Declare.
5457         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5458         (elf_link_add_archive_symbols): ..extracted from here.  Call the
5459         backend version.
5460         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5461         (elfNN_bed): Init new field.
5462         * elf64-ppc.c (elf_backend_check_directives): Define.
5463         (elf_backend_archive_symbol_lookup): Define.
5464         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
5465         a ppc_link_hash_entry pointer.
5466         (get_fdh): Move.
5467         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5468         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5469         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5470         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5471         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5472         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5473         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5474         descriptor symbols.
5476 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
5478         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5479         (ppc64_elf_add_symbol_hook): Test for NULL section.
5480         (get_sym_h): Formatting.
5481         (ppc64_elf_size_stubs): Include reloc addend in value stored as
5482         stub target_value.
5484         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5485         long branch stubs with code handling plt and r2off branch stubs.
5487 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
5489         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5490         * elflink.c (elf_link_input_bfd): Formatting.
5491         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
5492         all callers.
5493         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5494         (link_hash_newfunc): Don't set it.
5495         (ppc64_elf_copy_indirect_symbol): Nor copy it.
5496         (ppc64_elf_mark_entry_syms): Delete.
5497         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
5498         sections.  Use get_opd_info.
5499         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5501 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
5503         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5505         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5506         (func_desc_adjust): Don't set have_undefweak.
5507         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5508         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5510         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5511         "struct ppc_link_hash_entry *".  Adjust all references.
5512         (ppc64_elf_hide_symbol): Correct a comment.
5514         * elf64-ppc.c (get_opd_info): New function.
5515         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
5516         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
5517         before calling get_fdh.  Test fdh rather than h before dereferencing
5518         fdh.  Mark removed symbols in opd_adjust.
5519         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5520         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5521         opd symbols.
5522         (ppc64_elf_output_symbol_hook): Likewise.
5524 2004-08-06  Paul Brook  <paul@codesourcery.com>
5526         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5527         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5528         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5529         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5530         and BFD_RELOC_ARM_SBREL32.
5531         * bfd-in2.h, bbfd.h: Regenerate.
5533 2004-08-01  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
5535         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5536         the dynamic link symbol actually in use.
5538 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
5540         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5542 2004-07-31  Joel Brobecker  <brobecker@gnat.com>
5543             Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
5545         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5546         SHN_MIPS_TEXT and SHN_MIPS_DATA.
5548 2004-07-30  H.J. Lu  <hongjiu.lu@intel.com>
5549             Nick Clifton  <nickc@redhat.com>
5551         PR 290
5552         * bfd.c (_bfd_default_error_handler): Make it global.
5554         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5556         * elf.c (assign_section_numbers): Cope gracefully with sections
5557         which have SHF_LINK_ORDER set but no sh_link set up.
5558         * elflink.c (elf_get_linked_section_vma): Likewise.
5560         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5561         it to NULL.
5563         * elfxx-target.h (elf_backend_link_order_error_handler): New.
5564         Set it to _bfd_default_error_handler.
5565         (elfNN_bed): Add elf_backend_link_order_error_handler.
5567         * libbfd-in.h (_bfd_default_error_handler): New.
5569         * libbfd.h: Regenerated.
5571 2004-07-30  Jakub Jelinek  <jakub@redhat.com>
5573         * archures.c (bfd_mach_sparc_64bit_p): Define.
5574         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5575         * bfd-in2.h: Rebuilt.
5577 2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
5579         Introduce SH2a support.
5580         2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
5581         * archures.c (bfd_mach_sh2a_nofpu): New.
5582         * bfd-in2.h: Rebuilt.
5583         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5584         (arch_info_struct): Add sh2a_nofpu.
5585         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5586         2003-12-29  DJ Delorie  <dj@redhat.com>
5587         * reloc.c: Add relocs for sh2a.
5588         * bfd-in2.h: Regenerate.
5589         * libbfd.hh: Regenerate.
5590         2003-12-01  Michael Snyder  <msnyder@redhat.com>
5591         * archures.c (bfd_mach_sh2a): New.
5592         * bfd-in2.h: Rebuilt.
5593         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5594         (SH2A_NEXT): New.
5595         (arch_info_struct): Add sh2a.
5596         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5598 2004-07-28  Nick Clifton  <nickc@redhat.com>
5599             John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5601         PR 273
5602         * som.c (setup_sections): Improve estimation of space sizes in
5603         relocatable objects.
5605 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
5606         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5607         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
5608         to targ_selvecs.
5609         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5610         * configure: Regenerate.
5611         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5612         case that accepts OSABI=NetBSD and OSABI=SysV.
5613         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5614         the base of .got or .data (if .got does not exist).
5615         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5616         set OSABI=NetBSD.
5617         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5618         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5619         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5620         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5622 2004-07-27  H.J. Lu  <hongjiu.lu@intel.com>
5624         PR 161/251
5625         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5626         (elf_sec_group): Defined.
5627         (bfd_elf_match_symbols_in_sections): New prototype.
5628         (_bfd_elf_setup_group_pointers): Likewise.
5630         * elf.c (bfd_elf_discard_group): Abort.
5631         (bfd_elf_set_group_contents): Also include relocation sections.
5632         Remove zero-fill for ld -r.
5633         (_bfd_elf_setup_group_pointers): New function.
5634         (elf_sort_elf_symbol): Likewise.
5635         (elf_sym_name_compare): Likewise.
5636         (bfd_elf_match_symbols_in_sections): Likewise.
5638         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5640         * elflink.c (match_group_member): New.
5641         (elf_link_input_bfd): Check group member for discarded section.
5642         (try_match_symbols_in_sections): New function.
5643         (already_linked): Likewise.
5644         (_bfd_elf_section_already_linked): Support mixing comdat group
5645         and linkonce section.
5647         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5648         * linker.c (bfd_section_already_linked_table_traverse): New.
5650         * libbfd.h: Regenerated.
5652 2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
5654         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5655         BFD_RELOC_CRX_SWITCH32.
5656         * bfd-in2.h: Regenerate.
5657         * libbfd.h: Regenerate.
5658         * elf32-crx.c: Support relocation/relaxation of
5659         BFD_RELOC_CRX_SWITCH* types.
5661 2004-07-27  Alan Modra  <amodra@bigpond.net.au>
5663         * elf64-ppc.c: Correct "Linker stubs" comment.
5665 2004-07-26  H.J. Lu  <hongjiu.lu@intel.com>
5667         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5668         linked-to section.
5669         (elf_linked_to_section): New.
5671         * elf.c (assign_section_numbers): Set up sh_link for
5672         SHF_LINK_ORDER.
5674         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5675         to sh_link for SHT_IA_64_UNWIND sections.
5677 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
5679         * elflink.c (elf_fixup_link_order): Add _() to error message.
5681 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
5683         * elflink.c (elf_fixup_link_order): Issue a warning and flag
5684         an error if failed.
5686 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
5688         * aout-adobe.c (aout_32_section_already_linked): Defined.
5689         * aout-target.h (MY_section_already_linked): Likewise.
5690         * aout-tic30.c (MY_section_already_linked): Likewise.
5691         * binary.c (binary_section_already_linked): Likewise.
5692         * bout.c (b_out_section_already_linked): Likewise.
5693         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5694         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5695         * coffcode.h (coff_section_already_linked): Likewise.
5696         * i386msdos.c (msdos_section_already_linked): Likewise.
5697         * i386os9k.c (os9k_section_already_linked): Likewise.
5698         * ieee.c (ieee_section_already_linked): Likewise.
5699         * ihex.c (ihex_section_already_linked): Likewise.
5700         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5701         * mmo.c (mmo_section_already_linked): Likewise.
5702         * nlm-target.h (nlm_section_already_linked): Likewise.
5703         * oasys.c (oasys_section_already_linked): Likewise.
5704         * pef.c (bfd_pef_section_already_linked): Likewise.
5705         * ppcboot.c (ppcboot_section_already_linked): Likewise.
5706         * som.c (som_bfd_discard_group): Likewise.
5707         * srec.c (srec_section_already_linked): Likewise.
5708         * tekhex.c (tekhex_section_already_linked): Likewise.
5709         * versados.c (versados_section_already_linked): Likewise.
5710         * vms.c (vms_section_already_linked): Likewise.
5711         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5712         * xsym.c (bfd_sym_section_already_linked): Likewise.
5714         * bfd-in.h (bfd_section_already_linked_table_init): New.
5715         (bfd_section_already_linked_table_free): Likewise.
5717         * coff-rs6000.c (rs6000coff_vec): Add
5718         _bfd_generic_section_already_linked.
5719         (pmac_xcoff_vec): Likewise.
5720         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5721         (aix5coff64_vec): Likewise.
5723         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5724         * elflink.c (_bfd_elf_section_already_linked): New function.
5726         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5728         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5729         (_bfd_generic_section_already_linked): New.
5730         (bfd_section_already_linked_hash_entry): Likewise.
5731         (bfd_section_already_linked): Likewise.
5732         (bfd_section_already_linked_table_lookup): Likewise.
5733         (bfd_section_already_linked_table_insert): Likewise.
5735         * linker.c (bfd_section_already_linked): New.
5736         (_bfd_section_already_linked_table): Likewise.
5737         (bfd_section_already_linked_table_lookup): Likewise.
5738         (bfd_section_already_linked_table_insert): Likewise.
5739         (already_linked_newfunc): Likewise.
5740         (bfd_section_already_linked_table_init): Likewise.
5741         (bfd_section_already_linked_table_free): Likewise.
5742         (_bfd_generic_section_already_linked): Likewise.
5744         * section.c (bfd_section): Remove comdat.
5745         (bfd_comdat_info): Moved to ...
5746         * bfd-in.h (coff_comdat_info): Here.
5747         (bfd_coff_get_comdat_section): New.
5748         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5749         * libcoff-in.h (coff_section_tdata): Add comdat.
5750         * coffcode.h (handle_COMDAT): Updated.
5751         * cofflink.c (coff_link_add_symbols): Likewise.
5752         * ecoff.c (bfd_debug_section): Likewise.
5754         * targets.c (bfd_target): Add _section_already_linked.
5755         (BFD_JUMP_TABLE_LINK): Updated.
5757         * bfd-in2.h: Regenerated.
5758         * libbfd.h: Likewise.
5759         * libcoff.h: Likewise.
5761 2003-07-21  Paul Brook  <paul@codesourcery.com>
5763         * elflink.c (elf_get_linked_section_vma, compare_link_order,
5764         elf_fixup_link_order): New functions.
5765         (bfd_elf_final_link): Call elf_fixup_link_order.
5767 2004-07-21  Alexandre Oliva  <aoliva@redhat.com>
5769         * elf-bfd.h (ELF_COMMON_DEF_P): New.
5770         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5771         common definitions.
5772         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5773         _bfd_elf_symbol_refs_local_p.
5774         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5775         symbols.
5777 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5779         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5780         DYN_NO_NEEDED.
5781         (bfd_elf_get_dyn_lib_class): New prototype.
5782         * elf.c (bfd_elf_get_dyn_lib_class): New function.
5784         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5785         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5786         entry is needed. Issue an error if a DT_NEEDED entry is needed
5787         for a file marked DYN_NO_NEEDED.
5788         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5789         for DT_NEEDED tags.
5791         * bfd-in2.h: Regenerated.
5793 2004-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5795         * elflink.c (elf_section_complain_discarded): Don't complain in
5796         .PARISC.unwind.
5798 2004-07-10  James E Wilson  <wilson@specifixinc.com>
5800         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5801         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5802         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5803         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5804         Fix callers.
5805         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
5806         bfd_put_64 to bfd_putl64.
5807         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5809 2004-07-09  H.J. Lu  <hongjiu.lu@intel.com>
5811         PR 240
5812         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5813         .init/.fini sections when trying to relax it.
5815 2004-07-09  Jie Zhang  <zhangjie@magima.com.cn>
5817         * elf.c (assign_file_positions_for_segments): Make sure the
5818         .dynamic section is the first section in the PT_DYNAMIC segment.
5820 2004-07-09  Nick Clifton  <nickc@redhat.com>
5822         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5823         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5824         sh_elf_get_flags_from_mach functions so that they do not conflict
5825         when this target is built with other sh-elf targets.
5826         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5827         suppression of this function.
5828         (sh_elf_find_flags): Likewise.
5830 2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
5832         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5833         (ALL_MACHINES_CFILES): Add cpu-crx.c.
5834         (BFD32_BACKENDS): Add elf32-crx.lo.
5835         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5836         (cpu-crx.lo): New target.
5837         (elf32-crx.lo): New target.
5838         * Makefile.in: Regenerate.
5839         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5840         (bfd_archures_list): Add bfd_crx_arch.
5841         * bfd-in2.h: Regenerate.
5842         * config.bfd: Handle crx-*-elf*, crx*.
5843         * configure.in: Handle bfd_elf32_crx_vec.
5844         * configure: Regenerate.
5845         * cpu-crx.c: New file.
5846         * elf32-crx.c: Likewise.
5847         * libbfd.h: Regenerate.
5848         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5849         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5850         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5851         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5852         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5853         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5854         * targets.c (bfd_elf32_crx_vec): Declare.
5855         (bfd_target_vector): Add bfd_elf32_crx_vec.
5857 2004-07-06  Nick Clifton  <nickc@redhat.com>
5859         * config.bfd: Add sh-symbian-elf target.
5860         * configure.in: Add bfd_elf32_shl_symbian_vec.
5861         * configure: Regenerate.
5862         * elf-bfd.h (struct elf_backend_data): Add new field
5863         'check_directives'.
5864         * elflink.c (elf_link_add_object_symbols): Invoke the
5865         check_directives function, if defined.
5866         * elfxx-target.h: Provide a default, NULL definition for
5867         check_directives.
5868         * targets.c: Add bfd_elf32_shl_symbian_vec.
5869         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5870         definition.
5871         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5872         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5873         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5874         not already been defined.
5875         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5876         * sh-symbian.c: New file.  Provide functions to support the
5877         * sh-symbian-elf target.
5878         * Makefile.am: Add elf32-sh-symbian.c
5879         * Makefile.in: Regenerate.
5881 2004-07-05  Andrew Stubbs <andrew.stubbs@superh.com>
5883         * elf32-sh.c: Include ../opcodes/sh-opc.h.
5884         * Makefile.am: Ran make dep-am.
5885         * Makefile.in: Ran make dep-in.
5887 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
5889         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5890         externals properly.
5892 2004-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5894         * config.bfd: Add want64 to configuration target s390-*-linux*.
5896 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
5898         * bfd.c (bfd_get_section_ident): New.
5900         * elflink.c (elf_link_read_relocs_from_section): Call
5901         bfd_get_section_ident to identify the section when reporting
5902         error.
5903         (_bfd_elf_link_output_relocs): Likewise.
5904         (elf_link_output_extsym): Likewise.
5905         (elf_link_input_bfd): Likewise.
5906         (bfd_elf_gc_record_vtinherit): Likewise.
5908         * bfd-in2.h: Regenerated.
5910 2004-07-01  Jie Zhang  <zhangjie@magima.com.cn>
5911             Nick Clifton  <nickc@redhat.com>
5913         PR 204
5914         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5915         of section symbols to mips_elf_sort_hash_table ().
5917 2004-07-01  Alan Modra  <amodra@bigpond.net.au>
5919         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5920         change.  Comment.
5921         (elf_section_complain_discarded): New function.  Handle
5922         .gcc_except_table too.
5923         (elf_link_input_bfd): Rewrite handling of relocs against symbols
5924         in discarded sections.
5925         * elf-bfd.h (elf_discarded_section): Protect macro arg.
5927 2004-06-30  James E Wilson  <wilson@specifixinc.com>
5929         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
5930         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
5932 2004-06-30  H.J. Lu  <hongjiu.lu@intel.com>
5934         PR 233
5935         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5936         local references to discarded sections and report their
5937         locations.
5939 2004-06-30  Alan Modra  <amodra@bigpond.net.au>
5941         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5942         sec_info_type, test section name instead.
5944 2004-06-29  H.J. Lu  <hongjiu.lu@intel.com>
5946         PR 240
5947         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5948         in .init/.fini sections.
5950 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
5952         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5953         bfd_get_section_limit.
5955 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
5957         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5958         output section size.
5960 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
5962         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5963         rawsize.
5964         (mmix_elf_perform_relocation): Adjust for above change.
5965         (mmix_elf_relocate_section): Likewise.
5966         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
5967         (mmix_elf_get_section_contents): Delete.
5968         (bfd_elf64_get_section_contents): Delete.
5969         (mmix_elf_relocate_section): Zero stub area.
5970         * linker.c (default_indirect_link_order): Alloc max of section size
5971         and rawsize.
5972         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5973         * section.c (bfd_malloc_and_get_section): Likewise.
5974         (struct bfd_section): Update rawsize comment.
5975         * bfd-in2.h: Regenerate.
5977         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5979 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
5981         * bfd-in.h (bfd_get_section_limit): Define.
5982         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5983         (_bfd_final_link_relocate): Use bfd_get_section_limit.
5984         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5985         * coff-arm.c (coff_arm_relocate_section): Likewise.
5986         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5987         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5988         (bfd_ns32k_final_link_relocate): Likewise.
5989         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5990         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5991         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5992         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5993         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5994         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5995         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5996         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5997         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5998         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5999         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6000         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6001         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6002         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6003         * elf32-v850.c (v850_elf_reloc): Likewise.
6004         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6005         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6006         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6007         * elf64-mips.c (mips_elf64_gprel32_reloc)
6008         (mips16_gprel_reloc): Likewise.
6009         * elf64-mmix.c (mmix_elf_reloc): Likewise.
6010         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6011         * elf64-sparc.c (init_insn_reloc): Likewise.
6012         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6013         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6014         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6015         (_bfd_mips_elf_generic_reloc): Likewise.
6016         * bfd-in2.h: Regenerate.
6018 2004-06-28  Alan Modra  <amodra@bigpond.net.au>
6020         * bfd-in.h (struct stab_info): Move from stabs.c.
6021         * stabs.c (struct stab_link_includes_table): Delete.
6022         (stab_link_includes_lookup): Delete.
6023         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6024         level of indirection from sinfo parm.
6025         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
6026         stabstr section.  Adjust hash table accesses.
6027         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6028         alloc.  Adjust stab_info test.
6029         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6030         (_bfd_coff_final_link): Adjust stab_info test.
6031         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6032         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6033         in place.
6034         * libcoff-in.h (struct coff_link_hash_table): Likewise.
6035         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6036         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6037         stabstr section.  Adjust stab_info test.
6038         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6039         (_bfd_write_stab_strings): Adjust prototypes.
6040         * libbfd.h: Regenerate.
6041         * libcoff.h: Regenerate.
6042         * bfd-in2.h: Regenerate.
6044 2004-06-27  Mark Kettenis  <kettenis@gnu.org>
6046         From Miod Vallat <miod@online.fr>:
6047         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6049 2004-06-26  Alexandre Oliva  <aoliva@redhat.com>
6051         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6052         (struct elf32_mn10300_link_hash_entry): Remove
6053         pcrel_relocs_copied.
6054         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6055         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
6056         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6057         and gotoff relocations if the symbol doesn't bind locally.  Use
6058         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
6059         relocation for PCREL32.
6060         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6061         to test whether a symbol binds locally.
6062         (elf32_mn10300_link_hash_newfunc): Don't initialize
6063         pcrel_relocs_copied.
6064         (_bfd_mn10300_elf_discard_copies): Delete.
6065         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6067 2004-06-26  Mark Kettenis  <kettenis@gnu.org>
6069         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6071 2004-06-25  Joel Brobecker  <brobecker@gnat.com>
6073         * som.c (som_set_reloc_info): Correct small typo.
6075 2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
6077         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6078         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6079         (m32r_elf_gcsweep_hook): Likewise.
6080         (m32r_elf_check_relocs): Likewise.
6081         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6082         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6083         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6084         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6085         * bfd-in2.h: Regenerated.
6086         * libbfd.h: Regenerated.
6088 2004-06-24  H.J. Lu  <hongjiu.lu@intel.com>
6090         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6091         relocation symbol.
6092         (elf64_x86_64_relocate_section): Issue an error for
6093         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6094         against global symbols when building shared library.
6096 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
6098         * section.c (struct sec): Rename "_cooked_size" to "size".
6099         Rename "_raw_size" to "rawsize".
6100         (STD_SECTION): Adjust comments.
6101         (bfd_set_section_size, bfd_get_section_contents): Use size.
6102         (bfd_malloc_and_get_section): New function.
6103         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6104         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6105         Correctly free reloc and contents memory.
6106         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6107         and fake CIE now that we can shink section size to zero.
6108         (_bfd_elf_write_section_eh_frame): Likewise..
6109         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6110         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6111         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
6112         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6113         unneeded indirection.
6114         * elf.c (_bfd_elf_section_offset): .. and update call.
6115         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6116         * libbfd.h: Regenerate.
6117         * bfd-in2.h: Regenerate.
6119         Replace occurrences of "_raw_size" and "_cooked_size" in most places
6120         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6121         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
6122         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6123         Similarly use "rawsize", if non-zero, in reloc functions to validate
6124         reloc addresses.  Use new bfd_malloc_and_get_section in most places
6125         where bfd_get_section_contents was called.  Expand all occurrences of
6126         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
6127         grok_prstatus and similar functions to "size".
6128         * aix386-core.c (aix386_core_file_p): ..
6129         * aix5ppc-core.c (xcoff64_core_p): ..
6130         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6131         aout_adobe_set_section_contents): ..
6132         * aout-target.h (callback): ..
6133         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6134         MY_bfd_final_link): ..
6135         * aoutf1.h (sunos4_core_file_p): ..
6136         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6137         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6138         final_link, aout_link_input_section): ..
6139         * binary.c (binary_object_p, binary_canonicalize_symtab,
6140         binary_set_section_contents): ..
6141         * bout.c (b_out_callback, b_out_write_object_contents,
6142         b_out_set_section_contents, b_out_bfd_relax_section,
6143         b_out_bfd_get_relocated_section_contents): ..
6144         * cisco-core.c (cisco_core_file_validate): ..
6145         * coff-alpha.c (alpha_ecoff_object_p,
6146         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6147         * coff-arm.c (coff_arm_relocate_section,
6148         bfd_arm_allocate_interworking_sections): ..
6149         * coff-h8300.c (h8300_reloc16_extra_cases,
6150         h8300_bfd_link_add_symbols): ..
6151         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6152         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6153         ppc_bfd_coff_final_link): ..
6154         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6155         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6156         sh_align_loads, sh_coff_get_relocated_section_contents): ..
6157         * coff64-rs6000.c (xcoff64_write_object_contents,
6158         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6159         * coffcode.h (coff_compute_section_file_positions,
6160         coff_write_object_contents): ..
6161         * coffgen.c (make_a_section_from_file, coff_write_symbols,
6162         coff_section_symbol, build_debug_section): ..
6163         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6164         process_embedded_commands, _bfd_coff_link_input_bfd,
6165         _bfd_coff_write_global_sym): ..
6166         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6167         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6168         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6169         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6170         _bfd_dwarf2_find_nearest_line): ..
6171         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6172         ecoff_compute_section_file_positions,
6173         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6174         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6175         _bfd_elf_discard_section_eh_frame_hdr,
6176         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6177         _bfd_elf_write_section_eh_frame,
6178         _bfd_elf_write_section_eh_frame_hdr): ..
6179         * elf-hppa.h (elf_hppa_sort_unwind): ..
6180         * elf-m10200.c (mn10200_elf_relax_section,
6181         mn10200_elf_relax_delete_bytes,
6182         mn10200_elf_get_relocated_section_contents): ..
6183         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6184         mn10300_elf_check_relocs, mn10300_elf_relax_section,
6185         mn10300_elf_relax_delete_bytes,
6186         mn10300_elf_get_relocated_section_contents,
6187         _bfd_mn10300_elf_adjust_dynamic_symbol,
6188         _bfd_mn10300_elf_discard_copies,
6189         _bfd_mn10300_elf_size_dynamic_sections,
6190         _bfd_mn10300_elf_finish_dynamic_sections): ..
6191         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6192         _bfd_elf_make_section_from_phdr, elf_fake_sections,
6193         bfd_elf_set_group_contents, map_sections_to_segments,
6194         elf_sort_sections, assign_file_positions_for_segments,
6195         SECTION_SIZE, copy_private_bfd_data,
6196         _bfd_elf_get_dynamic_reloc_upper_bound,
6197         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6198         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6199         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6200         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6201         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6202         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6203         bfd_elf32_arm_process_before_allocation,
6204         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6205         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6206         elf32_arm_write_section): ..
6207         * elf32-cris.c (cris_elf_grok_prstatus,
6208         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6209         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6210         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6211         elf_cris_discard_excess_dso_dynamics,
6212         elf_cris_discard_excess_program_dynamics): ..
6213         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6214         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6215         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6216         _frv_create_got_section, _frvfdpic_assign_plt_entries,
6217         elf32_frvfdpic_size_dynamic_sections,
6218         elf32_frvfdpic_modify_segment_map,
6219         elf32_frvfdpic_finish_dynamic_sections): ..
6220         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6221         elf32_h8_get_relocated_section_contents): ..
6222         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6223         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6224         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6225         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6226         elf32_hppa_finish_dynamic_sections): ..
6227         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6228         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6229         i370_elf_finish_dynamic_sections): ..
6230         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6231         allocate_dynrelocs, elf_i386_size_dynamic_sections,
6232         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6233         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6234         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6235         * elf32-ip2k.c (ip2k_is_switch_table_128,
6236         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6237         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6238         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6239         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6240         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6241         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6242         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6243         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6244         m32r_elf_get_relocated_section_contents): ..
6245         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6246         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6247         m68hc11_elf_relax_delete_bytes): ..
6248         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6249         m68hc12_elf_size_one_stub): ..
6250         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6251         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6252         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6253         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6254         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6255         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6256         elf32_mips_grok_prstatus): ..
6257         * elf32-or32.c (or32_elf_consth_reloc): ..
6258         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6259         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6260         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6261         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6262         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6263         ppc_elf_final_write_processing): ..
6264         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6265         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6266         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6267         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6268         sh_elf_relax_delete_bytes, sh_elf_align_loads,
6269         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6270         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6271         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6272         * elf32-sh64-com.c (sh64_address_in_cranges,
6273         sh64_get_contents_type): ..
6274         * elf32-sh64.c (sh64_find_section_for_address,
6275         sh64_elf_final_write_processing): ..
6276         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6277         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6278         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6279         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6280         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6281         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6282         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6283         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6284         elf_vax_finish_dynamic_sections): ..
6285         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6286         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6287         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6288         xstormy16_elf_finish_dynamic_sections): ..
6289         * elf32-xtensa.c (xtensa_read_table_entries,
6290         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6291         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6292         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6293         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6294         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6295         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6296         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6297         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6298         xtensa_callback_required_dependence): ..
6299         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6300         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6301         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6302         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6303         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6304         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6305         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6306         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6307         * elf64-hppa.c (allocate_dynrel_entries,
6308         elf64_hppa_size_dynamic_sections,
6309         elf64_hppa_finish_dynamic_sections): ..
6310         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6311         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6312         elf64_mips_grok_prstatus): ..
6313         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6314         mmix_elf_relocate_section, mmix_elf_final_link,
6315         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6316         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6317         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6318         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6319         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6320         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6321         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6322         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6323         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6324         ppc64_elf_finish_dynamic_sections): ..
6325         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6326         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6327         elf_s390_finish_dynamic_sections): ..
6328         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6329         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6330         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6331         sh64_elf64_finish_dynamic_sections): ..
6332         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6333         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6334         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6335         sparc64_elf_finish_dynamic_symbol,
6336         sparc64_elf_finish_dynamic_sections): ..
6337         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6338         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6339         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6340         elf64_x86_64_finish_dynamic_sections): ..
6341         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6342         * elfcode.h (elf_slurp_reloc_table): ..
6343         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6344         elf_finalize_dynstr, elf_link_add_object_symbols,
6345         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6346         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6347         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6348         elf32_mips_grok_prstatus): ..
6349         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6350         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6351         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6352         elfNN_ia64_finish_dynamic_sections): ..
6353         * elfxx-mips.c (mips_elf_create_procedure_table,
6354         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6355         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6356         mips_elf_global_got_index, mips_elf_multi_got,
6357         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6358         mips_elf_allocate_dynamic_relocations,
6359         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6360         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6361         _bfd_mips_elf_always_size_sections,
6362         _bfd_mips_elf_size_dynamic_sections,
6363         _bfd_mips_elf_finish_dynamic_symbol,
6364         _bfd_mips_elf_finish_dynamic_sections,
6365         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6366         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6367         _bfd_elf_mips_get_relocated_section_contents,
6368         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6369         * hp300hpux.c (callback): ..
6370         * hppabsd-core.c (make_bfd_asection): ..
6371         * hpux-core.c (make_bfd_asection): ..
6372         * i386linux.c (linux_link_create_dynamic_sections,
6373         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6374         * i386msdos.c (msdos_write_object_contents): ..
6375         * i386os9k.c (os9k_callback, os9k_write_object_contents,
6376         os9k_set_section_contents): ..
6377         * ieee.c (parse_expression, ieee_slurp_external_symbols,
6378         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6379         ieee_write_section_part, do_with_relocs, do_as_repeat,
6380         do_without_relocs, ieee_write_debug_part, init_for_output,
6381         ieee_set_section_contents): ..
6382         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6383         * irix-core.c (do_sections, make_bfd_asection): ..
6384         * libaout.h (aout_section_merge_with_text_p): ..
6385         * libbfd.c (_bfd_generic_get_section_contents,
6386         _bfd_generic_get_section_contents_in_window): ..
6387         * linker.c (default_indirect_link_order): ..
6388         * lynx-core.c (make_bfd_asection): ..
6389         * m68klinux.c (linux_link_create_dynamic_sections,
6390         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6391         * mach-o.c (bfd_mach_o_make_bfd_section,
6392         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6393         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6394         bfd_mach_o_scan_read_segment): ..
6395         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6396         _bfd_merge_sections): ..
6397         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6398         mmo_map_set_sizes, mmo_canonicalize_symtab,
6399         mmo_internal_write_section, mmo_write_object_contents): ..
6400         * netbsd-core.c (netbsd_core_file_p): ..
6401         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6402         nlm_alpha_set_public_section): ..
6403         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6404         * nlm32-sparc.c (nlm_sparc_write_import): ..
6405         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6406         nlm_compute_section_file_positions): ..
6407         * oasys.c (oasys_object_p, oasys_slurp_section_data,
6408         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6409         * opncls.c (get_debug_link_info): ..
6410         * osf-core.c (make_bfd_asection): ..
6411         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6412         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6413         final_link, aout_link_input_section): ..
6414         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6415         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6416         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6417         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6418         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6419         * ptrace-core.c (ptrace_unix_core_file_p): ..
6420         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6421         _bfd_final_link_relocate, bfd_generic_relax_section,
6422         bfd_generic_get_relocated_section_contents): ..
6423         * reloc16.c (bfd_coff_reloc16_relax_section,
6424         bfd_coff_reloc16_get_relocated_section_c): ..
6425         * riscix.c (riscix_some_aout_object_p): ..
6426         * rs6000-core.c (read_hdr, make_bfd_asection): ..
6427         * sco5-core.c (make_bfd_asection): ..
6428         * simple.c (bfd_simple_get_relocated_section_contents): ..
6429         * som.c (som_object_setup, setup_sections, som_prep_headers,
6430         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6431         som_set_reloc_info, som_get_section_contents,
6432         som_bfd_link_split_section): ..
6433         * sparclinux.c (linux_link_create_dynamic_sections,
6434         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6435         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6436         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6437         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6438         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6439         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6440         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6441         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6442         sunos_finish_dynamic_link): ..
6443         * syms.c (_bfd_stab_section_find_nearest_line): ..
6444         * tekhex.c (first_phase, tekhex_set_section_contents,
6445         tekhex_write_object_contents): ..
6446         * trad-core.c (trad_unix_core_file_p): ..
6447         * versados.c (process_esd, process_otr, process_otr): ..
6448         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6449         * vms-misc.c (add_new_contents): ..
6450         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6451         * vms.c (vms_set_section_contents): ..
6452         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6453         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6454         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6455         * xsym.c (bfd_sym_scan): .. See above.
6457 2004-06-21  H.J. Lu  <hongjiu.lu@intel.com>
6459         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6460         calling _bfd_merged_section_offset only for section symbols.
6462 2004-06-22  Alan Modra  <amodra@bigpond.net.au>
6464         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6465         for handling SEC_MERGE symbols in relax_section.
6467 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
6469         2003-05-15  Richard Sandiford  <rsandifo@redhat.com>
6470         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6471         linked together. Mark the result as h8300sx code.
6473 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
6475         * elf-bfd.h (struct elf_backend_data): Added
6476         elf_backend_omit_section_dynsym.
6477         (_bfd_elf_link_omit_section_dynsym): Declare.
6478         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6479         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6480         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6481         (_bfd_elf_link_renumber_dynsyms): ... this function.
6482         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6483         _bfd_elf_link_omit_section_dynsym).
6484         (elfNN_bed): Added elf_backend_omit_section_dynsym.
6486 2004-06-21  Nick Clifton  <nickc@redhat.com>
6488         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6489         flags.
6491 2004-06-17  Jerome Guitton  <guitton@gnat.com>
6493         * bfd-in.h (bfd_cache_close_all): New function declaration.
6494         * bfd-in2.h: Regenerate.
6495         * cache.c (bfd_cache_close_all): New function definition.
6497 2004-06-16  Mark Kettenis  <kettenis@gnu.org>
6499         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6500         4.10 and beyond.
6501         * configure: Regenerate.
6503 2004-06-16  Daniel Jacobowitz  <dan@debian.org>
6505         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6506         the pre-existing section.
6508 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
6510         * section.c (struct sec): Remove usused flags.  Reorganize a little.
6511         (bfd_get_section_size_before_reloc): Delete.
6512         (bfd_get_section_size_after_reloc): Delete.
6513         (STD_SECTION): Update.
6514         (bfd_get_section_size_now): Delete.
6515         (bfd_set_section_contents): Don't referece reloc_done.
6516         (bfd_get_section_contents): Remove reloc_done comment.
6517         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6518         reloc_done.
6519         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6520         * ecoff.c (bfd_debug_section): Update initializer.
6521         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6522         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6523         * bfd-in.h (bfd_section_size): Expand.
6524         (bfd_get_section_size): New macro.
6525         * bfd-in2.h: Regenerate.
6526         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6527         bfd_get_section_size_before_reloc with bfd_get_section_size.
6528         * coffcode.h (coff_write_object_contents): Likewise.
6529         * coffgen.c (build_debug_section): Likewise.
6530         * dwarf1.c (parse_line_table): Likewise.
6531         (_bfd_dwarf1_find_nearest_line): Likewise.
6532         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6533         * i386msdos.c (msdos_write_object_contents): Likewise.
6534         * pdp11.c (squirt_out_relocs): Likewise.
6535         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6536         * elf64-mmix.c (mmix_elf_final_link): Update comment.
6538 2004-06-14  Chris Demetriou  <cgd@broadcom.com>
6540         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6541         removal) with updated comment.
6542         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6543         BFD_RELOC_32_PCREL.
6544         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6545         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6547 2004-06-12  Alan Modra  <amodra@bigpond.net.au>
6549         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6550         overflow on branches to undefweaks.
6552 2004-06-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6554         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6555         as ecoff_section_data() does not return a valid lvalue.
6557 2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
6559         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6560         (elf_link_add_object_symbols): Likewise.
6562         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6563         (elf_backend_reloc_type_class): New.
6565 2004-06-08  Mark Kettenis  <kettenis@gnu.org>
6567         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6568         netbsd-core.lo.
6569         * configure: Regenerate.
6571 2004-06-07  Daniel Jacobowitz  <dan@debian.org>
6573         From:  Albert Chin-A-Young  <china@thewrittenword.com>
6574         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6575         to unsigned int.
6577 2004-05-29  H.J. Lu  <hongjiu.lu@intel.com>
6579         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6580         change.
6582 2004-05-28  DJ Delorie  <dj@redhat.com>
6584         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6585         for linking, but otherwise adjust reloc for merged sections.
6587 2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
6589         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6590         _bfd_merged_section_offset for local symbols.
6592 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
6594         * Makefile.am: Regenerate dependencies.
6595         * Makefile.in: Regenerate.
6596         * archures.c: Add bfd_mach_sh3_nommu .
6597         * bfd-in2.h: Regenerate.
6598         * cpu-sh.c: Add sh3-nommu architecture.
6599         (bfd_to_arch_table): Create new table.
6600         (sh_get_arch_from_bfd_mach): Create new function.
6601         (sh_get_arch_up_from_bfd_mach): Create new function.
6602         (sh_merge_bfd_arch): Create new function.
6603         * elf32-sh.c (sh_ef_bfd_table): Add table.
6604         (sh_elf_check_relocs): Replace switch statement with
6605         use of sh_ef_bfd_table .
6606         (sh_elf_get_flags_from_mach): Add new function.
6607         (sh_find_elf_flags): Likewise.
6608         (sh_elf_copy_private_data): Replace most of non-elf contents
6609         with a call to sh_merge_bfd_arch() .
6611 2004-05-27  Michael Chastain  <mec.gnu@mindspring.com>
6613         * Makefile.am (bfdver.h): Use explicit filename, not $< .
6614         * Makefile.in: Regenerate.
6616 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
6618         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6619         custom calling conventions for dynamic symbols.
6620         (mn10300_elf_relax_section): Avoid relaxing a function as a local
6621         symbol if it's an alias to a global one.
6623 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
6625         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6626         change.
6628 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
6630         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6631         loop over hashes.
6633 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
6635         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6636         for SHT_GROUP sections.
6638 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
6640         * elflink.c (elf_link_add_object_symbols): Don't set up merge
6641         section data here..
6642         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6643         * merge.c: Formatting.  Remove unnecessary casts.  Expand
6644         bfd_get_section_alignment macro.
6645         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
6646         use throughout file.
6647         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
6648         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
6649         section name to determine sinfo group, instead test output section
6650         and alignment.
6651         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
6652         _bfd_strip_section_from_output rather than just twiddling flags.
6653         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6654         (_bfd_merge_sections): Update prototype.
6655         * libbfd.h: Regenerate.
6657 2004-05-24  Mark Kettenis  <kettenis@gnu.org>
6659         * netbsd-core.c: Correctly indent section that sets architecture
6660         from machine ID.
6662         From Miod Vallat <miod@online.fr>:
6663         * m88kopenbsd.c: New file.
6664         * targets.c (m88k_openbsd_vec): New.
6665         * config.bfd: Add m88k-*-openbsd*.
6666         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6667         (m88kopenbsd_vec): New.
6668         * configure: Regenerate.
6669         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6670         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6671         Run "make dep-am".
6672         * Makefile.in: Regenerate.
6673         * po/SRC-POTFILES.in: Regenerate.
6675 2004-05-24  Nick Clifton  <nickc@redhat.com>
6677         * hash.c: Remove bogus node "Changing the default Hash Table Size"
6678         introduced by hash table size patch.
6680 2004-05-22  Ben Elliston  <bje@au.ibm.com>
6682         * configure.in (is_release): Remove.
6683         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6684         (AC_OUTPUT): Don't output bfdver.h from version.h.
6685         * configure: Regenerate.
6686         * Makefile.am (RELEASE): New variable.
6687         (bfdver.h): New target.
6688         * Makefile.in: Regenerate.
6689         * doc/Makefile.in: Likewise.
6691 2004-05-22  Ben Elliston  <bje@au.ibm.com>
6693         * Makefile.am (config.status): Don't depend on version.h.
6694         * Makefile.in: Regenerate.
6696 2004-05-22  Alan Modra  <amodra@bigpond.net.au>
6698         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6699         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6700         * libbfd.h: Regenerate.
6701         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6702         (_bfd_elf_rel_local_sym): Likewise.
6703         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6704         (elf_link_input_bfd): Likewise.
6705         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6706         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6707         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6708         (elfNN_ia64_relocate_section): Likewise.
6710 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
6712         * hash.c (bfd_default_hash_table_size): New variable.
6713         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6714         (bfd_hash_set_default_size): New function.  Set the default size
6715         to a selected prime number close to the argument.  Document new
6716         function.
6717         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
6718         * bfd-in2.h: Regenerate.
6719         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6720         * Makefile.in: Regenerate.
6722 2004-05-21  Mark Kettenis  <kettenis@gnu.org>
6724         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6725         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6726         arm, m68k, m88k and hppa core files.
6728 2004-05-21  Nick Clifton  <nickc@redhat.com>
6730         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6731         (bfd_bwrite): Likewise.
6732         (bfd_tell): Likewise.
6733         (bfd_flush): Likewise.
6734         (bfd_stat): Likewise.
6735         (bfd_seek): Likewise.
6736         (bfd_get_mtime): Likewise.
6737         (bfd_get_size): Likewise.
6739 2004-05-19  Ben Elliston  <bje@au.ibm.com>
6741         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6743 2004-05-19  Mikulas Patocka  <mikulas@artax.karlin.mff.cuni.cz>
6745         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6746         (bfd_generic_openr_next_archived_file): Likewise.
6748 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
6750         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6751         section names by inserting a new substring after .gnu.linkonce, except
6752         for .gnu.linkonce.t.* where the "t." is replaced.
6754 2004-05-17  Adam Nemet  <anemet@lnxw.com>
6756         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6757         (m68-*-lynxos* case): Likewise.
6758         (powerpc-*-lyxnos* case): New case.
6759         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6761 2004-05-17  David Heine  <dlheine@tensilica.com>
6763         * aout-target.h (MY_bfd_copy_private_header_data): Define.
6764         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6765         * bfd.c (bfd_copy_private_header_data): Define.
6766         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6767         interface.
6768         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6769         * coffcode.h (coff_bfd_copy_private_header_data): Define.
6770         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6771         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6772         segments by calling copy_private_bfd_data.
6773         (_bfd_elf_copy_private_header_data): Define.
6774         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6775         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6776         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6777         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6778         * mmo.c (mmo_bfd_copy_private_header_data): Define.
6779         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6780         * som.c (som_bfd_copy_private_header_data): Define.
6781         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6782         * vms.c (vms_bfd_copy_private_header_data): Define.
6783         * bfd-in2.h: Regenerate.
6784         * libbfd.h: Regenerate.
6786 2004-05-15  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
6788         * elfxx-mips.c (MINUS_TWO): Define.
6789         (mips_elf_higher, mips_elf_highest,
6790         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6791         some bfd_vma values.
6792         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6794 2004-05-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6796         * som.c (log2): Rename to exact_log2.  Adjust all callers.
6798 2004-05-13  Paul Brook  <paul@codesourcery.com>
6800         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6801         dwarf3 format CIE entries.  Remove comment about the size of the
6802         ra_column field.  It is now correctly deduced.
6804 2004-05-13  Joel Sherrill <joel@oarcorp.com>
6806         * config.bfd (or32-*-rtems*): Switch to elf.
6808 2004-05-13  Nick Clifton  <nickc@redhat.com>
6810         * po/fr.po: Updated French translation.
6812 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
6814         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6815         into .dynsym if elf_section_data (sec)->dynindx <= 0.
6816         Adjust counting of last_local.
6817         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6818         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6819         created by the linker nor !SHF_ALLOC.
6821         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6822         DT_PLTGOT to the start of the .got.plt section instead of the
6823         .got output section.  Set sh_entsize for .got section in addition
6824         to .got.plt.
6825         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6826         is at sgot->output_section->vma.
6827         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6828         DT_PLTGOT to the start of the .got.plt section instead of the
6829         .got output section.
6830         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6831         is at sgot->output_section->vma.  Set sh_entsize for .got section
6832         in addition to .got.plt.
6833         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6834         (bfd_section_from_phdr): Likewise.
6835         (map_sections_to_segments): Likewise.
6836         (assign_file_positions_for_segments): Likewise.
6837         (get_program_header_size): Likewise.
6838         * elflink.c (bfd_elf_size_dynamic_sections): Set
6839         elf_tdata (output_bfd)->relro from info->relro.
6840         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6842 2004-05-08  Alexandre Oliva  <aoliva@redhat.com>
6844         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6845         a zero symndx for which we hadn't accounted a dynamic relocation.
6846         (_frvfdpic_add_rofixup): Likewise.
6848 2004-05-07  Brian Ford  <ford@vss.fsi.com>
6849             DJ Delorie  <dj@redhat.com>
6851         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6852         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6853         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6854         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
6856 2004-05-07  Alexandre Oliva  <aoliva@redhat.com>
6858         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6859         immediately if there's no link info.
6860         (elf32_frvfdpic_copy_private_bfd_data): New.
6861         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6863 2004-05-06  Zack Weinberg  <zack@codesourcery.com>
6865         * dwarf2.c (add_line_info): Also set info->filename to NULL if
6866         filename argument is null; do not call strlen on a null pointer.
6868 2004-05-06  Daniel Jacobowitz  <drow@mvista.com>
6870         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6871         special case.
6873 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
6875         * configure.in (bfd_elf32_frvfdpic_vec): New.
6876         * configure: Rebuilt.
6877         * targets.c (bfd_elf32_frvfdpic_vec): New.
6878         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6879         on the latter.
6880         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6881         frvfdpic instead of frv.  Rearrange elf-target macros such that
6882         the FDPIC-specific ones are only defined for this new target
6883         vector.
6884         (bfd_elf32_frvfdpic_vec): Declare.
6885         (IS_FDPIC): New.
6886         (elf32_frv_relocate_section): Use it to enable segment checking
6887         and to control rofixup emission.  Add output section vma to
6888         applied relocation in non-LOAD non-ALLOC sections.  Use
6889         _bfd_error_handler for errors.
6890         (_frv_create_got_section): Create .rel.got and .rofixup only in
6891         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6892         linker script.
6893         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6894         (elf32_frvfdpic_modify_segment_map): Likewise.
6895         (elf32_frv_finish_dynamic_sections): New, do-nothing.
6896         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
6897         error message if we miscompute the rofixup size.
6898         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6899         (frvfdpic_elf_encode_eh_address): Likewise.
6900         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6901         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
6902         relocs.  Reject unknown relocation types.
6903         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6904         (frv_elf_merge_private_bfd_data): Likewise.
6905         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6906         0x4000 for newly-added elf32-frvfdpic.
6908 2004-05-05  Nick Clifton  <nickc@redhat.com>
6910         PR/136
6911         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6912         returning NULL as most users of this function do not check its
6913         return value.
6914         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6915         of bfd_cache_lookup().
6916         * sco5-core.c (sco5_core_file_p): Likewise.
6917         * trad-core.c (trad_unix_core_file_p): Likewise.
6919 2004-05-05  Nick Clifton  <nickc@redhat.com>
6921         * cache.c (bfd_cache_lookup): Improve formatting.
6922         * archive.c: Fix formatting.
6924 2004-05-05  Peter Barada  <peter@the-baradas.com>
6926         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6927         * cpu-m68k.c(bfd_m68k_arch): Likewise.
6928         * bfd-in2.h(bfd_architecture): Regenerate.
6930 2004-05-03  Alan Modra  <amodra@bigpond.net.au>
6932         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6933         SEC_MERGE sections.
6934         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6935         those against discarded link-once and SEC_MERGE section symbols.
6937 2004-05-02  H.J. Lu  <hongjiu.lu@intel.com>
6939         * section.c (bfd_get_section_by_name_if): New.
6940         * bfd-in2.h: Regenerated.
6942 2004-05-02  Alan Modra  <amodra@bigpond.net.au>
6944         * som.c (som_bfd_is_group_section): Define.
6946 2004-05-01  Alan Modra  <amodra@bigpond.net.au>
6948         * section.c (bfd_make_section_anyway): Copy the whole
6949         bfd_hash_entry, not just "next" from existing entry.
6951 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
6953         * elf.c (bfd_section_from_shdr): Maintain the section order in
6954         a section group.
6955         (special_sections): Add ".note.GNU-stack".
6956         (elf_fake_sections): Handle section group for relocatable
6957         link..
6959 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
6961         * section.c (bfd_sections_find_if): New.
6962         * bfd-in2.h: Regenerated.
6964 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
6966         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6968         * elf-bfd.h (bfd_elf_is_group_section): Declare.
6969         * elf.c (bfd_elf_is_group_section): New function.
6970         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6971         * section.c (bfd_generic_is_group_section): New function.
6972         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6973         (BFD_JUMP_TABLE_LINK): Adjust.
6974         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6975         * aout-target.h (MY_bfd_is_group_section): Define.
6976         * aout-tic30.c (MY_bfd_is_group_section): Define.
6977         * bfd.c (bfd_is_group_section): Define.
6978         * binary.c (binary_bfd_is_group_section): Define.
6979         * bout.c (b_out_bfd_is_group_section): Define.
6980         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6981         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6982         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6983         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6984         * coffcode.h (coff_bfd_is_group_section): Define.
6985         * i386msdos.c (msdos_bfd_is_group_section): Define.
6986         * i386os9k.c (os9k_bfd_is_group_section): Define.
6987         * ieee.c (ieee_bfd_is_group_section): Define.
6988         * ihex.c (ihex_bfd_is_group_section): Define.
6989         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6990         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6991         * mmo.c (mmo_bfd_is_group_section): Define.
6992         * nlm-target.h (nlm_bfd_is_group_section): Define.
6993         * oasys.c (oasys_bfd_is_group_section): Define.
6994         * pef.c (bfd_pef_bfd_is_group_section): Define.
6995         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6996         * srec.c (srec_bfd_is_group_section): Define.
6997         * tekhex.c (tekhex_bfd_is_group_section): Define.
6998         * versados.c (versados_bfd_is_group_section): Define.
6999         * vms.c (vms_bfd_is_group_section): Define.
7000         * xsym.c (bfd_sym_bfd_is_group_section): Define.
7001         * bfd-in2.h: Regenerate.
7002         * libbfd.h: Regenerate.
7004 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
7006         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7008 2004-04-30  Hans-Peter Nilsson  <hp@axis.com>
7010         * configure.in: Update version to 2.15.91.
7011         * configure: Regenerate.
7013 2004-04-29  Brian Ford  <ford@vss.fsi.com>
7015         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7016         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7017         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7018         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7019         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7020         .gnu.linkonce.wi. sections.
7021         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7022         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7023         .gnu.linkonce.wi..
7024         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7025         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7027 2004-04-28  Chris Demetriou  <cgd@broadcom.com>
7029         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7030         * bfd-in2.h: Regenerate.
7031         * libbfd.h: Likewise.
7033 2004-04-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7035         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7036         dup_common fields.
7037         (setup_sections): Use som_subspace_dictionary_record struct instead
7038         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
7039         is_comdat, is_common or dup_common.
7040         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
7041         is_comdat, is_common and dup_common in section subspace_dict from
7042         copy_data.
7043         (som_begin_writing): Use som_subspace_dictionary_record struct.
7044         (som_finish_writing): Likewise.
7045         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7046         is_common and dup_common flags in info for symbol.  Add comment
7047         regarding linker support for these fields.  Slightly reorganize
7048         function.
7049         (som_build_and_write_symbol_table): Set is_comdat, is_common and
7050         dup_common fields in symbol table from symbol info.
7051         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7052         arguments.  Set corresponding fields in copy_data.  Change all callers.
7053         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7054         symbol table.
7055         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7056         * som.h (som_subspace_dictionary_record): Define.
7057         (som_copyable_section_data_struct): Add is_comdat, is_common and
7058         dup_common fields.
7059         (som_section_data_struct): Use som_subspace_dictionary_record struct
7060         instead of subspace_dictionary_record.
7061         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7063 2004-04-27  Bob Wilson  <bob.wilson@acm.org>
7065         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7066         if set.  Check reloc_done flag before applying relocations.  Use
7067         output addresses, both when applying relocations and when comparing
7068         against the specified section.
7069         (elf_xtensa_relocate_section): Use output address to check if dynamic
7070         reloc is in a literal pool.  Set section's reloc_done flag.
7072 2004-04-27  H.J. Lu  <hongjiu.lu@intel.com>
7074         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7075         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7076         section.
7077         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7078         section.
7080 2004-04-27  Alan Modra  <amodra@bigpond.net.au>
7082         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7083         structure field removed in 2004-04-24 patch.
7084         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7086         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7087         Constify hdr arg.
7088         * elf32-arm.h (elf32_arm_section_flags): Likewise.
7089         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7090         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7091         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7092         field before calling elf_backend_section_flags.
7094 2004-04-24  Chris Demetriou  <cgd@broadcom.com>
7096         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7097         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7098         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7099         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7100         and BFD_RELOC_32_PCREL.
7101         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7102         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7103         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7104         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7105         (mips_elf_next_relocation): Move comment about matching HI/LO
7106         relocations to...
7107         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
7108         R_MIPS_GNU_REL_HI16.
7110 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7112         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7113         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7114         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7115         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7116         and update comments to reflect current usage.
7117         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7118         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
7119         for MIPS_R_PCREL16.
7120         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7121         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7122         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7123         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7124         type number to be MIPS_R_PCREL16.
7125         (mips_relocate_section): Remove support for link-time relaxation
7126         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
7127         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7128         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7129         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7130         relaxation of branches used by embedded-PIC.
7131         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7132         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7133         related members, update comment.
7134         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7135         code related to embedded-PIC.
7136         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7137         initialization of now-removed 'adjust' member of
7138         'struct ecoff_debug_info'.
7140 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7142         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7144 2004-04-21  Philip Blundell  <pb@nexus.co.uk>
7146         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7147         relocs for locally defined symbols during -shared final link.
7148         (elf32_arm_final_link_relocate): Likewise.
7150 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7152         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7153         ELF_LINK_POINTER_EQUALITY_NEEDED.
7154         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7155         if r_type is not R_X86_64_PC32.
7156         (elf64_x86_64_finish_dynamic_symbol): If
7157         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7158         SHN_UNDEF symbols.
7160 2004-04-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7162         * elf32-sh.c (sh_elf_plt_sym_val): New function.
7163         (elf_backend_plt_sym_val): Define.
7165 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7167         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7169 2004-04-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7171         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7172         make_bfd_asection.
7173         * som.c (som_set_section_contents): Constantify second argument.
7174         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7175         (som_object_setup): Rework to avoid warning.
7176         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7177         Likewise.
7179 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7181         * cache.c (bfd_cache_close): Check for a previously closed file.
7183 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7185         * bfd.c (bfd_get_synthetic_symtab): Define.
7186         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7187         NAME##_get_synthetic_symtab.
7188         (struct bfd_target): Add _bfd_get_synthetic_symtab.
7189         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7190         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7191         relplt_name fields.
7192         (_bfd_elf_get_synthetic_symtab): New prototype.
7193         * elfcode.h (elf_get_synthetic_symtab): Define.
7194         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7195         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7196         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7197         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7198         * bfd-in2.h: Rebuilt.
7199         * libbfd.h: Rebuilt.
7200         * elf32-i386.c (elf_i386_plt_sym_val): New function.
7201         (elf_backend_plt_sym_val): Define.
7202         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7203         (elf_backend_plt_sym_val): Define.
7204         * elf32-s390.c (elf_s390_plt_sym_val): New function.
7205         (elf_backend_plt_sym_val): Define.
7206         * elf64-s390.c (elf_s390_plt_sym_val): New function.
7207         (elf_backend_plt_sym_val): Define.
7208         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7209         (elf_backend_plt_sym_val): Define.
7210         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7211         (elf_backend_plt_sym_val): Define.
7212         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7213         (elf_backend_plt_sym_val): Define.
7214         * aout-target.h (MY_get_synthetic_symtab): Define.
7215         * aout-tic30.c (MY_get_synthetic_symtab): Define.
7216         * coff-rs6000.c (rs6000coff_vec): Add
7217         _bfd_nodynamic_get_synthetic_symtab.
7218         (pmac_xcoff_vec): Likewise.
7219         * coff64-rs6000.c (rs6000coff64_vec): Add
7220         _bfd_nodynamic_get_synthetic_symtab.
7221         (aix5coff64_vec): Likewise.
7222         * sunos.c (MY_get_synthetic_symtab): Define.
7223         * vms.c (vms_get_synthetic_symtab): Define.
7225 2004-04-22  Nick Clifton  <nickc@redhat.com>
7227         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7229 2004-04-22  Peter Barada <peter@the-baradas.com>
7231         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7232         * bfd2-in.h: Regenerate.
7233         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7235 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
7237         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7238         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7239         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7240         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7241         * bfd-in2.h: Regenerate.
7243 2004-04-21  Bob Wilson  <bob.wilson@acm.org>
7245         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7246         require relocations against a weak symbol to reference the same
7247         symbol hash entry if not a final, static link.
7248         (get_cached_value, add_value_map): Add final_static_link argument.
7249         (remove_literals): Pass final_static_link argument as needed.
7251 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7253         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7254         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7255         (opncls_bwrite, opncls_bclose, opncls_bflush)
7256         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7257         bfd iovec that uses function callbacks.
7258         (bfd_close): Use the iovec's bclose.
7259         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7260         (cache_bclose, cache_bflush, cache_bstat)
7261         (cache_iovec): New functions and global variable, implement a
7262         cache "iovec", where applicable set bfd_error.
7263         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7264         * bfdio.c (struct bfd_iovec): Define.
7265         (real_read): Delete function.
7266         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7267         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7268         assume that bread and bwrite set bfd_error.
7269         * bfd.c (struct bfd): Add "iovec", update comments.
7270         * bfd-in2.h, libbfd.h: Re-generate.
7272 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7274         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7276 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
7278         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7279         (bfd_elf_gc_sections): Fail if a shared object is being created.
7280         Do not fail if dynamic sections have been created.  Instead call
7281         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7282         dynamically referenced symbols.  Do not mark the whole graph
7283         rooted at .eh_frame, only the section proper.
7285 2004-04-20  DJ Delorie  <dj@redhat.com>
7287         * reloc.c: Add BFD_RELOC_32_SECREL.
7288         * bfd-in2.h: Regenerate.
7289         * libbfd.h: Likewise.
7290         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7291         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7292         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7294 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
7296         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7297         relocs against hidden/protected undefweak symbols properly.
7298         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7300 2004-04-18  Mark Kettenis  <kettenis@gnu.org>
7302         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7303         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7304         core files.
7306 2004-04-17  Brian Ford  <ford@vss.fsi.com>
7308         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7309         filepos for the SizeOfHeaders field.
7310         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7311         overflow.
7312         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7314 2004-04-16  Alan Modra  <amodra@bigpond.net.au>
7316         * simple.c (bfd_simple_get_relocated_section_contents): Don't
7317         change reloc_done.  Set and restore _cooked_size.
7318         (RETURN): Delete.
7320 2004-04-15  Mark Kettenis  <kettenis@gnu.org>
7322         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7323         core files.
7325 2004-04-15  Nick Clifton  <nickc@redhat.com>
7327         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7329 2004-04-15  Alan Modra  <amodra@bigpond.net.au>
7331         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7333 2004-04-15  H.J. Lu  <hongjiu.lu@intel.com>
7335         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7336         when it is a definition.
7338 2004-04-14  Alan Modra  <amodra@bigpond.net.au>
7340         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7341         when statically linking PIC code.
7342         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7344 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
7346         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7347         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7348         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7349         * configure: Regenerate.
7351 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
7353         * elflink.c: Include libiberty.h.
7354         * Makefile.am (elflink.lo): Depend on libiberty.h.
7355         * Makefile.in: Regenerate.
7357 2004-04-06  Daniel Jacobowitz  <drow@mvista.com>
7359         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7360         ".MIPS.stubs".
7362 2004-04-05  H.J. Lu  <hongjiu.lu@intel.com>
7364         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7365         reserve the memory for dynamic linker
7367 2004-04-05  Mark Kettenis  <kettenis@gnu.org>
7369         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7370         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7372 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
7374         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7375         RELOC_FOR_GLOBAL_SYMBOL.
7376         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7378 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
7380         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7381         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7383 2004-04-01  Paul Brook  <paul@codesourcery.com>
7385         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7386         * elf32-arm.h (struct elf32_elf_section_map): New.
7387         (struct _arm_elf_section_data): New.
7388         (elf32_arm_section_data): Define.
7389         (struct elf32_arm_link_hash_table): Add byteswap_code.
7390         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7391         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7392         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7393         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7394         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7395         (bfd_elf32_new_section_hook, elf_backend_write_section,
7396         elf_backend_link_output_symbol_hook): Define.
7398 2004-04-01  Andy Chittenden  <achittenden@bluearc.com>
7400         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7401         that keeps the characters in a B_INCL..B_EINCL range.
7402         (_bfd_link_section_stabs): When computing the sum of the
7403         characters in a B_INCL..B_EINCL range also keep a copy of those
7404         characters.  Use this information to distinguish between
7405         include sections that have the same sum and the same length
7406         but which are nevertheless unique.
7408 2004-03-31  Paul Brook  <paul@codesourcery.com>
7410         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7411         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7413 2004-03-31  Andy Chittenden <achittenden@bluearc.com>
7415         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7416         to 'sum_chars' and add field 'num_chars'.
7417         (_bfd_link_section_stabs): When computing the sum of the
7418         characters in a B_INCL..B_EINCL range also keep a count of the
7419         number of characters.  Use this information to help distinguish
7420         between include sections when have the same sum but which
7421         nevertheless are still unique.
7423 2004-03-31  Mattias EngdegÃ¥rd  <mattias@virtutech.se>
7425         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7427 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
7428             Tomer Levi    <Tomer.Levi@nsc.com>
7430         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7431         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7432         (BFD32_BACKENDS): Add elf32-cr16c.lo.
7433         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7434         (cpu-cr16c.lo): New target.
7435         (elf32-cr16c.lo): Likewise.
7436         * Makefile.in: Regenerate.
7437         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7438         (bfd_archures_list): Add bfd_cr16c_arch.
7439         * config.bfd: Handle cr16c-*-elf*.
7440         * configure.in: Handle bfd_elf32_cr16c_vec.
7441         * configure: Regenerate.
7442         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7443         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7444         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7445         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7446         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7447         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7448         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7449         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7450         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7451         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7452         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7453         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7454         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7455         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7456         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7457         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7458         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7459         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7460         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7461         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7462         * targets.c (bfd_elf32_cr16c_vec): Declare.
7463         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7464         * cpu-cr16c.c: New file.
7465         * elf32-cr16c.c: Likewise.
7466         * libbfd.h: Regenerate.
7467         * bfd-in2.h: Likewise.
7469 2004-03-30  Jakub Jelinek  <jakub@redhat.com>
7471         * elf.c (map_sections_to_segments): Fix handling of .tbss.
7473 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
7475         * Makefile.am: Remove all mention of elflink.h.
7476         * Makefile.in: Regenerate.
7477         * bfd-in.h (bfd_elf_discard_info): Declare.
7478         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7479         * bfd-in2.h: Regenerate.
7480         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7481         bfd_elf32_link_record_dynamic_symbol,
7482         bfd_elf64_link_record_dynamic_symbol,
7483         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7484         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7485         _bfd_elf32_link_record_local_dynamic_symbol,
7486         _bfd_elf64_link_record_local_dynamic_symbol,
7487         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7488         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7489         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7490         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7491         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7492         _bfd_elf32_reloc_symbol_deleted_p,
7493         _bfd_elf64_reloc_symbol_deleted_p): Delete.
7494         (bfd_elf_link_record_dynamic_symbol,
7495         bfd_elf_link_record_local_dynamic_symbol,
7496         bfd_elf_final_link, bfd_elf_gc_sections,
7497         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7498         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7499         bfd_elf_reloc_symbol_deleted_p): Declare.
7500         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7501         * elf32-arm.h: Update for changed function names.  Remove local
7502         WILL_CALL_FINISH_DYNAMIC_SECTION define.
7503         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7504         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7505         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7506         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7507         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7508         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7509         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7510         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7511         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7512         (bfd_elfNN_print_symbol): Define.
7513         * elfcode.h: Don't include elflink.h.
7514         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7515         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7516         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7517         elf_gc_record_vtinherit, elf_gc_record_vtentry,
7518         elf_link_record_local_dynamic_symbol): Don't define.
7519         * elflink.c: Update for changed function names.  Move elflink.h
7520         code here.
7521         * elflink.h: Delete file.
7522         * po/SRC-POTFILES.in: Regenerate.
7523         * po/bfd.pot: Regenerate.
7525 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
7527         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7528         "name" for global syms accidentally removed in 2004-03-20 change.
7530 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
7532         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7533         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7534         where Elf_External_* is different for 64 and 32 bit, with
7535         corresponding elf_size_info field.
7536         (struct elf_final_link_info): Use "bfd_byte *" instead
7537         of "Elf_External_Sym *" for external_syms and symbuf.
7538         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7539         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7540         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7541         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7542         (elf_link_sort_cmp2): Adjust.
7543         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7544         using ELF_R_SYM macro.  Set u.sym_mask.
7545         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7546         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
7547         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
7548         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
7549         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
7550         swap_syn_out functions.  Rearrange dyn swap in/out switch.
7551         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7552         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
7553         (elf_link_flush_output_syms): Add elf_backend_data arg.
7554         (elf_link_check_versioned_symbol): Likewise.
7555         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7556         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
7557         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
7558         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7559         ELF_R_TYPE and ELF_R_INFO macros.
7560         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7561         based on size rather than using ELF_R_INFO.
7562         (elf_gc_mark): Set up r_sym_shift local var and use instead of
7563         ELF_R_SYM macro.
7564         (struct alloc_got_off_arg): New.
7565         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7566         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
7567         (elf_gc_allocate_got_offsets): Adjust.
7568         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7569         ELF_R_SYM.  Use bfd_section_from_elf_index.
7570         (elf_bfd_discard_info): Set cookie.r_sym_shift.
7571         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7572         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7574 2004-03-26  Stan Shebs  <shebs@apple.com>
7576         Remove MPW support, no longer used.
7577         * config.bfd (powerpc-*-mpw*): Remove configuration.
7578         * mpw-config.in, mpw-make.sed: Remove files.
7579         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7581 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
7583         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7584         (ppc64_elf_add_symbol_hook): New function.
7585         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7586         const from Elf_Internal_Sym param.
7587         * elflink.c (elf_link_add_object_symbols): Adjust.
7588         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7589         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7590         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7591         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7592         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7593         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7594         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7595         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7596         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7597         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7598         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7599         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7600         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7601         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7602         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7603         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7605 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
7607         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7608         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7609         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7610         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7611         (bfd_elf64_bfd_link_add_symbols): Delete.
7612         (bfd_elf_link_add_symbols): Declare.
7613         * elfcode.h (elf_bfd_link_add_symbols): Delete.
7614         * elflink.c: Include safe-ctype.h.
7615         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7616         make static.
7617         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7618         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7619         static.
7620         (elf_link_add_archive_symbols): Rename from
7621         _bfd_elf_link_add_archive_symbols, make static.
7622         (elf_link_add_object_symbols): New function.  Corresponding
7623         elflink.h function converted to use elf_size_info.
7624         (bfd_elf_link_add_symbols): Likewise.
7625         (bfd_elf_size_dynamic_sections): Adjust.
7626         * elflink.h (elf_bfd_link_add_symbols): Delete.
7627         (elf_link_add_object_symbols): Delete.
7628         * elf32-gen.c (elf32_generic_link_add_symbols): Call
7629         bfd_elf_link_add_symbols.
7630         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7632 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
7634         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7635         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
7637         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7638         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7639         (_bfd_elf_add_dt_needed_tag): Declare.
7640         (_bfd_elf_sort_symbol): Declare.
7641         (_bfd_elf_finalize_dynstr): Declare.
7642         (RELOC_FOR_GLOBAL_SYM): Formatting.
7643         * elfcode.h (elf_add_dynamic_entry): Delete.
7644         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
7645         elflink.h function converted to use elf_size_info.
7646         (_bfd_elf_add_dt_needed_tag): Likewise.
7647         (_bfd_elf_sort_symbol): Likewise.
7648         (_bfd_elf_finalize_dynstr): Likewise.
7649         (compute_bucket_count): Likewise.
7650         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
7651         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7652         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7653         * elflink.h: ..here.
7654         (sort_symbol, add_dt_needed_tag): Delete.
7655         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7656         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7657         Update all users.
7658         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
7659         * elf32-cris.c (add_dynamic_entry): Likewise.
7660         * elf32-hppa.c (add_dynamic_entry): Likewise.
7661         * elf32-i370.c (add_dynamic_entry): Likewise.
7662         * elf32-i386.c (add_dynamic_entry): Likewise.
7663         * elf32-m32r.c (add_dynamic_entry): Likewise.
7664         * elf32-m68k.c (add_dynamic_entry): Likewise.
7665         * elf32-ppc.c (add_dynamic_entry): Likewise.
7666         * elf32-s390.c (add_dynamic_entry): Likewise.
7667         * elf32-sh.c (add_dynamic_entry): Likewise.
7668         * elf32-sparc.c (add_dynamic_entry): Likewise.
7669         * elf32-vax.c (add_dynamic_entry): Likewise.
7670         * elf32-xtensa.c (add_dynamic_entry): Likewise.
7671         * elf64-alpha.c (add_dynamic_entry): Likewise.
7672         * elf64-hppa.c (add_dynamic_entry): Likewise.
7673         * elf64-ppc.c (add_dynamic_entry): Likewise.
7674         * elf64-s390.c (add_dynamic_entry): Likewise.
7675         * elf64-sparc.c (add_dynamic_entry): Likewise.
7676         * elf64-x86-64.c (add_dynamic_entry): Likewise.
7677         * elfxx-ia64.c (add_dynamic_entry): Likewise.
7678         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7679         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7680         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7681         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7683 2004-03-23  Paul Brook  <paul@codesourcery.com>
7685         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7687 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
7689         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7690         literal tables and check for relocs outside of literal pools.
7691         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7692         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7693         set DF_TEXTREL.
7694         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7695         (elf_xtensa_relocate_section): Read literal tables and check for
7696         dynamic relocations in read-only sections and not in literal pools.
7698 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
7700         PR 51.
7701         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7703 2004-03-22  Hans-Peter Nilsson  <hp@axis.com>
7705         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7706         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7707         not defined by the executable, or defined in a DSO.
7708         <eliding run-time relocation of .got>: Initialize GOT entry for a
7709         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7710         executable.
7711         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7712         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
7713         a PLT reloc to GOT for an executable.
7714         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7715         .got for a DSO and explain why.
7716         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7717         and unreferenced symbols for which a PLT is defined.  Adjust
7718         dynamic-symbol pruning correspondingly, to make sure we don't lose
7719         a dynamic symbol also defined by a DSO.
7721 2004-03-22  Alan Modra  <amodra@bigpond.net.au>
7723         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7724         and rel args.  Group input and output args.  Wrap to 80 columns.
7725         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7726         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7727         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7728         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7729         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7730         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7731         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7732         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7733         RELOC_FOR_GLOBAL_SYMBOL invocation.
7735 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
7737         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7738         unresolved symbols in objects aren't allowed.
7740         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7741         unresolved symbols.
7742         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7743         (elf_hppa_unmark_useless_dynamic_symbols):
7744         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7745         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7746         (elf32_hppa_relocate_section): Likewise.
7747         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7748         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7749         * elf32-sh.c (sh_elf_relocate_section): Likewise.
7750         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7751         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7753         * elf-m10200.c (mn10200_elf_relocate_section): Use
7754         RELOC_FOR_GLOBAL_SYMBOL.
7755         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7756         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7757         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7758         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7759         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7760         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7761         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7762         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7763         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7764         * elf32-v850.c (v850_elf_relocate_section): Likewise.
7765         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7766         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7768 2004-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7770         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7771         (final_link_relocate): Likewise.
7772         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7773         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7775 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
7777         * Makefile.am: Run "make dep-am".
7778         * Makefile.in: Regenerate.
7779         * aclocal.m4: Regenerate.
7780         * config.in: Regenerate.
7781         * po/bfd.pot: Regenerate.
7783 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
7784             H.J. Lu  <hongjiu.lu@intel.com>
7786         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
7787         type and size change code to where it was previously.  Remove
7788         dt_needed param.  Treat old weak syms as strong if new sym is
7789         from a shared lib, even when old sym is from another shared
7790         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
7791         comments.
7792         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
7793         _bfd_elf_merge_symbol calls.
7794         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
7795         dt_needed local var.  Update comments.
7796         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7797         (_bfd_elf_add_default_symbol): Likewise.
7799         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7800         strong syms in one shared object overriding weak syms in another.
7802 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
7804         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
7805         dyn_lib_class field.  Rearrange for better packing.
7806         (elf_dt_soname): Delete.
7807         (elf_dyn_lib_class): Define.
7808         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7809         (bfd_elf_set_dt_needed_soname): Delete.
7810         (bfd_elf_set_dyn_lib_class): New function.
7811         * elflink.h (add_dt_needed_tag): New function.  Split out from..
7812         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
7813         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
7814         initialization of soname.
7815         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7816         elf_dt_soname.
7817         * bfd-in.h (enum dynamic_lib_link_class): New.
7818         (bfd_elf_set_dt_needed_soname): Delete.
7819         (bfd_elf_set_dyn_lib_class): Declare.
7820         * bfd-in2.h: Regenerate.
7822         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7823         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7824         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7825         symbol loop.  Instead use add_needed to flag tag as written.
7827 2004-03-17  Nathan Sidwell  <nathan@codesourcery.com>
7829         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7830         logic for null_input_bfd detection.
7832 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7834         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
7836 2004-03-16  Mark Kettenis  <kettenis@gnu.org>
7838         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7839         code.
7841 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
7843         * elflink.c (elf_link_read_relocs_from_section): Don't use
7844         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
7845         (_bfd_elf_link_read_relocs): ..to here.
7846         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7848 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
7850         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7851         values selected in configure.host.  Require both to be defined
7852         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
7853         corresponding BFD_HOST vars with quotes.
7854         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7855         Always require BFD_HOST_64_BIT_DEFINED.
7856         <file_ptr type>: Find off_t size before emitting message.  Combine
7857         off_t and ftello64 conditional.
7858         * configure: Regenerate.
7860 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
7862         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7863         aliasing warning.  Remove trailing whitespace throughout file.
7865 2004-03-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7867         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7868         input_section in calls to get_dyn_name.
7869         * 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
7870         local symbols.
7871         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7873 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
7875         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7876         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7877         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7878         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7879         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7880         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7881         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7882         when using long.
7883         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7884         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
7885         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7886         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
7887         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7888         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7889         (read_8_bytes, read_indirect_string, read_address): Likewise.
7890         (read_abbrevs, parse_comp_unit): Likewise.
7891         * targets.c (struct bfd_target): Likewise.
7892         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7893         * hppabsd-core.c: Likewise.  Formatting.
7894         * hpux-core.c: Likewise.
7895         * irix-core.c: Likewise.
7896         * netbsd-core.c: Likewise.
7897         * osf-core.c: Likewise.
7898         * ptrace-core.c: Likewise.
7899         * sco5-core.c: Likewise.
7900         * trad-core.c: Likewise.
7901         * configure: Regenerate.
7902         * bfd-in2.h: Regenerate.
7904 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
7906         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7907         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7908         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7909         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7910         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7911         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7912         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7913         * libbfd.c: Likewise in function definitions.
7914         (bfd_put_8): Mask with 0xff rather than casting to char.
7915         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7916         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7917         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7918         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7919         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7920         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7921         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7922         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7923         (H_GET_64, H_GET_32, H_GET_16): Likewise.
7924         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7925         * archive.c (do_slurp_coff_armap): Update swap prototype.
7926         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7927         (tic54x_getl_signed_32): Likewise.
7928         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
7929         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7930         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7931         (bfd_getp_signed_32, bfd_putp32): Likewise.
7932         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7933         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7934         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7935         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7936         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7937         bfd_h_getx_signed_16, bfd_h_putx16.
7938         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7939         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
7940         * hpux-core.c: Likewise.
7941         * irix-core.c: Likewise.
7942         * netbsd-core.c: Likewise.
7943         * osf-core.c: Likewise.
7944         * ptrace-core.c: Likewise.
7945         * sco5-core.c: Likewise.
7946         * trad-core.c: Likewise.
7947         * bfd-in2.h: Regenerate.
7949 2004-03-15  Matt Thomas  <matt@3am-software.com>
7951         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7952         selected.
7954 2004-03-13  Mark Kettenis  <kettenis@gnu.org>
7956         * config.bfd: Add x86_64-*-openbsd*.
7957         * configure.in (x86_64-*-openbsd*): Set COREFILE to
7958         netbsd-core.lo.
7959         * configure: Regenerate.
7961 2004-03-12  Nick Clifton  <nickc@redhat.com>
7962             Dave Murphy  <wintermute2k4@ntlworld.com>
7964         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7965         if the input bfd does not contain any code.
7967 2004-03-09  Steve Ellcey  <sje@cup.hp.com>
7969         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7971 2004-03-05  Fred Fish  <fnf@redhat.com>
7973         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7974         mips16 symbols to be even rather than testing first for even/odd.
7975         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7977 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
7979         * elf.c (map_sections_to_segments): Ignore .tbss sections for
7980         layout purposes.
7982 2004-03-03  Alexandre Oliva  <aoliva@redhat.com>
7984         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7985         undefined symbols as hash_new.
7987 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
7989         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7990         * cpu-sh.c: Ditto.
7991         * elf32-sh.c: Ditto.
7992         * bfd-in2.h: Regenerate.
7994 2004-03-02  Alexandre Oliva  <aoliva@redhat.com>
7996         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7997         dynrelocs.
7998         (_frv_count_got_plt_entries): Initialize them.
7999         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
8000         callers.
8001         (frv_pic_relocs_info_for_global): Likewise.
8002         (frv_pic_relocs_info_for_local): Likewise.
8003         (frv_pic_merge_early_relocs_info): New.
8004         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8005         another.
8006         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
8007         Check that we don't exceed the allocated count for entry.
8008         (_frv_add_rofixup): Likewise.
8009         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8010         (elf32_frv_finish_dynamic_sections): Improve error message in case
8011         we emit too few rofixup entries.
8013 2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
8015         * archures.c (bfd_mach_fr450): New.
8016         * bfd-in2.h: Regenerate.
8017         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8018         (arch_info_500): Link to it.
8019         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8020         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8021         (frv_elf_arch_extension_p): New function.
8022         (frv_elf_merge_private_bfd_data): Use it.
8024 2004-02-28  H.J. Lu  <hongjiu.lu@intel.com>
8026         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8028         * elflink.h (is_global_data_symbol_definition): Moved to
8029         elflink.c.
8030         (elf_link_is_defined_archive_symbol): Likewise.
8031         (elf_link_add_archive_symbols): Likewise. Renamed to
8032         _bfd_elf_link_add_archive_symbols.
8034         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8035         of ELF symbol table entry from backend.
8036         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8037         instead of elf_link_add_object_symbols.
8039 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8041         * elf-bfd.h (struct elf_backend_data): Added
8042         elf_backend_can_make_relative_eh_frame,
8043         elf_backend_can_make_lsda_relative_eh_frame and
8044         elf_backend_encode_eh_address.
8045         (_bfd_elf_encode_eh_address): Declare.
8046         (_bfd_elf_can_make_relative): Declare.
8047         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8048         hooks to decide whether to attempt to make_relative and
8049         make_lsda_relative.
8050         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8051         (_bfd_elf_can_make_relative): New.
8052         (_bfd_elf_encode_eh_address): New.
8053         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8054         (frv_elf_encode_eh_address): New.
8055         (elf_backend_can_make_relative_eh_frame): Define.
8056         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8057         (elf_backend_encode_eh_address): Define.
8058         * elfxx-target.h
8059         (elf_backend_can_make_relative_eh_frame): Define.
8060         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8061         (elf_backend_encode_eh_address): Define.
8062         (elfNN_bed): Add them.
8064 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8066         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8067         complain_on_overflow to signed.
8069 2004-02-27  H.J. Lu  <hongjiu.lu@intel.com>
8071         * elflink.h (sort_symbol): New.
8072         (elf_link_add_object_symbols): Use a sorted symbol array for
8073         weakdef.
8075 2004-02-27  Jakub Jelinek  <jakub@redhat.com>
8077         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8078         for pc relative relocs.
8079         (elf_s390_relocate_section): Likewise.
8080         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8081         for pc relative relocs.
8082         (elf_s390_relocate_section): Likewise.
8084 2004-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8086         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8087         count_dyn_reloc.
8089 2004-02-25  H.J. Lu  <hongjiu.lu@intel.com>
8091         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8092         field to track if a relocation is against readonly section.
8093         (count_dyn_reloc): Take a new argument for rent->reltext.
8094         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8095         (get_reloc_section): Don't set ia64_info->reltext here.
8096         (allocate_dynrel_entries): Set ia64_info->reltext here.
8098 2004-02-24  Alexandre Oliva  <aoliva@redhat.com>
8100         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8101         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8102         function's descriptor to symbol+offset, and map local undefweak
8103         symbol to NULL function descriptor.
8104         (elf32_frv_relocate_section): Likewise.
8106 2004-02-23  Mark Kettenis  <kettenis@gnu.org>
8108         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8109         M_X86_64_NETBSD.
8110         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8111         (netbsd_core_file_p): Set architecture from machine ID for
8112         selected machines.
8114 2004-02-23  Jakub Jelinek  <jakub@redhat.com>
8116         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8117         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8119 2004-02-21  H.J. Lu  <hongjiu.lu@intel.com>
8121         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8122         symbols with non-default visibility.
8124 2004-02-21  Danny Smith  <daanysmith@users.sourceforge.net>
8126         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8127         IMAGE_SCN_MEM_WRITE on known sections only.
8129 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
8131         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8132         symbols used in PIE relocs.
8134 2004-02-19  Jakub Jelinek  <jakub@redhat.com>
8136         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8137         .plt sh_entsize.
8139 2004-02-18  Daniel Jacobowitz  <drow@mvista.com>
8141         * configure.in: Update version to 2.15.90.
8142         * configure: Regenerate.
8144 2004-02-17  Daniel Jacobowitz  <drow@mvista.com>
8145             Richard Sandiford  <rsandifo@redhat.com>
8147         * elfxx-mips.c (mips_elf_calculate_relocation): Use
8148         _bfd_elf_symbol_refs_local_p to decide whether to decay
8149         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8150         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8151         relocs if the symbol wasn't defined by a regular object file.
8152         Don't check the symbol's dynindx.
8154 2004-02-16  Andrew Cagney  <cagney@redhat.com>
8156         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8157         @bfd_file_ptr@.
8158         * bfd-in2.h: Re-generate.
8160 2004-02-14  Andrew Cagney  <cagney@redhat.com>
8162         * configure.host (HDEFINES): When hppa*-*-hpux*, define
8163         _LARGEFILE64_SOURCE.
8165 2004-02-13  Andrew Cagney  <cagney@redhat.com>
8167         * elf.c (vma_page_aligned_bias): New function.
8168         (assign_file_positions_except_relocs)
8169         (assign_file_positions_for_segments): Replace broken modulo
8170         arithmetic with call to vma_page_aligned_bias.
8172 2004-02-11  Andrew Cagney  <cagney@redhat.com>
8174         * bfd-in.h: Update copyright.
8175         (bfd_tell): Change return type to file_ptr.
8176         * bfd-in2.h: Re-generate.
8177         * cache.c: Update copyright.
8178         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8179         parameter.
8180         (close_one): Use real_ftell.
8181         * bfdio.c: Update copyright.
8182         (real_ftell, real_fseek): New functions.
8183         (bfd_tell): Use real_fseek and real_ftell, change return type to
8184         file_ptr.
8185         (bfd_seek): Use real_ftell and real_fseek, change type of
8186         file_position to a file_ptr.
8187         * libbfd-in.h: Update copyright.
8188         (real_ftell, real_fseek): Declare.
8189         * libbfd.h: Re-generate.
8191         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8192         fseeko and fseeko64.  Determine bfd_file_ptr.
8193         * configure: Re-generate.
8194         * config.in: Re-generate.
8196 2004-02-09  Anil Paranjpe  <anilp1@KPITCummins.com>
8198         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8199         * elf32-h8300.c: Likewise.
8201 2004-02-09  Christian Vogel <vogelchr@vogel.cx>
8202             Nick Clifton  <nickc@redhat.com>
8204         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8205         GOT entries with no associated GOT subsection.
8207 2004-02-09  Richard Sandiford  <rsandifo@redhat.com>
8209         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8210         * elf.c (swap_out_syms): Use it to decide whether local section
8211         symbols should be named.
8212         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8213         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8214         (elf_backend_name_local_section_symbols): Define.
8215         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8217 2004-01-30  H.J. Lu  <hongjiu.lu@intel.com>
8219         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8220         (elfNN_ia64_relax_section): Optimize brl to br during the relax
8221         finalize pass.
8223 2004-01-30  Alexandre Oliva  <aoliva@redhat.com>
8225         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8226         to bfd_link_hash_entry passed by reference to
8227         _bfd_generic_link_add_one_symbol.
8229 2004-01-25  H.J. Lu  <hongjiu.lu@intel.com>
8231         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8232         relocations against dynamic symbols.
8234 2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
8236         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8237         change.
8239 2004-01-21  Tom Rix  <tcrix@worldnet.att.net>
8241         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8242         * bfd-in2.h, libbfd.h: Rebuilt.
8244 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
8246         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8247         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8248         flag has been cleared.
8250 2004-01-19  Kazu Hirata  <kazu@cs.umass.edu>
8252         * coff-h8300.c: Add and adjust comments about relaxation.
8253         * elf32-h8300.c: Likewise.
8255 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8257         * coff-h8300.c: Fix comment typos.
8258         * elf32-h8300.c: Likewise.
8260 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8262         * coff-h8300.c: Add comments about relaxation.
8263         * elf32-h8300.c: Likewise.
8265 2004-01-14  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8267         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8268         throughout.
8269         * aclocal.m4: Regenerate.
8270         * configure: Regenerate.
8272 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8274         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8275         mips_elf64_rtype_to_howto instead of using howto_table.
8277 2004-01-13  Daniel Jacobowitz  <drow@mvista.com>
8279         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8280         the .plt section.
8281         (elf32_arm_check_relocs): Don't increment the PLT refcount for
8282         relocs which would not use the PLT.
8284 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
8286         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8287         (ppc64_elf_gc_sweep_hook): Likewise.
8288         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8290 2004-01-12  Anil Paranjpe  <anilp1@KPITCummins.com>
8292         Adds linker relaxation support for bit manipulation insns like
8293         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8294         bst, btst, bxor.
8295         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8296         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8297         * coff-h8300.c: Opcode for bit manipulation insn is checked in
8298         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8300 2004-01-12  Alan Modra  <amodra@bigpond.net.au>
8302         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8304 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8306         * elf32-h8300.c: Fix formatting.
8308 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8310         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8311         dynamic object is present.  Declare r_symndx and h in an inner
8312         scope.
8313         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8315 2004-01-09  Daniel Jacobowitz  <drow@mvista.com>
8317         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8318         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8319         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8320         identically.  Do not emit PC24 relocations for shared libraries.
8321         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8322         identically.  Don't adjust pc_count.
8323         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8324         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
8325         adjust count for branch relocations.
8326         (allocate_dynrelocs): Correct typo in call to
8327         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
8328         PC24 or PLT32 relocs when linking.
8330 2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8332         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8333         relocation howto with ARM_26 one for consistency.
8334         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8335         that will be converted to ARM_26D ones, since we always want 'done'
8336         relocations to be reflected in section's data.
8337         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8338         offset.
8339         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8340         requested.
8342 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8344         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8345         are not partial_inplace during a relocatable link.
8347 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
8349         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8350         if no dynamic object is present.  Declare r_symndx and h in an
8351         inner scope.
8353 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
8355         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8356         trampoline if it is known out of range.
8358 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
8360         2003-12-17  Alexandre Oliva  <aoliva@redhat.com>
8361         * elf32-frv.c (_frv_osec_readonly_p): New.
8362         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8363         undefweak symbol.
8364         (_frv_count_got_plt_entries): Adjust expected count accordingly.
8365         (elf32_frv_relocate_section): Likewise.  Error out if attempting
8366         to emit rofixups or dynamic relocs in read-only segments.  Use
8367         _bfd_elf_section_offset to adjust r_offsets in rofixups and
8368         dynamic relocations.
8369         2003-12-12  Alexandre Oliva  <aoliva@redhat.com>
8370         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8371         relocations or fixups involving merged sections correctly.  Avoid
8372         crash when undefined symbol is referenced by R_FRV_32 or
8373         R_FRV_FUNCDESC_VALUE.
8374         2003-12-02  Alexandre Oliva  <aoliva@redhat.com>
8375         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8376         input section holding local symbol to addend of R_FRV_32 or
8377         R_FRV_FUNCDESC_VALUE dynamic relocation.
8378         2003-11-27  Alexandre Oliva  <aoliva@redhat.com>
8379         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8380         (elf32_frv_always_size_sections): Don't store pointer to
8381         __stacksize symbol in sec_info.
8382         (elf32_frv_modify_segment_map): Look it up here.
8383         2003-11-26  Alexandre Oliva  <aoliva@redhat.com>
8384         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8385         of the lazy PLT entry, not only its offset, as the low word of a
8386         function descriptor.
8387         2003-11-10  Alexandre Oliva  <aoliva@redhat.com>
8388         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8389         if a hash table entry already exists but is not a definition.
8390         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
8391         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8392         (_frv_add_rofixup): Don't inline.
8393         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8394         for undefweak symbols.
8395         (elf32_frv_relocate_section): Avoid crash while computing
8396         relocation when linking with shared library.  Only emit rofixups
8397         and dynamic relocations for alloc&load sections.  Mark binaries
8398         with inter-segment relocations for relocation as a unit.
8399         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8400         (DEFAULT_STACK_SIZE): New.
8401         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8402         emit rofixups or dynamic relocs when linking dynamic non-PIE
8403         executables.
8404         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8405         shared libs too.  Reserve the last entry for the GOT pointer.
8406         (elf32_frv_finish_dynamic_sections): Emit it.
8407         (elf32_frv_always_size_sections): New.
8408         (elf32_frv_modify_segment_map): New.
8409         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8410         sections.
8411         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8412         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8413         (elf_backend_always_size_sections): New.
8414         (elf_backend_modify_segment_map): New.
8415         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
8416         * config.bfd: Added frv-*-*linux*.
8417         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8418         ABS section, instead of crashing.
8419         (elf32_frv_relocate_section): Don't crash before warning about
8420         different segments in non-PIC relocation.
8421         2003-10-17  Alexandre Oliva  <aoliva@redhat.com>
8422         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8423         relocs to undefweak symbols.
8424         (elf32_frv_relocate_section): Ditto for undefined symbols.
8425         2003-10-06  Alexandre Oliva  <aoliva@redhat.com>
8426         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8427         gotfixup section was created.
8428         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
8429         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8430         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8431         complain_overflow_signed.
8432         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8433         have not been allocated.
8434         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
8435         privfd only if dynamic sections were created.
8436         (elf32_frv_relocate_section): Compute gprel_segment, and use it
8437         for GPREL relocs.  When linking relocatable FDPIC executables,
8438         emit warnings for relocations that would be illegal on PIE or
8439         shared libraries.  Emit rofixup for R_FRV_32 only if input object
8440         is not FDPIC.
8441         (_frv_create_got_section): Define _gp symbol in the rofixup
8442         section.
8443         (elf32_frv_finish_dynamic_sections): If rofixups needed but
8444         dynamic sections missing, error out requesting -melf32frvfd.
8445         2003-09-19  Alexandre Oliva  <aoliva@redhat.com>
8446         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8447         computation of addends from section and global or local symbol
8448         value.  Change return type to bfd_boolean, and return a failure if
8449         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8450         nonzero addend is required.
8451         (elf32_frv_relocate_section): Likewise.  Print error for
8452         unsupported nonzero addends.
8453         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
8454         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8455         force everything local.
8456         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8457         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8458         (frv_gotfixup_section): New.
8459         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8460         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8461         and relocsfdv.
8462         (_frv_add_rofixup): New.
8463         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8464         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
8465         improve some ugly conditions.
8466         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
8467         relocations in fdpic.
8468         (_frv_create_got_section): Create .rofixup.got section.
8469         (struct _frv_dynamic_got_info): Added fixups.
8470         (_frv_count_got_plt_entries): Account in-GOT relocations into
8471         relocs32, relocsfd and relocsfdv.  Account them into relocs or
8472         fixups, as appropriate.
8473         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
8474         sizing of gotrel.
8475         (elf32_frv_finish_dynamic_sections): Verify that the right number
8476         of relocations and fixups was generated.
8477         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8478         relocsfdv.
8479         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8480         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8481         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8482         descriptor of a (formerly-)global symbol is local.
8483         (struct frv_pic_relocs_info): Adjust comments.
8484         (_frv_emit_got_relocs_plt_entries): Adjust.
8485         (elf32_frv_relocate_section): Likewise.
8486         (_frv_count_got_plt_entries): Likewise.
8487         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8488         symbol's value to addend in the common preamble.  Decay dynamic
8489         symbols to section+offset if they bind or call locally, for GOT
8490         and FUNCDESC_VALUE, respectively.
8491         (elf32_frv_relocate_section): Likewise.
8492         (elf32_frv_check_relocs): Don't register as dynamic symbols of
8493         internal or hidden visibility.
8494         2003-09-17  Alexandre Oliva  <aoliva@redhat.com>
8495         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8496         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8497         (elf32_frv_relocate_section): Pass relocation addend in.  Use
8498         original relocation addend to look up the got relocs/plt entries
8499         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
8500         processing relocations that reference .scommon symbols.
8501         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
8502         Introduce support for dynamic linking.
8503         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8504         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8505         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8506         (frv_reloc_type_lookup): Return REL howtos for executables and
8507         dynamic libraries.
8508         (frv_info_to_howto_rel): New.
8509         (struct frv_elf_link_hash_table): New.
8510         (frv_hash_table, frv_got_section, frv_gotrel_section,
8511         frv_plt_section, frv_pltrel_section, frv_relocs_info,
8512         frv_got_initial_offset, frv_plt_initial_offset): New macros.
8513         (frv_elf_link_hash_table_create): New.
8514         (struct frv_pic_relocs_info): New.
8515         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8516         (frv_pic_relocs_info_find): New.
8517         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8518         New.
8519         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8520         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8521         (_frv_emit_got_relocs_plt_entries): New.
8522         (elf32_frv_relocate_section): Add support for dynamic linking.
8523         Handle new relocations.
8524         (_frv_create_got_section): New.
8525         (elf32_frv_create_dynamic_sections): New.
8526         (ELF_DYNAMIC_INTERPRETER): New.
8527         (struct _frv_dynamic_got_info): New.
8528         (_frv_count_got_plt_entries): New.
8529         (struct _frv_dynamic_got_plt_info): New.
8530         (_frv_compute_got_alloc_data): New.
8531         (_frv_get_got_entry, _frv_get_fd_entry): New.
8532         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8533         (_frv_resolve_final_relocs_info): New.
8534         (elf32_frv_size_dynamic_sections): New.
8535         (elf32_frv_finish_dynamic_sections): New.
8536         (elf32_frv_adjust_dynamic_symbol): New.
8537         (elf32_frv_finish_dynamic_symbol): New.
8538         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
8539         whole thing works.
8540         (elf_info_to_howto_rel): Define.
8541         (bfd_elf32_bfd_link_hash_table_create): Define.
8542         (elf_backend_create_dynamic_sections): Define.
8543         (elf_backend_adjust_dynamic_symbol): Define.
8544         (elf_backend_size_dynamic_sections): Define.
8545         (elf_backend_finish_dynamic_symbol): Define.
8546         (elf_backend_finish_dynamic_sections): Define.
8547         (elf_backend_want_got_sym): Define.
8548         (elf_backend_got_header_size): Define.
8549         (elf_backend_want_got_plt): Define.
8550         (elf_backend_plt_readonly): Define.
8551         (elf_backend_want_plt_sym): Define.
8552         (elf_backend_plt_header_size): Define.
8553         (elf_backend_may_use_rel_p): Define.
8554         (elf_backend_may_use_rela_p): Define.
8555         (elf_backend_default_use_rela_p): Define.
8556         2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
8557         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8558         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8559         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8560         (frv_reloc_map): Map the corresponding BFD relocs to them.
8561         (frv_reloc_type_lookup): ... and back to BFD relocs.
8562         * reloc.c: New relocs.
8563         * bfd-in2.h, libbfd.h: Rebuilt.
8564         2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
8565         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8566         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8567         R_FRV_FUNCDESC_GOTLO): New.
8568         (frv_reloc_map): Map the corresponding BFD relocs to them.
8569         (frv_reloc_type_lookup): ... and back to BFD relocs.
8570         * reloc.c: New relocs.
8571         * bfd-in2.h, libbfd.h: Rebuilt.
8573 2004-01-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8575         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8576         targets to support pages of up to 64kB.
8577         (elf32_bed): Redefine to get a separate backend data structure for
8578         traditional targets.
8579         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8580         targets to support pages of up to 64kB.
8581         (elf64_bed): Redefine to get a separate backend data structure for
8582         traditional targets.
8583         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8584         targets to support pages of up to 64kB.
8585         (elf32_bed): Redefine to get a separate backend data structure for
8586         traditional targets.
8588 2004-01-04  Mark Kettenis  <kettenis@gnu.org>
8590         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8592 2004-01-02  Mark Kettenis  <kettenis@gnu.org>
8594         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8595         (elf_i386_grok_psinfo): Likewise.
8597 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
8599         * config.bfd: Add m68k-uClinux target.
8601 2004-01-01  Grant Edwards <grante@visi.com>
8603         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8604         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8605         (elf32_h8_gc_sweep_hook): New function.
8606         (elf_backend_gc_mark_hook): Define.
8607         (elf_backend_gc_sweep_hook): Define.
8608         (elf_backend_can_gc_sections): Define.
8610 For older changes see ChangeLog-0203
8612 Local Variables:
8613 mode: change-log
8614 left-margin: 8
8615 fill-column: 74
8616 version-control: never
8617 End: