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