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