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