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