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