* elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
[external/binutils.git] / bfd / ChangeLog
1 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
2
3         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4         "group" union.
5         (elf_group_name): Update.
6         (elf_group_id): Define.
7         (bfd_elf_set_group_contents): Declare.
8         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
9         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
10         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
11         that sym for the signature.
12         (_bfd_elf_compute_section_file_positions): Don't call
13         set_group_contents for "ld -r" case.
14         (swap_out_syms): Use bfd_zalloc.
15         * elflink.h (elf_link_add_archive_symbols): Likewise.
16         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
17         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
18
19 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
20
21         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
22         relocs in opd for non-shared too.
23
24 2002-06-06  Jeffrey Law <law@redhat.com
25
26         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
27         relocations.
28
29 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
30
31         * merge.c: Include libiberty.h.
32         * elf-strtab.c: Include libiberty.h.
33
34 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
35
36         * peXXigen.c (pe_print_idata): Remove unused variable.
37
38 2002-06-06  David Heine <dlheine@tensilica.com>
39
40         * elf.c (assign_file_positions_for_segments): Remove unallocated
41         sections from the section to segment mapping for PT_LOAD segments.
42         Update comment about empty loadable segments.
43
44 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
45
46         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
47         is within the .stabstr section.
48
49 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
50
51         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
52         are "const PTR", not "const PTR *".
53         (bfd_elf32_swap_symbol_in): Likewise.
54         (bfd_elf64_swap_symbol_in): Likewise.
55         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
56         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
57         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
58         (elf_link_add_object_symbols): Likewise.
59         (elf_link_record_local_dynamic_symbol): Likewise.
60         (elf_link_input_bfd): Likewise.
61         (elf_gc_mark): Likewise.
62         (elf_reloc_symbol_deleted_p): Likewise.
63         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
64         (mn10200_elf_relax_delete_bytes): Likewise.
65         (mn10200_elf_symbol_address_p): Likewise.
66         (mn10200_elf_get_relocated_section_contents): Likewise.
67         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
68         (mn10300_elf_relax_section): Likewise.
69         (mn10300_elf_relax_delete_bytes): Likewise.
70         (mn10300_elf_symbol_address_p): Likewise.
71         (mn10300_elf_get_relocated_section_contents): Likewise.
72         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
73         (elf32_h8_relax_delete_bytes): Likewise.
74         (elf32_h8_symbol_address_p): Likewise.
75         (elf32_h8_get_relocated_section_contents): Likewise.
76         * elf32-hppa.c (get_local_syms): Likewise.
77         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
78         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
79         * elf32-sh.c (sh_elf_relax_section): Likewise.
80         (sh_elf_relax_delete_bytes): Likewise.
81         (sh_elf_get_relocated_section_contents): Likewise.
82         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
83         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
84         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
85         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
86         * elf64-ppc.c (get_local_syms): Likewise.
87         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
88         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
89
90 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
91
92         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
93
94 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
95
96         * elf.c (group_signature): Swap in the whole symbol, and handle
97         extracting section symbol names.
98         (setup_group): Add comment.
99         (set_group_contents): When called from objcopy or ld, arrange for
100         section contents to be written.  Write group member output section
101         indices to allow objcopy to reorganize sections.
102         (_bfd_elf_copy_private_section_data): Copy group info.
103
104         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
105         (bfd_elf32_swap_symbol_in): Update prototype.
106         (bfd_elf64_swap_symbol_in): Likewise.
107         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
108         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
109         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
110         (elf_link_add_object_symbols): Likewise.
111         (elf_link_record_local_dynamic_symbol): Likewise.
112         (elf_link_input_bfd): Likewise.
113         (elf_gc_mark): Likewise.
114         (elf_reloc_symbol_deleted_p): Likewise.
115         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
116         (mn10200_elf_relax_delete_bytes): Likewise.
117         (mn10200_elf_symbol_address_p): Likewise.
118         (mn10200_elf_get_relocated_section_contents): Likewise.
119         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
120         (mn10300_elf_relax_section): Likewise.
121         (mn10300_elf_relax_delete_bytes): Likewise.
122         (mn10300_elf_symbol_address_p): Likewise.
123         (mn10300_elf_get_relocated_section_contents): Likewise.
124         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
125         (elf32_h8_relax_delete_bytes): Likewise.
126         (elf32_h8_symbol_address_p): Likewise.
127         (elf32_h8_get_relocated_section_contents): Likewise.
128         * elf32-hppa.c (get_local_syms): Likewise.
129         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
130         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
131         * elf32-sh.c (sh_elf_relax_section): Likewise.
132         (sh_elf_relax_delete_bytes): Likewise.
133         (sh_elf_get_relocated_section_contents): Likewise.
134         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
135         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
136         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
137         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
138         * elf64-ppc.c (get_local_syms): Likewise.
139         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
140         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
141         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
142         * elf64-alpha.c (alpha_elf_size_info): Likewise.
143         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
144         * elf64-mips.c (mips_elf64_size_info): Likewise.
145         * elf64-s390.c (s390_elf64_size_info): Likewise.
146         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
147
148 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
149
150         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
151         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
152         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
153         _bfd_mips_elf_ignore_discarded_relocs.
154         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
155
156 2002-06-05  H.J. Lu <hjl@gnu.org>
157
158         * elfxx-mips.c (mips_elf_calculate_relocation): Call
159         _bfd_elf_rel_local_sym for STT_SECTION relocations against
160         the SEC_MERGE section.
161
162 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
163
164         * coff-alpha.c: Update copyright date.
165         * coff-mips.c: Likewise.
166         * xcoff-target.h: Likewise.
167
168         * bfd-in.h: Remove "taken from the source" comment.
169         * libbfd-in.h: Likewise.
170         * libcoff-in.h: Likewise.
171         * bfd-in2.h: Regenerate.
172         * libbfd.h: Regenerate.
173         * libcoff.h: Regenerate.
174
175         * elf.c (bfd_elf_discard_group): Return true.
176         * elf-bfd.h (bfd_elf_discard_group): Declare.
177         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
178         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
179         * bfd.c (bfd_discard_group): Define.
180         * targets.c (struct bfd_target): Add _bfd_discard_group.
181         (BFD_JUMP_TABLE_LINK): Here too.
182         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
183         * aout-adobe.c (aout_32_bfd_discard_group): Define.
184         * aout-target.h (MY_bfd_discard_group): Define.
185         * aout-tic30.c (MY_bfd_discard_group): Define.
186         * binary.c (binary_bfd_discard_group): Define.
187         * bout.c (b_out_bfd_discard_group): Define.
188         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
189         * coffcode.h (coff_bfd_discard_group): Define.
190         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
191         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
192         * i386msdos.c (msdos_bfd_discard_group): Define.
193         * i386os9k.c (os9k_bfd_discard_group): Define.
194         * ieee.c (ieee_bfd_discard_group): Define.
195         * ihex.c (ihex_bfd_discard_group): Define.
196         * mmo.c (mmo_bfd_discard_group): Define.
197         * nlm-target.h (nlm_bfd_discard_group): Define.
198         * oasys.c (oasys_bfd_discard_group): Define.
199         * ppcboot.c (ppcboot_bfd_discard_group): Define.
200         * som.c (som_bfd_discard_group): Define.
201         * srec.c (srec_bfd_discard_group): Define.
202         * tekhex.c (tekhex_bfd_discard_group): Define.
203         * versados.c (versados_bfd_discard_group): Define.
204         * vms.c (vms_bfd_discard_group): Define.
205         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
206         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
207         (aix5coff64_vec): Likewise.
208         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
209
210 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
211
212         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
213         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
214         (elf32-sh64-com.lo): New dependency list.
215         * Makefile.in: Regenerate.
216         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
217         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
218         elf32-sh64-com.lo.
219         * configure: Regenerate.
220         * elf32-sh64.c (sh64_address_in_cranges)
221         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
222         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
223         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
224         * elf32-sh64-com.c: ...here.  New file.
225
226 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
227
228         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
229         ATTRIBUTE_UNUSED on used params.
230         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
231         before calling bfd_section_from_elf_index on local syms.
232         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
233
234 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
235
236         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
237         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
238         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
239         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
240         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
241         * Makefile.in: Regenerate.
242         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
243         (sh64-*-netbsd*): New targets.
244         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
245         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
246         * configure: Regenerate.
247         * elf32-sh64-nbsd.c: New file.
248         * elf64-sh64-nbsd.c: New file.
249         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
250         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
251         bfd_elf64_sh64lnbsd_vec.
252
253 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
254
255         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
256         (bfd_section_from_shdr): Likewise.  Set section name of group
257         sections from signature.
258         (group_signature): Split out from setup_group.  Ensure symbol table
259         is available.
260         (bfd_elf_discard_group): New function.
261         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
262         .gnu.linkonce* sections if they are members of a group.
263         (set_group_contents): Set GRP_COMDAT flag.
264         * section.c (bfd_discard_group): New function.
265         * bfd-in.h (bfd_elf_discard_group): Declare.
266         * bfd-in2.h: Regenerate.
267         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
268         (elf_linkonce_p): Define.
269
270 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
271
272         * elf.c (bfd_section_from_shdr): Make "name" const.
273         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
274         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
275         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
276         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
277         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
278         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
279         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
280         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
281         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
282         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
283         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
284
285 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
286
287         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
288         ABI.
289
290 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
291
292         * elf32-arc.c: Fix formatting.
293         * elf32-arm.h: Likewise.
294         * elf32-cris.c: Likewise.
295         * elf32-dlx.c: Likewise.
296         * elf32-hppa.c: Likewise.
297         * elf32-i386.c: Likewise.
298         * elf32-i386qnx.c: Likewise.
299         * elf32-or32.c: Likewise.
300         * elf32-s390.c: Likewise.
301         * elf32-sh64.c: Likewise.
302         * elf32-vax.c: Likewise.
303         * elf32-xstormy16.c: Likewise.
304         * elf64-alpha.c: Likewise.
305         * elf64-mmix.c: Likewise.
306         * elf64-ppc.c: Likewise.
307         * elf64-s390.c: Likewise.
308         * elf64-sh64.c: Likewise.
309         * elf64-x86-64.c: Likewise.
310
311 2002-06-02  Richard Henderson  <rth@redhat.com>
312
313         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
314         null when there are no got entries for a symbol.
315         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
316         uninitialized variable warning.
317
318 2002-06-01  Richard Henderson  <rth@redhat.com>
319
320         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
321         undefined symbols here.
322         (elf64_alpha_relax_section): Do it here.  Also test for not
323         defined in the current module.
324         (elf64_alpha_relocate_section_r): Split out of ...
325         (elf64_alpha_relocate_section): ... here.  Don't dereference
326         NULL when looking up local got entries.
327
328 2002-06-01  Richard Henderson  <rth@redhat.com>
329
330         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
331         symbols from JSR relaxation.
332         (elf64_alpha_size_plt_section_1): New.
333         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
334         (elf64_alpha_size_rela_got_1): ... here.
335         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
336         (elf64_alpha_size_rela_got_section): ... here.
337         (elf64_alpha_size_plt_section): New.
338         (elf64_alpha_relax_section): Call them.
339         (elf64_alpha_size_got_sections): Remove output_bfd arg.
340         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
341
342 2002-06-01  Richard Henderson  <rth@redhat.com>
343
344         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
345         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
346         in shared libraries.  Fix DTPRELHI and TPRELHI value.
347         (INSN_ADDQ, INSN_RDUNIQ): New.
348         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
349         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
350         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
351         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
352         Handle GOTDTPREL and GOTTPREL relocations.
353         (elf64_alpha_relax_gprelhilo): New.
354         (elf64_alpha_relax_tls_get_addr): New.
355         (elf64_alpha_relax_find_tls_segment): New.
356         (elf64_alpha_relax_section): Handle TLS relocations.
357         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
358         (elf64_alpha_check_relocs): Set it.
359
360 2002-06-01  Richard Henderson  <rth@redhat.com>
361
362         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
363
364         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
365         check; don't suppress dynamic relocs for non-allocated sections.
366
367         * elf64-alpha.c: Remove dead code.
368
369 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
370
371         * bfd-in2.h: Regenerate.
372         * libbfd.h: Regenerate.
373         * po/SRC-POTFILES.in: Regenerate.
374
375         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
376         space for bss .plt.
377
378 2002-05-31  Graeme Peterson  <gp@qnx.com>
379
380         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
381         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
382         Run "make dep-am".
383         * Makefile.in: Regenerate.
384         * config.bfd: Add i[3456]86-*-nto-qnx* support.
385         * configure.in: Add bfd_elf32_i386qnx_vec support.
386         * configure: Regenerate.
387         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
388         is_contained_by_filepos, and copy_private_bfd_data_p.
389         * elf.c (assign_file_positions_for_segments): Call backend
390         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
391         (IS_CONTAINED_BY_FILEPOS): Define.
392         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
393         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
394         Fix non-K&R call to _bfd_error_handler.
395         (_bfd_elf_copy_private_section_data): Use backend
396         copy_private_bfd_data_p.
397         * elf32-i386.c: Don't include elfxx-target.h when
398         ELF32_I386_C_INCLUDED is defined.
399         * elf32-i386qnx.c: New QNX elf backend file.
400         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
401         elf_backend_is_contained_by_filepos, and
402         elf_backend_do_copy_private_bfd_data.
403         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
404
405 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
406
407         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
408         Move other similar defines to start of file.
409
410 2002-05-30  Tom Rix  <trix@redhat.com>
411
412         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
413         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
414
415 2002-05-30  Richard Henderson  <rth@redhat.com>
416
417         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
418         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
419         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
420         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
421         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
422         (struct alpha_elf_obj_tdata): Rename total_got_entries and
423         n_local_got_entries to total_got_size and local_got_size.
424         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
425         (alpha_got_entry_size): New.
426         (elf64_alpha_relax_with_lituse): Use it.
427         (elf64_alpha_relax_without_lituse): Likewise.
428         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
429         (get_got_entry): New.
430         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
431         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
432         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
433         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
434         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
435         (elf64_alpha_calc_got_offsets): Likewise.
436         (alpha_dynamic_entries_for_reloc): New.
437         (elf64_alpha_calc_dynrel_sizes): Use it.
438         (elf64_alpha_size_dynamic_sections): Likewise.
439         (elf64_alpha_relocate_section): Handle TLS relocations.
440         * reloc.c: Add Alpha TLS relocations.
441         * bfd-in2.h, libbfd.h: Rebuild.
442
443 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
444
445         * peXXigen.c (pe_print_idata): Remove double printed
446         import table lines; add Bound-To comment.
447
448 2002-05-29  Matt Thomas  <matt@3am-software.com>
449
450         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
451         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
452         (elf32-vax.lo): New rule.
453         * Makefile.in: Regenerate.
454         * configure.in (bfd_elf32_vax_vec)
455         (vaxnetbsd_vec): New vectors.
456         * configure: Regenerate.
457         * config.bfd (vax-*-netbsdelf*)
458         (vax-*-netbsdaout*)
459         (vax-*-netbsd*): New targets.
460         * elf32-vax.c: New file.
461         * reloc.c: Add VAX relocations.
462         * bfd-in2.h: Regenerate.
463         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
464
465 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
466
467         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
468         and bfd_elf32_bigarm_vec to targ_selvecs.
469
470 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
471
472         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
473         with auto-imported symbols.
474
475 2002-05-29  Adam Nemet  <anemet@lnxw.com>
476
477         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
478         sections only record bfd.
479         (bfd_elf32_arm_add_glue_sections_to_bfd): New function. 
480         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
481         * bfd-in2.h: Regenerate.          
482
483 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
484
485         * syms.c (_bfd_stab_section_find_nearest_line): Move
486         declaration and initialisation of saw_line and saw_func out of
487         for loop.
488
489 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
490
491         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
492         (bfd_elf64_get_symbol_info): Define.
493         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
494
495 2002-05-29  Andrey Volkov  <avolkov@transas.com>
496
497         * cpu-h8300.c: Make default h8300 machine first in machine list.
498
499 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
500
501         * config.bfd: Added DLX configuraton.
502         * Makefile.am: Added DLX configuraton.
503         * configure.in: Added DLX configuraton.
504         * archures.c: Add DLX architecure.
505         * reloc.c: Add DLX relocs.
506         * targets.c: Added DLX target vector.
507         * configure: Regenerate.
508         * Makefile.in: Regenreate.
509         * bfd-in2.h: Regenreate.
510         * elf32-dlx.c: New file: Support DLX target.
511         * cpu-dlx.c: New file: Support DLX target.
512
513 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
514
515         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
516
517         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
518         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
519         strings to point inside function code sym string.
520         (func_desc_adjust): Likewise.
521         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
522
523 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
524
525         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
526         (elf64_x86_64_grok_psinfo): Added.
527
528 2002-05-24  TAMURA Kent <kent@netbsd.org>
529
530         * config.bfd: Add a target for i386-netbsdpe.
531
532 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
533
534         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
535         and is_func_descriptor.
536         (func_desc_adjust): Hide function code sym in shared libs unless
537         there is a matching exported function descriptor sym.
538
539 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
540
541         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
542         for symbols from SHF_TLS section.
543         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
544         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
545         (map_sections_to_segments): Build PT_TLS segment if necessary.
546         (assign_file_positions_for_segments): Likewise.
547         (get_program_header_size): Account for PT_TLS segment.
548         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
549         SEC_THREAD_LOCAL sections to STT_TLS.
550         * reloc.c: Add 386 and IA-64 TLS relocs.
551         * section.c (SEC_THREAD_LOCAL): Define.
552         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
553         Remove.
554         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
555         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
556         unconditionally.
557         (struct elf_final_link_info): Add first_tls_sec.
558         (elf_bfd_final_link): Set first_tls_sec.
559         Compute elf_hash_table (info)->tls_segment.
560         (elf_link_output_extsym): Handle STT_TLS symbols.
561         (elf_link_input_bfd): Likewise.
562         * syms.c (BSF_THREAD_LOCAL): Define.
563         * bfd-in2.h: Rebuilt.
564         * libbfd.h: Rebuilt.
565         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
566         elf_i386_mkobject, elf_i386_object_p): New functions.
567         (elf_howto_table): Add TLS relocs.
568         (elf_i386_reloc_type_lookup): Support TLS relocs.
569         (elf_i386_info_to_howto_rel): Likewise.
570         (struct elf_i386_link_hash_entry): Add tls_type.
571         (struct elf_i386_obj_tdata): New.
572         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
573         New macros.
574         (struct elf_i386_link_hash_table): Add tls_ldm_got.
575         (link_hash_newfunc): Clear tls_type.
576         (elf_i386_check_relocs): Support TLS relocs.
577         (elf_i386_gc_sweep_hook): Likewise.
578         (allocate_dynrelocs): Likewise.
579         (elf_i386_size_dynamic_sections): Likewise.
580         (elf_i386_relocate_section): Likewise.
581         (elf_i386_finish_dynamic_symbol): Likewise.
582         (bfd_elf32_mkobject, elf_backend_object_p): Define.
583         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
584         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
585         want_tprel, want_dtpmod, want_dtprel.
586         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
587         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
588         R_IA64_LTOFF_TPREL22.
589         (elf_code_to_howto_index): Add TLS relocs.
590         (elfNN_ia64_check_relocs): Support TLS relocs.
591         (allocate_global_data_got): Account for TLS .got data.
592         (allocate_dynrel_entries): Account for TLS dynamic relocations.
593         (elfNN_ia64_install_value): Supprt TLS relocs.
594         (set_got_entry): Support TLS relocs.
595         (elfNN_ia64_relocate_section): Likewise.
596
597 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
598
599         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
600         BLX reloc round the relocation up rather than down.
601         * coff-arm.c (coff_arm_relocate_section): Likewise.
602
603 2002-05-21  H.J. Lu  (hjl@gnu.org)
604
605         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
606         definition.
607
608 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
609
610         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
611         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
612
613 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
614
615         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
616         unresolved relocs.
617         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
618
619 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
620
621         * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
622         non-ELF targets.
623
624 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
625
626         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
627         an error value.
628         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
629         return with false on error.
630         (elf_link_input_bfd): Check reloc_emitter return value.
631
632 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
633
634         * config.bfd (armeb-*-netbsdelf*): New target.
635
636 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
637
638         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
639         at the plt call stub.
640
641 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
642
643         * cpu-mips.c (mips_compatible): Don't try to check machine
644         compatibility.
645
646 2002-05-18  Tom Rix  <trix@redhat.com>
647
648         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out):  Fix C_FILE auxent.
649
650 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
651
652         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
653         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
654         we've already warned about an undefined symbol.  Report more
655         detail on reloc errors.
656
657 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
658
659         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
660         * configure.in: Invoke AM_INSTALL_LIBBFD.
661         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
662         (install_libbfd): .. New target.
663         (uninstall_libbfd): Likewise.
664         (install-bfdlibLTLIBRARIES): Likewise.
665         (uninstall-bfdlibLTLIBRARIES): Likewise.
666         (bfdlibdir): New.
667         (bfdincludedir): New.
668         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
669         * aclocal.m4: Regenerate.
670         * configure: Regenerate.
671         * Makefile.in: Regenerate.
672
673 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
674
675         * hash.c (bfd_hash_lookup): Remove computation of len from inside
676         hash loop.
677
678 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
679
680         * config.bfd: Add targets for sh64-linux (little endian and
681         big endian).
682
683 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
684
685         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
686         is located in the same section as the import table.  Instead
687         check, and if necessary load the section containing the thunk.
688
689 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
690
691         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
692         bfd_bread.
693         (xcoff64_core_file_matches_executable_p): Replace bfd_read
694         with bfd_bread.
695
696 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
697
698         * aix5ppc-core.c: Warning fixes.
699         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
700         * aout-target.h (MY_bfd_link_just_syms): Define.
701         * aout-tic30.c (MY_bfd_link_just_syms): Define.
702         * bfd.c (bfd_link_just_syms): Define.
703         * binary.c (binary_bfd_link_just_syms): Define.
704         * bout.c (b_out_bfd_link_just_syms): Define.
705         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
706         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
707         * coffcode.h (coff_bfd_link_just_syms): Define.
708         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
709         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
710         (_bfd_elf_link_just_syms): Declare.
711         * elf.c (_bfd_elf_link_just_syms): New function.
712         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
713         sections haven't already been discarded by the linker.
714         * elflink.h (elf_link_add_object_symbols): Likewise for stab
715         sections and SEC_MERGE sections.
716         (elf_bfd_discard_info): Similarly here.
717         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
718         * i386msdos.c (msdos_bfd_link_just_syms): Define.
719         * i386os9k.c (os9k_bfd_link_just_syms): Define.
720         * ieee.c (ieee_bfd_link_just_syms): Define.
721         * ihex.c (ihex_bfd_link_just_syms): Define.
722         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
723         (_bfd_generic_link_just_syms): Declare.
724         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
725         * linker.c (_bfd_generic_link_just_syms): New function.
726         * mmo.c (mmo_bfd_link_just_syms): Define.
727         * nlm-target.h (nlm_bfd_link_just_syms): Define.
728         * oasys.c (oasys_bfd_link_just_syms): Define.
729         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
730         * som.c (som_bfd_link_just_syms): Define.
731         * srec.c (srec_bfd_link_just_syms): Define.
732         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
733         (BFD_JUMP_TABLE_LINK): And here.
734         * tekhex.c (tekhex_bfd_link_just_syms): Define.
735         * versados.c (versados_bfd_link_just_syms): Define.
736         * vms.c (vms_bfd_link_just_syms): Define.
737         * libbfd.h: Regenerate.
738         * bfd-in2.h: Regenerate.
739
740 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
741
742         * elf32-mips.c: Remove superfluous definitions copied from
743         elfxx-mips.c.
744         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
745         SGIish vectors to check the special case.
746         (mips_elf_hi16_reloc): Fix comment.
747         (mips_elf_got16_reloc): Likewise.
748         (_bfd_mips_elf32_gprel16_reloc): Likewise.
749         (elf_reloc_map): Code cleanup.
750         (mips_reloc_map): Add comment.
751         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
752         (mips_elf32_rtype_to_howto): Likewise.
753         (mips_elf32_discard_info): Likewise.
754         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
755         lead to IRIX compatibility now.
756
757 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
758
759         * elfxx-mips.c: Call it IRIX, not Irix in comments.
760
761 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
762
763         * config.bfd (shle-*-netbsdelf*): Add target which includes
764         sh64 support.
765
766 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
767
768         * configure.in: Revert 2002-04-07.  Instead, auto-configure
769         HAVE_ST_C_IMPL.
770         * configure: Regenerate.
771         * config.in: Regenerate.
772         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
773         or AIX_5_CORE.
774
775 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
776
777         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
778         corefiles as well.2
779         * configure: Regenerate.
780
781 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
782
783         * Makefile.am (install-data-local): Install headers to
784         $(exec_prefix)/include.
785         * Makefile.in: Regenerate.
786
787 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
788             Daniel Jacobowitz  <drow@mvista.com>
789
790         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
791         map BFD_RELOC_RVA.
792
793 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
794
795         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
796         hppa*-*-openbsd*): New targets.
797         * configure.in (alpha*-*-openbsd*): Set COREFILE.
798         * configure: Regenerate.
799
800 2002-05-10  Tom Rix  <trix@redhat.com>
801
802         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
803         xcoff64_ppc_relocate_section.
804         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
805         * libxcoff.h: Common xcoff_reloc_type function declaration.
806
807 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
808
809         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
810         added in 2002-05-09 commit.
811
812         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
813         don't look for stubs on all undefined syms.
814
815 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
816
817         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
818         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
819         pcrel_offset.
820
821         * elf32-i386.c (elf_howto_table): Comments.
822         (elf_i386_relocate_section): Handle more relocs for relocatable
823         linking and against SEC_MERGE sections.
824
825 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
826
827         * elf32-ppc.c (ppc_elf_create_got): New function.
828         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
829         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
830         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
831         _bfd_elf_create_got_section.
832
833 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
834
835         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
836         * elfxx-target.h (elf_backend_rela_normal): Define.
837         (elfNN_bed): Init rela_normal.
838         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
839         for section symbols here if rela_normal.  Simplify abs section test.
840         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
841         return immediately.  Remove code handling relocatable linking.
842         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
843         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
844         * elf32-i370.c (i370_elf_relocate_section): Likewise.
845         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
846         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
847         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
848         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
849         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
850         * elf32-s390.c (elf_s390_relocate_section): Likewise.
851         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
852         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
853         * elf64-s390.c (elf_s390_relocate_section): Likewise.
854         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
855         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
856         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
857         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
858         * elf-m10200.c (elf_backend_rela_normal): Define.
859         * elf-m10300.c (elf_backend_rela_normal): Define.
860         * elf32-fr30.c (elf_backend_rela_normal): Define.
861         * elf32-i370.c (elf_backend_rela_normal): Define.
862         * elf32-i860.c (elf_backend_rela_normal): Define.
863         * elf32-m68k.c (elf_backend_rela_normal): Define.
864         * elf32-mcore.c (elf_backend_rela_normal): Define.
865         * elf32-openrisc.c (elf_backend_rela_normal): Define.
866         * elf32-ppc.c (elf_backend_rela_normal): Define.
867         * elf32-s390.c (elf_backend_rela_normal): Define.
868         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
869         * elf64-ppc.c (elf_backend_rela_normal): Define.
870         * elf64-s390.c (elf_backend_rela_normal): Define.
871         * elf64-x86-64.c (elf_backend_rela_normal): Define.
872         * elfxx-ia64.c (elf_backend_rela_normal): Define.
873         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
874         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
875
876 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
877
878         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
879         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
880
881 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
882
883         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
884         when not relocatable.  Fix reloc_emitter call for K&R.
885
886 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
887
888         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
889         reloading local sym addend mistakenly removed in 2002-05-01 change.
890
891         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
892         (read_abbrevs): Change "offset" param to bfd_vma.
893         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
894         Change "abbrev_offset" to bfd_vma.
895         (read_indirect_string): Use correct conversion chars in error
896         message format string, cast bfd_vma's to unsigned long.
897         (read_abbrevs): Likewise.
898         (read_attribute_value): Likewise.
899         (decode_line_info): Likewise.
900         (scan_unit_for_functions): Likewise.
901         (parse_comp_unit): Likewise.
902
903 2002-05-04  Tom Rix  <trix@redhat.com>
904
905         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
906         (coff_swap_reloc_out): Same.
907         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
908         (xcoff_swap_reloc_out): Same.
909         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
910         case some 16 bit relocs. Add reloc value to output.
911         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
912         R_RBR. Improve names.
913         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
914         (bfd_xcoff_backend_data): Update with new reloc swap names.
915         (bfd_pmac_xcoff_backend_data) : Same.
916         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
917         (xcoff64_swap_reloc_out): Same.
918         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
919         R_POS. Add reloc value to output.
920         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
921         bit R_RBR. Improve names, masks.
922         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
923         (bfd_xcoff_backend_data): Update with new reloc swap names.
924         (bfd_xcoff_aix5_backend_data) : Same.
925
926 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
927
928         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
929         bfd_count top_index, input_list, all_local_syms.
930         (elf32_hppa_setup_section_lists): New function, split from
931         elf32_hppa_size_stubs.
932         (elf32_hppa_next_input_section): Likewise.
933         (group_sections): Likewise.
934         (get_local_syms): Likewise.
935         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
936         stubs on undefined syms too.
937         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
938         Only access htab elf fields when we have an elf hash table.
939         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
940         (elf32_hppa_next_input_section): Declare.
941
942 2002-05-04  Bob Byrnes  <byrnes@curl.com>
943
944         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
945         _bfd_new_bfd.
946
947 2002-05-03  H.J. Lu  (hjl@gnu.org)
948
949         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
950         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
951         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
952         to hide a global symbol.
953         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
954         forced_local to true.
955
956 2002-05-02  Richard Henderson  <rth@redhat.com>
957
958         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
959         vs SHN_UNDEF to zero.
960
961 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
962
963         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
964         16 bit reloc.
965         <R_PPC64_SECTOFF_DS>: Likewise.
966         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
967         SECTOFF reloc.
968         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
969         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
970         SECTOFF reloc.
971
972         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
973         (ppc64_elf_ha_reloc): New function.
974         (ppc64_elf_brtaken_reloc): New function.
975         (ppc64_elf_sectoff_reloc): New function.
976         (ppc64_elf_sectoff_ha_reloc): New function.
977         (ppc64_elf_toc_reloc): New function.
978         (ppc64_elf_toc_ha_reloc): New function.
979         (ppc64_elf_toc64_reloc): New function.
980         (ppc64_elf_unhandled_reloc): New function.
981         (ppc64_elf_howto_raw): Use the above.
982         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
983         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
984         <R_PPC64_SECTOFF_DS>: Likewise.
985         (IS_ABSOLUTE_RELOC): Update.
986         (struct ppc_link_hash_table): Add have_undefweak.
987         (ppc64_elf_link_hash_table_create): Init.
988         (func_desc_adjust): Set have_undefweak.
989         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
990         add the .sfpr blr when have_undefweak.
991         (ppc64_elf_setup_section_lists): Check hash table flavour.
992         (ppc64_elf_next_input_section): Move output_section->owner test to
993         ppc64elf.em.
994         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
995         and relocatable test.  Return TOCstart and don't set elf_gp.
996         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
997         offset calculation.  Add assert on weak sym branch tweaks.
998         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
999         (ppc64_elf_toc): Declare.
1000         (ppc64_elf_next_input_section): Update.
1001
1002 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
1003
1004         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1005         file_name.
1006
1007 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
1008
1009         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1010         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
1011         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
1012         call branches.  Correct undefined weak destination.
1013         (ppc64_elf_func_desc_adjust): Always create at least one blr in
1014         .sfpr, and correct case where either only savef* or restf* is
1015         needed.
1016
1017         Long branch stubs, multiple stub sections.
1018         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1019         (ppc64_elf_next_input_section): Declare.
1020         * elf64-ppc.c: Move linker-only prototypes.
1021         (STUB_SUFFIX): Define.
1022         (enum ppc_stub_type): New.
1023         (struct ppc_stub_hash_entry): New.
1024         (struct ppc_branch_hash_entry): New.
1025         (struct ppc_link_hash_entry): Add stub_cache, oh.
1026         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
1027         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1028         Rename plt_overflow to stub_error.
1029         (ppc_stub_hash_lookup): Define.
1030         (ppc_branch_hash_lookup): Define.
1031         (stub_hash_newfunc): New function.
1032         (branch_hash_newfunc): New function.
1033         (link_hash_newfunc): Init new fields.
1034         (ppc64_elf_link_hash_table_create): Likewise.
1035         (ppc64_elf_link_hash_table_free): New function.
1036         (ppc_stub_name): New function.
1037         (ppc_get_stub_entry): New function.
1038         (ppc_add_stub): New function.
1039         (create_linkage_sections): Use bfd_make_section_anyway.  Create
1040         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
1041         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1042         and set up for plt call stubs.  Link func and func desc syms.
1043         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1044         (func_desc_adjust): Avoid hash lookup when func desc sym available
1045         via shortcut, and set links when processing.
1046         (ppc64_elf_hide_symbol): Likewise.
1047         (allocate_dynrelocs): Don't allocate stub section here.
1048         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1049         Remove sstub code.
1050         (ppc_type_of_stub): New function.
1051         (build_one_stub): Delete.
1052         (ppc_build_one_stub): New function.
1053         (ppc_size_one_stub): New function.
1054         (ppc64_elf_setup_section_lists): New function.
1055         (ppc64_elf_next_input_section): New function.
1056         (group_sections): New function.
1057         (get_local_syms): New function.
1058         (ppc64_elf_size_stubs): Rewrite.
1059         (ppc64_elf_build_stubs): Rewrite.
1060         (ppc64_elf_relocate_section): Look up stub entry for REL24
1061         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
1062         branch stubs if REL14* or REL24 relocs won't reach.
1063         (bfd_elf64_bfd_link_hash_table_free): Define.
1064
1065 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
1066
1067         * bfd/config.bfd: Add support for powerpc-*-windiss.
1068
1069 2002-04-30  Tom Rix  <trix@redhat.com>
1070
1071         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1072         symbol names into the hash table.
1073
1074 2002-04-28  Tom Rix  <trix@redhat.com>
1075
1076         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
1077         calulating relocations.
1078         (xcoff_complain_overflow) : Function table for relocation errors.
1079         (xcoff_ppc_relocate_section): Use relocation and complain function
1080         tables.
1081         (xcoff_complain_overflow_unsigned_func): New complain function.
1082         (xcoff_complain_overflow_signed_func): Same.
1083         (xcoff_complain_overflow_bitfield_func): Same.
1084         (xcoff_complain_overflow_dont_func): Same.
1085         (xcoff_reloc_type_crel): New recot function.
1086         (xcoff_reloc_type_br): Same.
1087         (xcoff_reloc_type_ba): Same.
1088         (xcoff_reloc_type_toc): Same.
1089         (xcoff_reloc_type_rel): Same.
1090         (xcoff_reloc_type_neg): Same.
1091         (xcoff_reloc_type_pos): Same.
1092         (xcoff_reloc_type_fail): Same.
1093         (xcoff_reloc_type_noop): Same.
1094         * libxcoff.h : Declare common parts for xcoff64.
1095         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
1096         and complain function tables.
1097
1098 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
1099
1100         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1101         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1102
1103 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
1104
1105         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1106         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1107
1108         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1109         same as the output before calling elf_link_input_bfd.
1110
1111         * coffcode.h (coff_compute_section_file_positions): Set
1112         section_tail after shuffling section list.
1113
1114 2002-04-24  Christian Groessler <chris@groessler.org>
1115
1116         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1117         addresses are 23bit with a special layout, not plain 32bit
1118         values.  Prevent relocation of immediate values.
1119
1120 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
1121
1122         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1123         MIPS-16 ASE flags are set, print something to indicate that.
1124
1125 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
1126
1127         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1128         under which a plt call stub is used.
1129         (final_link_relocate): Similarly.
1130         (allocate_plt_static): Clear h-plabel except when plt entry is
1131         exclusively used for a plabel.
1132         (allocate_dynrelocs): Use the above to simplify plt sizing.
1133         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1134         (elf32_hppa_link_hash_table_create): Init.
1135         (BL22_RP): Define.
1136         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1137         (elf32_hppa_check_relocs): Set has_22bit_branch.
1138
1139         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1140         (final_link_relocate): Likewise.
1141
1142 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
1143
1144         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1145         search table if some FDE is DW_EH_PE_aligned encoded either.
1146         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1147
1148 2002-04-22  Richard Smith  <richard@ex-parrot.com>
1149             Jakub Jelinek  <jakub@redhat.com>
1150
1151         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1152         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1153         encoded personality.
1154         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1155         for CIE/FDE removal.
1156
1157 2002-04-20  Tom Rix  <trix@redhat.com>
1158
1159         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1160
1161 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
1162
1163         * archures.c (bfd_lookup_arch): Move the list order comment..
1164         (struct bfd_arch_info): ..to where it belongs.
1165         * bfd-in2.h: Regenerate.
1166
1167         * archures.c (bfd_lookup_arch): Add comment on list order.
1168         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1169         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1170         is always at head of list.
1171
1172 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
1173
1174         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1175         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1176         definition of these functions for ARM_WINCE builds as they are
1177         not used.
1178         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
1179         for ARM_WINCE builds.
1180
1181 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
1182
1183         * coff-arm.c (bfd_arm_process_before_allocation):
1184
1185 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
1186
1187         * cpu-sh.c (scan_mach): Delete.
1188         (arch_info_struct): Replace scan_mach with bfd_default_scan.
1189         (bfd_sh_arch): Likewise.
1190
1191 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
1192
1193         * ihex.c (ihex_write_object_contents): Fix check for records
1194         crossing 64K boundaries.
1195
1196 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
1197
1198         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1199         type rather than just assuming entries are ELF.
1200         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1201         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1202         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1203         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1204         rather than elf_link_hash_entry.
1205
1206 2002-04-15  Richard Henderson  <rth@redhat.com>
1207
1208         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1209         n32 binaries.
1210
1211 2002-04-15  Michael Snyder  <msnyder@redhat.com>
1212
1213         * opncls.c (bfd_close): Write contents if writeable.
1214         Minor formatting tidy-ups.
1215
1216 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
1217
1218         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1219
1220 2002-04-12  Michael Snyder  <msnyder@redhat.com>
1221
1222         * bfd-in.h (bfd_get_section_lma): New access macro.
1223         Minor white-space fix-up.
1224
1225 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
1226
1227         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1228         header pad.
1229
1230 2002-04-09  DJ Delorie  <dj@redhat.com>
1231
1232         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1233
1234 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
1235
1236         * coffcode.h (coff_read_word): New.
1237         (coff_compute_checksum): New.
1238         (coff_apply_checksum): New.
1239         (coff_write_object_contents): Call coff_apply_checksum () to
1240         apply checksum to PE image.
1241
1242 2002-04-08  Randolph Chung  <tausq@debian.org>
1243
1244         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1245         (elf32_hppa_final_link): Split out sorting logic to..
1246         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1247         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1248
1249 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
1250
1251         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1252         pattern.
1253         * configure: Re-generate.
1254
1255 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
1256
1257         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1258         is greater or equal to 4.3.3.
1259         * configure: Regenerate.
1260         Fix PR gdb/344.
1261
1262 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
1263
1264         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1265         R_CRIS_32_PCREL>: Fix typo in name.
1266         (cris_elf_check_relocs): Always create .rela.got here when
1267         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1268         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1269         assume it's created.
1270
1271 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
1272
1273         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1274         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1275         define.
1276         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1277         * bfd.c (bfd_link_hash_table_free): Define.
1278         * binary.c (binary_bfd_link_hash_table_free): Define.
1279         * bout.c (b_out_bfd_link_hash_table_free): Define.
1280         * coff-rs6000.c (rs6000coff_vec): Include
1281         _bfd_generic_link_hash_table_free.
1282         (pmac_xcoff_vec): Likewise.
1283         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1284         (aix5coff64_vec): Likewise.
1285         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1286         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1287         (bfd_elf32_bfd_link_hash_table_free): Define.
1288         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1289         (bfd_elf32_bfd_link_hash_table_free): Define.
1290         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1291         define.
1292         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1293         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1294         * ieee.c (ieee_bfd_link_hash_table_free): Define.
1295         * ihex.c (ihex_bfd_link_hash_table_free): Define.
1296         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1297         (_bfd_generic_link_hash_table_free): Add prototype.
1298         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1299         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1300         * linker.c (_bfd_generic_link_hash_table_free): New function.
1301         * mmo.c (mmo_bfd_link_hash_table_free): Define.
1302         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1303         * oasys.c (oasys_bfd_link_hash_table_free): Define.
1304         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1305         * som.c (som_bfd_link_hash_table_free): Define.
1306         * srec.c (srec_bfd_link_hash_table_free): Define.
1307         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1308         * versados.c (versados_bfd_link_hash_table_free): Define.
1309         * vms.c (vms_bfd_link_hash_table_free): New function.
1310         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1311
1312         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1313         instead of bfd_alloc.
1314         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1315         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1316         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1317         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1318         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1319         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1320         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1321         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1322         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1323         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1324         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1325         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1326         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1327         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1328         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1329         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1330         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1331         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1332         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1333         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1334         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1335         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1336         * m68klinux.c (linux_link_hash_table_create): Likewise.
1337         * sparclinux.c (linux_link_hash_table_create): Likewise.
1338         * sunos.c (sunos_link_hash_table_create): Likewise.
1339         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1340
1341         * targets.c: Add _bfd_link_hash_table_free to xvec.
1342
1343         * bfd-in2.h: Regenerate.
1344         * libbfd.h: Regenerate.
1345         * libcoff.h: Regenerate.
1346
1347 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
1348
1349         * dep-in.sed: Cope with absolute paths.
1350         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1351         Run "make dep-am".
1352         * Makefile.in: Regenerate.
1353         * coff-arm.c: Fix copyright date.
1354         * cpu-h8300.c: Likewise.
1355         * cpu-i370.c: Likewise.
1356         * cpu-s390.c: Likewise.
1357         * cpu-mips.c: Likewise.
1358         * po/SRC-POTFILES.in: Regenerate.
1359
1360 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1361
1362         * Makefile.am: Add elfxx-mips.c to the known backends.
1363         (elf32-mips.lo): remove dependency to coff/external.h.
1364         * Makefile.in: Regenerate.
1365         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1366         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1367         accordingly.
1368         * configure: Regenerate.
1369         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1370         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1371         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1372         MIPS specific backend functions.
1373         * elf32-mips.c: Moved most code to elfxx-mips.c.
1374         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1375         static.
1376         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1377         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1378         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1379         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1380         interface to allow selection of the right REL or RELA howto table.
1381         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1382         static. Let it refuse n32 objects.
1383         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1384         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1385         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1386         (elf32_mips_ignore_discarded_relocs): Rename from
1387         _bfd_elf32_mips_ignore_discarded_relocs.
1388         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1389         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1390         (elf_mips_howto_table_rela): Remove.
1391         * elf64-mips.c: Moved most code to elfxx-mips.c.
1392         (bfd_elf64_bfd_reloc_type_lookup): Make static.
1393         (mips_elf64_rtype_to_howto): New function.
1394         (mips_elf64_object_p): Likewise.
1395         (elf64_mips_irix_compat): Likewise.
1396         * elfxx-mips.c: New file containing common code merged together from
1397         elf32-mips.c and elf64-mips.c.
1398         * elfxx-mips.h: New file containing MIPS specific prototypes from
1399         elf-bfd.h.
1400         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1401         elf_backend_mips_rtype_to_howto.
1402
1403 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
1404
1405         * srec.c (MAXCHUNK, Chunk): Revise comments.
1406         (srec_write_record): Correct buffer size.
1407         (srec_write_header): Do without intermediate buffer.
1408         (srec_write_section): Validate Chunk.
1409         (srec_write_terminator): Pass NULL instead of dummy buffer.
1410         (srec_write_symbols): Pass file and symbol names directly to
1411         bfd_bwrite so sprintf won't overflow buffer.
1412
1413 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
1414
1415         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1416         PC relative relocs against hidden symbols.
1417         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1418
1419 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
1420
1421         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1422         LMAs, loop over segments until p_vaddr and p_memsz specify an
1423         extent enclosing the section.
1424
1425 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
1426
1427         * ihex.c (ihex_write_object_contents): Do not allow records to
1428         cross a 64K boundary - wrap if necessary.
1429
1430 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
1431
1432         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1433         which caused the returned LWP ID to always be 0.
1434
1435 2002-04-01  Richard Henderson  <rth@redhat.com>
1436
1437         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1438         (elf32_sparc_relocate_section): Use it to figure out when to
1439         initialize .got entries.
1440         * elf64-sparc.c: Similarly.
1441
1442 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
1443
1444         * linker.c (link_action): Ignore duplicate warning syms.
1445         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1446         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1447         (elf_adjust_dynamic_symbol): Likewise.
1448         (elf_export_symbol): Likewise.
1449         (elf_link_find_version_dependencies): Likewise.
1450         (elf_link_assign_sym_version): Likewise.
1451         (elf_link_sec_merge_syms): Likewise.
1452         (elf_link_output_extsym): Likewise.
1453         (elf_gc_sweep_symbol): Likewise.
1454         (elf_gc_propagate_vtable_entries_used): Likewise.
1455         (elf_gc_smash_unused_vtentry_relocs): Likewise.
1456         (elf_gc_allocate_got_offsets): Likewise.
1457         (elf_collect_hash_codes): Likewise.
1458         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1459         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1460         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1461         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1462         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1463         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1464         (elf_cris_discard_excess_dso_dynamics): Likewise.
1465         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1466         (mark_PIC_calls): Likewise.
1467         (allocate_plt_static): Likewise.
1468         (allocate_dynrelocs): Likewise.
1469         (readonly_dynrelocs): Likewise.
1470         * elf32-i386.c (allocate_dynrelocs): Likewise.
1471         (readonly_dynrelocs): Likewise.
1472         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1473         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1474         * elf32-mips.c (mips_elf_output_extsym): Likewise.
1475         (mips_elf_sort_hash_table_f): Likewise.
1476         (mips_elf_check_mips16_stubs): Likewise.
1477         * elf32-s390.c (allocate_dynrelocs): Likewise.
1478         (readonly_dynrelocs): Likewise.
1479         * elf32-sh.c (sh_elf_discard_copies): Likewise.
1480         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1481         (xstormy16_relax_plt_realloc): Likewise.
1482         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1483         (elf64_alpha_output_extsym): Likewise.
1484         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1485         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1486         (mips_elf64_check_mips16_stubs): Likewise.
1487         (mips_elf64_output_extsym): Likewise.
1488         * elf64-ppc.c (func_desc_adjust): Likewise.
1489         (allocate_dynrelocs): Likewise.
1490         (readonly_dynrelocs): Likewise.
1491         * elf64-s390.c (allocate_dynrelocs): Likewise.
1492         (readonly_dynrelocs): Likewise.
1493         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1494         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1495         (readonly_dynrelocs): Likewise.
1496         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1497         * aoutx.h (aout_link_write_other_symbol): Likewise.
1498         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1499         (_bfd_coff_write_global_sym): Likewise.
1500         * i386linux.c (linux_tally_symbols): Likewise.
1501         * m68klinux.c (linux_tally_symbols): Likewise.
1502         * sparclinux.c (linux_tally_symbols): Likewise.
1503         * pdp11.c (aout_link_write_other_symbol): Likewise.
1504         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1505         * xcofflink.c (xcoff_build_ldsyms): Likewise.
1506         (xcoff_write_global_symbol): Likewise.
1507
1508         * cofflink.c (_bfd_coff_final_link): Formatting.
1509         * cpu-mips.c (mips_compatible): Make static, prototype.
1510         * elf32-i386.c (elf_i386_check_relocs): Formatting.
1511         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1512         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1513         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1514         (mips_elf64_final_link): Likewise.
1515         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1516         prototype.
1517
1518 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
1519
1520         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1521         (SWAP_OUT_RELOC_OFFSET): Define.
1522
1523 2002-03-27  Gregory Steuck <greg@nest.cx>
1524
1525         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1526         terminating NULL if empty symbol table.
1527         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1528
1529 2002-03-26  H.J. Lu  (hjl@gnu.org)
1530
1531         * elflink.h (elf_link_input_bfd): Revert the last change since
1532         the gcc exception handling isn't fixed yet.
1533
1534 2002-03-26  H.J. Lu  (hjl@gnu.org)
1535
1536         * elflink.h (elf_link_input_bfd): Complain about relocations
1537         against local symbols in discarded sections.
1538
1539 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
1540
1541         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
1542
1543 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
1544
1545         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1546         section file offset for !SEC_LOAD sections.
1547
1548 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
1549
1550         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
1551         <case R_ARM_GOT>): Handle relocations to Thumb functions.
1552
1553 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
1554
1555         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
1556         Whitespace changes.
1557         * archive.c: Update copyright date.
1558         * bfd-in2.h: Regenerate.
1559         * libbfd.h: Regenerate.
1560         * Makefile.am: Run "make dep-am"
1561         * Makefile.in: Regenerate.
1562         * po/SRC-POTFILES.in: Regenerate.
1563
1564 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
1565
1566         * dwarf2.c (struct funcinfo): Move up.
1567         (lookup_address_in_function_table): New argument function_ptr.
1568         Set it.
1569         (lookup_address_in_line_table): New argument function.  If function
1570         is non-NULL, use it to handle ``addr'' before the first line note of
1571         the function.
1572         (comp_unit_find_nearest_line): Update and swap calls to
1573         lookup_address_in_function_table and lookup_address_in_line_table.
1574         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
1575         N_SLINE encountered if we see an N_FUN before any N_SLINE.
1576
1577 2002-03-20  Tom Rix  <trix@redhat.com>
1578
1579         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
1580         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
1581         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt.
1582
1583 2002-03-19  Tom Rix  <trix@redhat.com>
1584
1585         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
1586         dynamic objects in archives.
1587
1588 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
1589
1590         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
1591         STT_NOTYPE symbols to STT_OBJECT.
1592
1593 2002-03-18  Jan Hubicka  <jh@suse.cz>
1594
1595         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
1596
1597 2002-03-18  Tom Rix  <trix@redhat.com>
1598
1599         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
1600         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
1601         * coff-rs6000 (do_pad) : New function for archive padding.
1602         (do_copy) : New function for object file copying in archives.
1603         (do_shared_object_padding) : New function for padding shared
1604         objects to their text section alignment in archives.
1605         (bfd_xcoff_ar_achive_set_magic) : Stub.
1606         (xcoff_write_armap_big) : Use do_copy and do_pad.
1607         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
1608         do_copy and do_pad.
1609         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
1610         bfd_xcoff_magic_number.
1611         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
1612         fop.
1613         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
1614         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
1615         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
1616         * rs6000-core.c : Update copyright date.
1617         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
1618         csectpp.
1619         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
1620         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
1621         (coff_set_flags) : Use bfd_xcoff_magic_number.
1622         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
1623         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
1624         * Makefile.am : Same.
1625         * config.bfd : Same.
1626         * targets.c : Same.
1627         * configure : Regnerate.
1628         * Makefile.in : Same.
1629         * bfd-in2.h : Same.
1630
1631 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
1632
1633         * po/fr.po: Updated version.
1634
1635 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
1636
1637         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
1638         * libbfd.h: Regenerate.
1639         * archive.c (coff_write_armap): Pass on failures from
1640         bfd_write_bigendian_4byte_int.
1641
1642 2002-03-14  H.J. Lu <hjl@gnu.org>
1643
1644         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
1645         error to bfd_error_nonrepresentable_section for reinit_array
1646         section in DSO.
1647
1648 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
1649
1650         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
1651         OR it in rather than replacing previously selected flags.
1652
1653         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
1654         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
1655
1656 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
1657
1658         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
1659         (N): Use the above.
1660         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
1661         ensure reloc size matches before calling elf_link_input_bfd.
1662         Add an assert to check reloc size when counting output relocs.
1663
1664 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
1665
1666         * mmo.c (mmo_get_loc): Return NULL rather than false.
1667
1668 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
1669
1670         * po/fr.po: Updated version.
1671
1672 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
1673
1674         * archures.c (bfd_default_compatible): Test bits_per_word.
1675         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
1676         bfd_default_compatible.
1677         * cpu-i370.c (i370_compatible): Likewise.
1678         * cpu-sparc.c (sparc_compatible): Likewise.
1679         * cpu-h8300.c (compatible): Test in->arch == out->arch.
1680
1681         * elflink.h: Formatting fixes.
1682         (elf_link_output_extsym): Merge undefined and undef weak cases.
1683
1684         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
1685         when word size of input matches output word size.
1686
1687 2002-03-12  Andreas Jaeger  <aj@suse.de>
1688
1689         * cpu-i386.c (i386_compatible): New.  Use it instead of
1690         bfd_default_compatible.
1691
1692 2002-03-07  H.J. Lu  (hjl@gnu.org)
1693
1694         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
1695         as the type for bfd_reloc_val.
1696
1697 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1698
1699         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
1700         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
1701         (elf_hppa_final_link_relocate): Correct relocations for indirect
1702         references to local data through the DLT.  Fix .opd creation for
1703         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
1704         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
1705         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
1706         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1707         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
1708         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
1709         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
1710
1711 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
1712
1713         * merge.c (_bfd_merge_sections): Don't segfault if there
1714         is nothing to merge due to GC.
1715
1716 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
1717
1718         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
1719         symbols that have been forced local.
1720
1721         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
1722         to output forced local syms for non-shared link.
1723         (elf_link_output_extsym): Tweak condition for calling backend
1724         adjust_dynamic_symbol so that previous behaviour is kept.
1725         Whitespace changes throughout file.
1726
1727 2002-03-04  H.J. Lu <hjl@gnu.org>
1728
1729         * elf.c (bfd_section_from_shdr): Handle special sections,
1730         .init_array, .fini_array and .preinit_array.
1731         (elf_fake_sections): Likewise.
1732
1733         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
1734         DT entry only if the section is in output for .init_array,
1735         .fini_array and .preinit_array. Complain about .preinit_array
1736         section in DSO.
1737         (elf_bfd_final_link): Warn zero size for .init_array,
1738         .fini_array and .preinit_array sections.
1739
1740         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
1741         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
1742         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
1743         .preinit_array.
1744
1745 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
1746
1747         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
1748         * configure: Regenerate.
1749
1750 2002-03-02  Tom Rix  <trix@redhat.com>
1751
1752         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
1753         symbolic equiv.
1754         * coff-rs6000.c (xcoff_howto_table): Same.
1755
1756 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
1757
1758         * elflink.h (size_dynamic_sections): If section named
1759         ".preinit_array" exists, create DT_PREINIT_ARRAY and
1760         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
1761         ".init_array" and ".fini_array".
1762         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
1763         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
1764         DT_FINI_ARRAY.
1765
1766 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
1767
1768         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
1769         dynsyms.
1770
1771 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
1772
1773         * elf64-hppa.h: Update copyright date.
1774
1775         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
1776         (ppc64_elf_relocate_section): Don't generate power4 style branch
1777         hints for *_BRTAKEN and *_BRNTAKEN relocs.
1778
1779 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
1780
1781         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
1782         last patch.
1783         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1784
1785 2002-02-21  Andreas Jaeger  <aj@suse.de>
1786
1787         * elf64-x86-64.c: Major rework that introduces all recent changes
1788         to the x86-64 backend.  Get a closer match to elf32-i386.
1789         (struct elf64_x86_64_dyn_relocs): Rename from
1790         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
1791         all users.
1792         (struct elf64_x86_64_link_hash_table): Add short cuts to some
1793         sections.
1794         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
1795         remove casts, initialize new hash members.
1796         (create_got_section): New.
1797         (elf64_x86_64_create_dynamic_sections): New.
1798         (elf64_x86_64_copy_indirect_symbol): New.
1799         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
1800         relocs, .got or .relgot here but do it in allocate_dynrelocs.
1801         Reference count possible .plt and .got entries.  Don't test input
1802         section SEC_READONLY here to try to avoid copy relocs, and keep
1803         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
1804         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
1805         pointer to "sreloc" section in elf_section_data. Tweak condition
1806         under which .got created.  Report files with bad relocation
1807         section names.
1808         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1809         Reference count possible .plt entries.  Don't deallocate .got and
1810         .relgot space here.
1811         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
1812         do copy reloc processing for weakdefs.  Remove redundant casts and
1813         aborts.  Delay setting of vars until needed.  Move creation of
1814         dynamic symbols and allocation of .plt and .rela.plt to
1815         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
1816         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1817         (allocate_dynrelocs): New.
1818         (readonly_dynrelocs): New.
1819         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
1820         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
1821         Zero out the dynamic allocated content space.
1822         (elf64_x86_64_discard_copies): Removed.
1823         (elf64_x86_64_relocate_section): Make use of dynamic section
1824         short-cuts.  Localise vars, and delay setting.  Better error
1825         reporting, replace BFD_ASSERT with abort.  Check
1826         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
1827         regular object file and tread the weak definition as the normal
1828         one.  Don't discard relocs for undefweak or undefined symbols and
1829         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
1830         relocs.
1831         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
1832         symbols that have been forced local.  Use same test to decide if
1833         we can use a relative reloc for got as relocate_section.  Expand
1834         SHN_UNDEF comment.  Move expressions out of function calls.
1835         Replace BFD_ASSERT with abort.
1836         (bfd_elf64_bfd_final_link): Removed.
1837         (elf_backend_copy_indirect_symbol): Define.
1838
1839 2002-02-20  Tom Rix  <trix@redhat.com>
1840
1841         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
1842         (_bfd_xcoff_reloc_type_lookup): Use it.
1843         * coff64-rs6000.c (xcoff64_howto_table): Same.
1844         (xcoff64_reloc_type_lookup): Same.
1845
1846 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
1847
1848         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
1849         little endian.
1850
1851 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1852
1853         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
1854         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
1855         * bfd-in2.h: Regenerate.
1856         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
1857         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
1858         with "s390:64-bit".
1859         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
1860         (elf_s390_reloc_type_lookup): Likewise.
1861         (elf_s390_check_relocs): Likewise.
1862         (elf_s390_gc_sweep_hook): Likewise.
1863         (elf_s390_relocate_section): Likewise.
1864         (elf_s390_object_p): Use renamed architecture define.
1865         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
1866
1867 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
1868
1869         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
1870
1871 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
1872
1873         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
1874         absptr -> pcrel optimization for shared libs.
1875         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
1876         library cannot be converted to pcrel.
1877         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
1878         relative.
1879         * elf32-i386.c (elf_i386_relocate_section): If
1880         _bfd_elf_section_offset returned -2, skip, but make sure the
1881         relocation is installed.
1882         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
1883         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1884         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1885         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1886         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1887         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1888         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1889         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1890         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1891         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1892         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1893         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1894         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1895         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1896         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
1897         _bfd_elf_section_offset returning -2 the same way as -1.
1898         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
1899         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
1900         and BFD_ASSERT.
1901         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
1902
1903 2002-02-18  Tom Rix  <trix@redhat.com>
1904
1905         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
1906         (bfd_xcoff_size_dynamic_sections): Same.
1907         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
1908         (bfd_xcoff_size_dynamic_sections): Same.
1909         * coff-rs6000.c (xcoff_generate_rtinit): Same.
1910         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
1911         * libxcoff.h (struct xcoff_backend_data_rec): Same.
1912         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
1913         * bfd-in2.h: Regenerate.
1914
1915 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
1916
1917         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
1918         (struct ppc_link_hash_table): Add sfpr.
1919         (ppc64_elf_link_hash_table_create): Init it.
1920         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
1921         .glink out to..
1922         (create_linkage_sections): ..here.  Make .sfpr too.
1923         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
1924         dynobj early.
1925         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
1926         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
1927         ._restf* functions, and create as needed.
1928         (func_desc_adjust): Only force_local for shared libs.
1929
1930 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
1931
1932         * configure.in: Bump version number post 2.12 branching.
1933         * configure: Regenerate.
1934
1935 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
1936
1937         * mmo.c: Correct and improve comments.
1938         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
1939         zero-pad.  Use input to fill up non-empty bfd buffer.
1940         (mmo_flush_chunk): New function.
1941         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
1942         changed.  Don't emit location specifier if VMA is same as
1943         *LAST_VMAP after omitting leading zero contents.  Call
1944         mmo_flush_chunk before emitting location specifier.
1945         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
1946         with mmo_write_loc_chunk calls.
1947         (mmo_internal_write_section): Call mmo_flush_chunk after
1948         mmo_write_chunk.
1949         (mmo_write_symbols_and_terminator): Move :Main to first position
1950         in symbol array.  Add faked one if it does not exist if there are
1951         other symbols.  Don't add it if there are no symbols at all.  Move
1952         out test for value of :Main from symbol loop.  Rename table
1953         fakemain to maintable and variable mainsym to fakemain.
1954
1955 2002-02-15  Richard Henderson  <rth@redhat.com>
1956
1957         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
1958         section with no got matches any got.  Simplify error generaion.
1959
1960 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
1961
1962         Support arbitrary length fill patterns.
1963         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
1964         (_bfd_default_link_order): Remove bfd_fill_link_order code.
1965         Call default_data_link_order.
1966         (default_fill_link_order): Delete.
1967         (default_data_link_order): New function.
1968         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
1969         of bfd_fill_link_order with bfd_data_link_order.
1970         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
1971         * elf64-mips.c (mips_elf64_final_link): Likewise.
1972
1973         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
1974         Correct value returned in "end" for "0x<non-hex>".
1975
1976 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
1977
1978         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
1979         (scan): Test against 'mach' field in info structure.
1980
1981 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
1982
1983         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
1984
1985 2002-02-14  Matt Fredette  <fredette@netbsd.org>
1986
1987         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
1988         EF_M68000.
1989
1990 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
1991
1992         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
1993         non-zero physical addresses when adjusting the LMAs of new
1994         sections.
1995
1996 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1997
1998         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
1999         from _bfd_elf_hppa_gen_reloc_type.
2000         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2001         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2002         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2003         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2004
2005 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
2006
2007         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2008         loading its contents if there's nothing to do in it.
2009
2010 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
2011
2012         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2013         64k boundary.
2014
2015         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2016         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2017         (ppc64_elf_finish_dynamic_sections): Set values for them.
2018
2019 2002-02-11  Michael Snyder  <msnyder@redhat.com>
2020
2021         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2022         * elf.c (elfcore_grok_pstatus): Add prototype.
2023         (elfcore_grok_lwpstatus): Add prototype.
2024         (elfcore_write_lwpstatus): New function.
2025         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2026
2027 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
2028
2029         * elf32-sh.c: Added missing prototypes.
2030         * elf32-sh64.c: Likewise.
2031         (sh_elf_align_loads): Mark unused args as such.
2032         * elf64-sh64.c: Added missing prototypes.
2033         (struct elf_sh64_link_hash_entry): Fix typo.
2034         (sh_elf64_relocate_section): Fix info argument passed to
2035         _bfd_elf_section_offset.
2036
2037 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
2038
2039         * Makefile.am: "make dep-am".
2040         * Makefile.in: Regenerate.
2041         * aclocal.m4: Regenerate.
2042         * config.in: Regenerate.
2043         * configure: Regenerate.
2044
2045 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
2046
2047         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2048         variable warnings.
2049         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2050         comparison warning.
2051         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2052         cast warnings for the common case.
2053
2054 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
2055
2056         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2057         vectors.
2058         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2059         vectors.
2060
2061 2002-02-09  Richard Henderson  <rth@redhat.com>
2062
2063         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2064         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2065         (elf64_alpha_relocate_section): Likewise.
2066         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2067         * bfd-in2.h, libbfd.h: Rebuild.
2068
2069 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
2070
2071         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2072         that base-plus-offset reloc accounting is consistent.
2073         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2074         up to date for undefined symbols.
2075
2076 2002-02-08  Eric Christopher  <echristo@redhat.com>
2077
2078         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2079
2080         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2081         sections for the O32 ABI.
2082
2083 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
2084
2085         * elf32-arm.h: Fix formatting of _("...").
2086         * elf32-d10v.c: Likewise.
2087         * elf32-m68k.c: Likewise.
2088         * elf32-mips.c: Likewise.
2089
2090 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
2091
2092         * coff-or32.c: Fix compile time warning messages.
2093
2094 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
2095
2096         Contribute sh64-elf.
2097         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
2098         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2099         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2100         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2101         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2102         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2103         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2104         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2105         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2106         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2107         New relocs.
2108         * libbfd.h, bfd-in2.h: Rebuilt.
2109         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2110         (sh_reloc_map): Map them.
2111         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2112         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2113         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2114         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2115         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2116         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2117         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2118         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2119         datalabel_got_offset.
2120         (sh_elf_link_hash_newfunc): Initialize it.
2121         (sh_elf_relocate_section): Augment the scope of
2122         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
2123         GOT and GOTOFF handling to new SHmedia relocation types.  Support
2124         GOT_BIAS.
2125         (sh_elf_check_relocs): Likewise.
2126         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2127         PLT entries using movi_shori_putval.  Support GOT_BIAS.
2128         (sh_elf_finish_dynamic_sections): Likewise.
2129         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2130         relocation, it's now done by the caller.
2131         (GOT_BIAS): New.
2132         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2133         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2134         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2135         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2136         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2137         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2138         sh64_elf64_hash_table): New.
2139         (sh_elf64_howto_table): Introduce new relocs.
2140         (sh_elf64_info_to_howto): Accept new PIC relocs.
2141         (sh_elf64_relocate_section): Augment the scope of
2142         seen_stt_datalabel.  Support new PIC relocs.
2143         (sh_elf64_check_relocs): Support new PIC relocs.
2144         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2145         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2146         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2147         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2148         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2149         movi_shori_putval, movi_3shori_putval,
2150         sh64_elf64_create_dynamic_sections,
2151         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2152         sh64_elf64_size_dynamic_sections,
2153         sh64_elf64_finish_dynamic_symbol,
2154         sh64_elf64_finish_dynamic_sections): New.
2155         (elf_backend_create_dynamic-sections,
2156         bfd_elf64_bfd_link_hash_table_create,
2157         elf_backend_adjust_dynamic_symbol,
2158         elf_backend_size_dynamic_sections,
2159         elf_backend_finish_dynamic_symbol,
2160         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2161         elf_backend_plt_readonly, elf_backend_want_plt_sym,
2162         elf_backend_got_header_size, elf_backend_plt_header_size):
2163         Define.
2164         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
2165         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2166         match official numbers and names; moved unmaching ones to the
2167         range 0xf2-0xff.
2168         * elf32-sh64.c, elf64-sh64.c: Likewise.
2169         2001-03-12  DJ Delorie  <dj@redhat.com>
2170         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2171         sections.
2172         2001-03-12  DJ Delorie  <dj@redhat.com>
2173         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2174         be aligned.
2175         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2176         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
2177         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2178         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2179         .cranges section with SEC_SORT_ENTRIES set.
2180         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2181         incoming sorted .cranges section.
2182         (sh64_bfd_elf_copy_private_section_data): New.
2183         (sh64_elf_final_write_processing): Only sort .cranges and modify
2184         start address if called by linker.
2185         2001-01-08  Ben Elliston  <bje@redhat.com>
2186         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2187         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
2188         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2189         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
2190         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2191         line.  Add comments before all entries.
2192         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2193         comment.
2194         (sh_elf64_reloc): Correct head comment.
2195         (sh_elf64_relocate_section): Correct spacing.
2196         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2197         instead call reloc_dangerous callback.
2198         <case R_SH_SHMEDIA_CODE>: New case.
2199         (sh_elf64_gc_mark_hook): Correct spacing.
2200         (sh_elf64_check_relocs): Ditto.
2201         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2202         New case.
2203         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2204         functions.
2205         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2206         clarify describing comment.  Add comments before all entries.
2207         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2208         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2209         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
2210         Sort .cranges section in final link.  Prepare to set bit 0 on
2211         entry address.
2212         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2213         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2214         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2215         .cranges section.
2216         (sh64_backend_section_from_shdr): New, to recognize
2217         SHT_SH5_CR_SORTED on incoming .cranges section.
2218         (elf_backend_section_from_shdr): Define.
2219         (sh64_elf_final_write_processing): Sort outgoing .cranges
2220         section.  (New, temporarily disabled:) Set bit 0 on entry address
2221         according to ISA type.
2222         (sh64_find_section_for_address): New.
2223         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2224         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2225         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
2226         bfd_malloc, not xmalloc.
2227         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
2228         global.
2229         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2230         temporarily disabled) setting bit 0 on entry address.
2231         (elf_backend_final_write_processing): Define.
2232         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
2233         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2234         be a proper relocation for PTA and PTB rather than a marker.
2235         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2236         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2237         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2238         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2239         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2240         Zero src_mask.
2241         * elf64-sh64.c: Ditto.
2242         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2243         * elf32-sh64.c: Include opcodes/sh64-opc.h
2244         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2245         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
2246         parameters.  No unused parameters.  Caller changed.
2247         <case R_SH_PT_16>: New case.
2248         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2249         * Makefile.in: Regenerate.
2250         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
2251         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2252         all code sections.
2253         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2254         (sh64_elf_merge_private_data): Ditto.
2255         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2256         to access stored section flags.
2257         (sh64_elf_final_write_processing): Return immediately unless
2258         called by linker.  Use sh64_elf_section_data (cranges) to get size
2259         of linker-generated cranges entries.
2260         (sh64_elf_copy_private_data): Add missing "return true".
2261         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2262         (sh_elf64_merge_private_data): Ditto.
2263         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
2264         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2265         elf64-sh64.c:sh64_elf_fake_sections.
2266         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2267         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
2268         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2269         (sh64_elf_final_write_processing): New.
2270         (elf_backend_final_write_processing): Define.
2271         (sh64_elf_fake_sections): Get header flags from tdata field.
2272         (sh64_elf_copy_private_data): Do not call
2273         sh64_elf_copy_private_data_internal, just copy e_flags field.
2274         (sh64_elf_merge_private_data): Do not call
2275         sh64_elf_copy_private_data_internal.
2276         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
2277         Remove EF_SH64_ABI64, let ELF size make difference.
2278         Remove SH64-specific BFD section flag.
2279         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2280         containing SHmedia through elf_section_data (asect)->tdata
2281         non-zero, not using a BFD section flag.
2282         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2283         (sh64_elf_merge_private_data): Similar.
2284         (elf_backend_section_flags): Don't define.
2285         (sh64_elf_backend_section_flags): Delete.
2286         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2287         not EF_SH64_ABI64.
2288         (sh_elf64_merge_private_data): Similar.
2289         * section.c (Section flags definitions): Don't define
2290         SEC_SH_ISA_SHMEDIA.
2291         (bfd-in2.h): Regenerate.
2292         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
2293         Make DataLabel references work with partial linking.
2294         * elf32-sh64.c: Fix formatting.
2295         (sh64_elf_link_output_symbol_hook): New.
2296         (elf_backend_link_output_symbol_hook): Define to
2297         sh64_elf_link_output_symbol_hook.
2298         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2299         undefined if partial linking.  Adjust sanity check.
2300         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2301         (elf_backend_link_output_symbol_hook): Define to
2302         sh64_elf64_link_output_symbol_hook.
2303         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2304         undefined if partial linking.  Adjust sanity check.
2305         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
2306         Implement semantics for inter-file DataLabel references.
2307         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2308         (sh64_elf64_add_symbol_hook): New.
2309         (sh_elf64_relocate_section): If passing an indirect symbol with
2310         st_type STT_DATALABEL on the way to a symbol with st_other
2311         STO_SH5_ISA32, do not bitor 1 to the relocation.
2312         (elf_backend_add_symbol_hook): Define to
2313         sh64_elf64_add_symbol_hook.
2314         * elf64-sh32.c: Tweak comments.
2315         (DATALABEL_SUFFIX): Define.
2316         (sh64_elf_add_symbol_hook): New.
2317         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2318         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2319         symbol with st_type STT_DATALABEL on the way to a symbol with
2320         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2321         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
2322         Pass through STT_DATALABEL.
2323         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2324         (elf_backend_get_symbol_type): Define.
2325         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2326         (elf_backend_get_symbol_type): Define.
2327         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
2328         * elf32-sh64.c: Tweak comments.
2329         (sh64_elf_copy_private_data_internal): Add prototype.
2330         (bfd_elf32_bfd_set_private_flags): Define.
2331         (sh64_elf_copy_private_data_internal): Compare machine name, not
2332         textual BFD target name, to check whether to copy section flag
2333         SHF_SH5_ISA32.
2334         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2335         Tweak section-contents-type-mismatch message.
2336         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2337         Validize reloc-types.
2338         * elf64-sh64.c: New file.
2339         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2340         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2341         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2342         Regenerate dependencies.
2343         * Makefile.in: Regenerate.
2344         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2345         bfd_elf64_sh64l_vec.
2346         * configure.in: Handle bfd_elf64_sh64_vec and
2347         bfd_elf64_sh64l_vec.
2348         * configure: Regenerate.
2349         * po/POTFILES.in: Regenerate.
2350         * po/bfd.pot: Regenerate.
2351         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
2352         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2353         anything else but EF_SH64 and EF_SH64_ABI64.
2354         (sh64_elf_merge_private_data): Emit error for anything else but
2355         EF_SH64 and EF_SH64_ABI64.
2356         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2357         from targ_selvecs.
2358         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2359         bfd_elf32_sh64l_vec as a temporary measure.
2360         * configure: Regenerate.
2361         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
2362         * cpu-sh.c (arch_info_struct): Include sh5 item
2363         unconditionalized.
2364         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2365         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2366         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2367         * elf32-sh64.c: Tweak comments.
2368         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2369         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
2370         (sh64_elf_copy_private_data_internal): Wrap long line.
2371         (sh64_elf_merge_private_data): Rewrite to allow objects from
2372         SH64 subsets to be linked together.
2373         (INCLUDE_SHMEDIA): Define.
2374         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2375         Parenthesize plus-expression inside or-expression.
2376         <global symbol>: Ditto.
2377         (sh_elf_set_mach_from_flags): Remove code refusing
2378         deleted EF_SH64_32BIT_ABI flag.
2379         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
2380         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2381         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2382         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2383         (sh_elf_relocate_section) <local symbol>: Or 1 in
2384         calculation of relocation if sym->st_other & STO_SH5_ISA32.
2385         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2386         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2387         relocation.
2388         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
2389         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2390         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2391         Regenerate dependencies.
2392         * Makefile.in: Regenerate.
2393         * archures.c: Add bfd_mach_sh5.
2394         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2395         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
2396         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2397         * configure: Regenerate.
2398         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2399         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2400         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2401         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2402         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2403         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2404         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2405         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2406         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2407         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2408         in item for SH5.
2409         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2410         for SHmedia relocs.
2411         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2412         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2413         shmedia_prepare_reloc, goto final_link_relocate if it returns
2414         non-zero, else fail as before.
2415         (sh_elf_set_mach_from_flags): Provide function only if not defined
2416         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
2417         (sh_elf_set_private_flags): Provide function only if not defined
2418         as a macro.
2419         (sh_elf_copy_private_data): Similar.
2420         (sh_elf_merge_private_data): Similar.
2421         * section.c (SEC_SH_ISA_SHMEDIA): New.
2422         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2423         * elf32-sh64.c: New file.
2424         * libbfd.h: Regenerate.
2425         * bfd-in2.h: Regenerate.
2426         * po/POTFILES.in: Regenerate.
2427         * po/bfd.pot: Regenerate.
2428         * bfd-in2.h: Regenerate.
2429         * libbfd.h: Regenerate.
2430
2431 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
2432
2433         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2434         been included, not drag it in.
2435         * bfd-in2.h: Regenerate.
2436
2437 2002-02-06  H.J. Lu  (hjl@gnu.org)
2438
2439         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2440         the mach and ISA fields if necessary.
2441
2442 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
2443
2444         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2445         ARM architecture when an F_ARM_5 flag is detected, since we cannot
2446         be sure exactly which architecture this represents.
2447
2448 2002-02-05  Nick Clifton  <nickc@redhat.com>
2449
2450         * po/tr.po: Updated translation.
2451
2452 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
2453
2454         From Jimi X <jimix@watson.ibm.com>
2455         * archures (bfd_mach_ppc64): Define.
2456         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2457         (bfd_powerpc_arch): Define.
2458         * bfd-in2.h: Regenerate.
2459         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2460         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2461         (bfd_powerpc_archs): Add default powerpc64 arch.
2462
2463 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
2464
2465         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2466         against section syms in readonly sections.  Don't do the global
2467         sym check if we find one.
2468         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2469         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
2470         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2471         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2472         (elf_s390_grok_prstatus): Add missing prototype.
2473
2474 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
2475
2476         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2477         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2478         Call bfd_get_section_by_name only once.  Initialize
2479         bpodata->n_bpo_relocs_this_section.
2480         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2481         referring to DSOs.
2482         (bpo_reloc_request_sort_fn): Don't use difference of values as
2483         return-value.
2484
2485 2002-02-02  David O'Brien  <obrien@FreeBSD>
2486
2487         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
2488         version 4.5 and later the same as 5-CURRENT.
2489         * configure: Re-generate.
2490
2491 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
2492
2493         * config.bfd (hppa*-*-netbsd*): New target.
2494
2495 2002-01-31  Philipp Thomas  <pthomas@suse.de>
2496
2497         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2498         to front of message. Unify messages with elf32-arm.h. Use
2499         commas where neccessary.
2500         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2501         ERROR in messages. Unify messages with coff-arm.c. Correct
2502         VFP/FPA error message.
2503         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2504         APCS-32 for translation.
2505
2506 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
2507
2508         Perform on-demand global register allocation from
2509         R_MMIX_BASE_PLUS_OFFSET relocs.
2510         * elf64-mmix.c (struct bpo_reloc_section_info, struct
2511         bpo_reloc_request, struct bpo_greg_section_info): New.
2512         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2513         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2514         _bfd_mmix_check_all_relocs,
2515         _bfd_mmix_prepare_linker_allocated_gregs,
2516         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2517         (elf_mmix_howto_table): Correct src_mask for most relocs.
2518         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2519         case.
2520         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2521         case.  Fix typo in comment.  New label do_mmix_reloc.
2522         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2523         store first object file with a base-plus-offset reloc.  Call
2524         mmix_elf_check_common_relocs for the part common with mmo.
2525         (mmix_elf_final_link): Write out linker-allocated register
2526         contents section.
2527         (elf_backend_gc_sweep_hook): Define.
2528         (bfd_elf64_bfd_relax_section): Define.
2529
2530         * mmo.c: Don't include <ctype.h>
2531         (mmo_init): Correct init-once logic.
2532
2533 2002-02-01  Tom Rix  <trix@redhat.com>
2534
2535         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2536
2537 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
2538
2539         * Makefile.am: Run "make dep-am"
2540         * Makefile.in: Regenerate.
2541
2542 2002-01-31  David O'Brien  <obrien@FreeBSD>
2543
2544         * configure.in: Recognize the differences in core files from FreeBSD
2545         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
2546         5-CURRENT.
2547         * configure: Regenerate.
2548
2549 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
2550
2551         * coff-or32.c: New file.
2552         * cpu-or32.c: New file.
2553         * elf32-or32.c: New file.
2554         * archures.c: Add support for or32.
2555         * targets.c: Add support for or32.
2556         * bfd-in2.h: Regenerate.
2557         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
2558         coff_write_object_contents): Add support for or32.
2559         * config.bfd: Add target.
2560         * configure.in: Add support for or32.
2561         * configure: Regenerate.
2562         * Makefile.am: Add support for or32.
2563         * Makefile.in: Regenerate.
2564         * po/SRC-POTFILES.in: Add or32 files.
2565         * po/bfd.pot: Regenerate.
2566
2567 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
2568             Don Lindsay  <lindsayd@cisco.com>
2569
2570         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
2571         false' with a return of a bfd_reloc_ error code.
2572
2573 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
2574
2575         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2576         unexport unreferenced symbols when --export-dynamic.  Call
2577         _bfd_elf_strtab_delref when unexporting.
2578
2579 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
2580
2581         * bfd-in.h: Include <stdbool.h> if it is available.
2582         * bfd-in2.h: Regenerated.
2583
2584 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
2585
2586         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
2587         not go via the plt.
2588
2589 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
2590
2591         * archures.c: Tidy up formatting of embedded comments.
2592         * bfd.c: Tidy up formatting of embedded comments.
2593         * bfd-in.h: Fix formatting of comments.
2594         * reloc.c: Tidy up formatting of ordinary & embedded comments.
2595         * section.c: Tidy up formatting of embedded comments.
2596         * syms.c: Tidy up formatting of embedded comments.
2597         * targets.c: Tidy up formatting of embedded comments.
2598
2599         * bfd-in2.h: Regenerate.
2600
2601 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
2602
2603         * vms-tir.c (cmd_name): New function.
2604         (tir_cmd_name): New function.
2605         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
2606         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
2607         Fix formatting.
2608
2609         * peXXigen.c (pe_print_idata): Rearrange message to aid in
2610         translation.
2611         (pe_print_pdata):  Rearrange message to aid in translation.
2612
2613         * libbfd.c (warn_deprecated): Rearrange error message to aid in
2614         translation.
2615
2616         * ihex.c (ihex_write_object_contents): Fix spelling typo.
2617
2618         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
2619
2620         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
2621         message to aid in translation.
2622
2623         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
2624         to aid in translation.
2625
2626         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
2627
2628 2002-01-30  Philipp Thomas  <pthomas@suse.de>
2629
2630         * coff-arm.c, elf32-elf.h: Unify messages.
2631
2632 2002-01-30  Nick Clifton <nickc@redhat.com>
2633
2634         * po/sv.po: Updated translation.
2635
2636 2002-01-30  Philipp Thomas  <pthomas@suse.de>
2637
2638         * dwarf2.c (read_abbrev): Use full section name in error message.
2639         (decode_line_info): Likewise.
2640
2641         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
2642         message.
2643
2644 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
2645
2646         * elf64-ppc.c (func_desc_adjust): Only provide missing function
2647         descriptor symbols for undefined function code syms.  Clear
2648         ELF_LINK_NON_ELF so that they can stay weak.
2649
2650 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
2651             Mitch Lichtenberg  <mpl@broadcom.com>
2652
2653         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
2654         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
2655         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
2656         generation.
2657         * bfd-in2.h: Regenerate.
2658
2659 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
2660
2661         * elf32-mips.c: Add additional comments about HI16 relocation
2662         processing.
2663         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
2664         pc-relative relocations.  (Reverts change made on 2001-10-31.)
2665         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
2666         for pc-relative relocations.
2667         (mips_elf_calculate_relocation): Add a comment about a kludge
2668         in the R_MIPS_GNU_REL_HI16 handling.
2669         (_bfd_mips_elf_relocate_section): Implement that kludge;
2670         adjust pc-relative HI16 relocation for difference in HI16 and
2671         LO16 addresses, since it can't easily be done in
2672         mips_elf_calculate_relocation.
2673
2674 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2675
2676         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
2677         relocations with PC32 relocations for undefined or weak symbols.
2678         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
2679         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
2680
2681 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
2682
2683         * elfcore.h (elf_core_file_p): Improve comment for last change.
2684
2685 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
2686
2687         * configure: Regenerated.
2688
2689 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
2690
2691         * elfcore.h (elf_core_file_p): Set the machine architecture
2692         before processing the program headers.
2693
2694 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
2695
2696         * configure.in <64-bit configuration>: If using gcc, check and
2697         emit error for egcs-1.1.2.
2698         * configure: Regenerate.
2699
2700 2002-01-26  Egor Duda  <deo@logos-m.ru>
2701
2702         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
2703         as possible to avoid stack corruption.
2704
2705 2002-01-26  Richard Henderson  <rth@redhat.com>
2706
2707         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
2708         for non-allocated sections.
2709
2710 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
2711
2712         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
2713         prstat.pr_reg even if it is a struct.
2714
2715 2002-01-25  Steve Ellcey <sje@cup.hp.com>
2716
2717         * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
2718
2719 2002-01-25  Philipp Thomas  <pthomas@suse.de>
2720
2721         * coffgen.c (coff_print_symbol): Don't mark info message
2722         for translation.
2723
2724 2002-01-25  Nick Clifton <nickc@redhat.com>
2725
2726         * po/fr.po: Updated translation.
2727         * po/es.po: Updated translation.
2728
2729 2002-01-25  Philipp Thomas  <pthomas@suse.de>
2730
2731         * coff-alpha.c (alpha_relocate_section): Unify warning message
2732         for GP relative relocations without GP defined.
2733         * coff-mips.c (mips_relocate_section): Likewise.
2734
2735 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
2736
2737         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
2738         unsigned overflow when new_offset < old_offset.
2739
2740 2002-01-24  Philipp Thomas  <pthomas@suse.de>
2741
2742         * bfd.c (_bfd_abort): Fix typo.
2743
2744 2002-01-23  Richard Henderson  <rth@redhat.com>
2745
2746         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
2747         plt entries for undefweak symbols.
2748
2749 2002-01-23  Steve Ellcey <sje@cup.hp.com>
2750
2751         * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
2752         DEFAULT_VECTOR.
2753         (bfd_elf64_ia64_hpux_big_vec): Ditto.
2754         (bfd_elf32_h8300_vec): Ditto.
2755
2756 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
2757
2758         * elf64-ppc.c: Remove stale part of ABI comment.
2759         (NO_OPD_RELOCS): Define.
2760         (ppc64_elf_check_relocs): Use it.
2761         (ppc64_elf_relocate_section): Here too.
2762         (build_one_stub): Don't point function syms at the stub.  Instead,
2763         hijack plt.offset.
2764         (ppc64_elf_relocate_section): Check whether REL24 relocs should
2765         really go to the stub.  Make all dynamic relocs in opd against
2766         locals.
2767         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
2768         plt.offset.
2769
2770 2002-01-22  Richard Henderson  <rth@redhat.com>
2771
2772         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
2773
2774 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
2775
2776         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
2777         TOC_BASE_OFF adjustment.
2778
2779         * Makefile.am: Run "make dep-am".
2780         * Makefile.in: Regenerate.
2781         * po/SRC-POTFILES.in: Regenerate.
2782
2783 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2784
2785         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
2786         host defines.
2787
2788 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
2789
2790         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
2791         Check for and emit error if sgot is NULL at this point.
2792
2793 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
2794
2795         * config.bfd (ia64*-*-netbsd*): New target.
2796
2797 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
2798
2799         * som.c (som_write_space_strings): Comment typo fix.
2800
2801 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
2802
2803         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
2804         is_func_descriptor fields.
2805         (link_hash_newfunc): Init them.
2806         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
2807         dot are candidates for plt entries.  When processing .opd relocs,
2808         set function descriptor strings to point inside function code
2809         string, and set new ppc_link_hash_entry fields.
2810         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
2811         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
2812         function descriptors.  It's now done in..
2813         (func_desc_adjust): New.
2814         (ppc64_elf_func_desc_adjust): New.
2815         (define elf_backend_always_size_sections): Define.
2816         (ppc64_elf_hide_symbol): New.
2817         (define elf_backend_hide_symbol): Define.
2818         (allocate_dynrelocs): Remove code looking up function descriptors
2819         as that has been done earlier.
2820         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
2821         table.
2822         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
2823         up function descriptor.
2824         (build_one_stub): Look up the function code sym.  Check for
2825         invalid plt offsets.
2826         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
2827         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
2828
2829         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
2830         boolean param.
2831         (_bfd_elf_link_hash_hide_symbol): Likewise.
2832         * elflink.h (elf_link_add_object_symbols): Adjust call to
2833         elf_backend_hide_symbol.
2834         (elf_fix_symbol_flags): Likewise.
2835         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
2836         than bfd_alloc.
2837         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
2838         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
2839         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2840         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
2841         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
2842         and adjust to suit.
2843         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
2844         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
2845         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2846
2847 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
2848
2849         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
2850         dynamic function descriptor symbol, not the associated function
2851         symbol.
2852
2853 2002-01-17  Eric Christopher  <echristo@redhat.com>
2854
2855         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
2856
2857 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
2858
2859         * po/bfd.pot: Regenerate.
2860         * po/fr.po: Regenerate.
2861
2862 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
2863
2864         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
2865         Remove "Elf_Internal_Shdr *" param.
2866         (_bfd_mips_elf_section_from_bfd_section): Ditto.
2867         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
2868         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
2869         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
2870         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
2871         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
2872         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
2873         function to override special sections.  Remove hdr arg from
2874         backend call, and don't loop.
2875
2876 2002-01-16  Eric Christopher  <echristo@redhat.com>
2877
2878         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
2879         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
2880         relocations requiring gp0 and gp.
2881
2882 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
2883
2884         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
2885         EF_ARM_VFP_FLOAT.
2886         (elf32_arm_print_private_bfd_data): Likewise.
2887
2888 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
2889
2890         * po/tr.po: Import new version.
2891
2892 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
2893
2894         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
2895         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
2896         (ORI_R0_R0_0): Correct.
2897
2898 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
2899
2900         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
2901         when plt_not_loaded.
2902         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
2903         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
2904         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
2905         (ppc64_elf_glink_code): Delete.
2906         (PPC64_ELF_GLINK_SIZE): Delete.
2907         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
2908         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
2909         ORI_R0_R0_0): Define.
2910         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
2911         (struct ppc_link_hash_table): Add sstub and plt_overflow.
2912         (ppc64_elf_link_hash_table_create): Init them.
2913         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
2914         Don't copy to shared lib.
2915         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
2916         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
2917         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
2918         room for .stub and .glink code.
2919         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
2920         DT_PPC64_GLINK.
2921         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
2922         bfd_elf64_bfd_final_link.
2923         (bfd_elf64_bfd_final_link): Don't define.
2924         (ppc64_elf_size_stubs): New.
2925         (build_plt_stub): New.
2926         (build_one_stub): New.
2927         (ppc64_elf_build_stubs): New.
2928         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
2929         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
2930         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
2931         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
2932         case output sections not separate.  Adjust DT_RELASZ to not
2933         include plt relocs.  Set reserved got entry.  Set got and plt
2934         entry size.
2935         (elf_backend_got_header_size): Set to 8.
2936         * elf64-ppc.h: New file.
2937
2938 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
2939
2940         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
2941         sections, use bfd_section_list_remove.
2942         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2943         * elflink.h (elf_link_add_object_symbols): When removing all
2944         sections, use bfd_section_list_clear.
2945
2946 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
2947
2948         * po/sv.po: New file: Swedish translation.
2949         * configure.in (ALL_LINGUAS): Add sv.
2950         * configure: Regenerate.
2951
2952 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
2953
2954         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
2955         * elf.c (merge_sections_remove_hook): New function.
2956         (_bfd_elf_merge_sections): Pass it as 3rd argument to
2957         _bfd_merge_sections.
2958         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
2959         * libbfd.h: Rebuilt.
2960         * merge.c (_bfd_merge_sections): Add remove_hook argument.
2961         Call remove_hook if a SEC_EXCLUDE section is encountered.
2962
2963 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
2964
2965         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
2966         (xstormy16_reloc_map): Initialise new field with correct howto
2967         table.
2968         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
2969         howto entry.
2970
2971 2002-01-10  Michael Snyder  <msnyder@redhat.com>
2972
2973         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
2974         (elfcore_write_pstatus): Use long instead of pid_t;
2975         * elf-bfd.h: Change prototypes to use long instead of pid_t;
2976
2977 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
2978
2979         * elf.c: Update copyright years.
2980         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
2981         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
2982
2983 2002-01-08  Michael Snyder  <msnyder@redhat.com>
2984
2985         Add capability to write corefile note sections, for gdb.
2986         * elf.c (elfcore_write_note): New function.
2987         (elfcore_write_prpsinfo): New function.
2988         (elfcore_write_prstatus): New function.
2989         (elfcore_write_pstatus): New function.
2990         (elfcore_write_prfpreg): New function.
2991         (elfcore_write_prxfpreg): New function.
2992         * elf-bfd.h: Add prototypes for above functions.
2993
2994 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
2995
2996         * elf.c (elf_fake_sections): Propagate errors from
2997         elf_backend_fake_section.
2998
2999 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
3000
3001         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3002         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3003         (elf32-sh-nbsd.lo): New rule.
3004         * Makefile.in: Regenerate.
3005         * config.bfd (sh*le-*-netbsdelf*): New target.
3006         (sh*-*-netbsdelf*): New target.
3007         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3008         (bfd_elf32_shnbsd_vec): New vector.
3009         (bfd_elf32_shlnbsd_vec): New vector.
3010         * configure: Regenerate.
3011         * elf32-sh-nbsd.c: New file.
3012         * targets.c: Update copyright years.
3013         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
3014         bfd_elf32_shnbsd_vec.
3015
3016 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
3017
3018         * coff-rs6000.c (READ20): Use bfd_scan_vma.
3019
3020 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
3021
3022         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3023         of a symbol in a section that will be deleted.
3024
3025 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
3026
3027         * po/es.po: New file: Spanish translation.
3028         * configure.in (ALL_LINGUAS): Add es.
3029         * configure: Regenerate.
3030
3031 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
3032
3033         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3034         argument so we can handle HP-UX specially.
3035         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3036         (elfNN_hpux_backend_section_from_bfd_section): New for support
3037         of SHN_IA_64_ANSI_COMMON.
3038         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3039         (is_unwind_section_name): Add special HP-UX support.
3040         (elfNN_ia64_section_from_shdr): Add support for more sections.
3041         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3042         add support for more sections.
3043         (elfNN_ia64_additional_program_headers): Modify
3044         is_unwind_section_name call.
3045         (elfNN_ia64_modify_segment_map): Remove assumption that there is
3046         only one unwind section in segment.
3047
3048 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
3049
3050         * syms.c (_bfd_generic_make_empty_symbol): New function.
3051         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3052         _bfd_generic_make_empty_symbol.
3053         * libbfd.h: Regenerate.
3054         * bfd-in2.h: Regenerate.
3055         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3056         (hppabsd_core_get_symtab_upper_bound): Don't define.
3057         (hppabsd_core_get_symtab): Likewise.
3058         (hppabsd_core_print_symbol): Likewise.
3059         (hppabsd_core_get_symbol_info): Likewise.
3060         (hppabsd_core_bfd_is_local_label_name): Likewise.
3061         (hppabsd_core_get_lineno): Likewise.
3062         (hppabsd_core_find_nearest_line): Likewise.
3063         (hppabsd_core_bfd_make_debug_symbol): Likewise.
3064         (hppabsd_core_read_minisymbols): Likewise.
3065         (hppabsd_core_minisymbol_to_symbol): Likewise.
3066         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3067         Formatting fixes.
3068         * hpux-core.c: Similarly.
3069         * irix-core.c: Similarly.
3070         * osf-core.c: Similarly.
3071         * sco5-core.c: Similarly.
3072         * binary.c (binary_make_empty_symbol): Remove function, define as
3073         _bfd_generic_make_empty_symbol.
3074         * ihex.c (ihex_make_empty_symbol): Likewise.
3075         * mmo.c (mmo_make_empty_symbol): Likewise.
3076         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3077         * srec.c (srec_make_empty_symbol): Likewise.
3078         * versados.c (versados_make_empty_symbol): Likewise.
3079         * vms.c (_bfd_vms_make_empty_symbol): Remove.
3080         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3081         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3082         rather than _bfd_vms_make_empty_symbol.
3083         * vms-misc.c (new_symbol): Likewise.
3084
3085 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
3086
3087         * section.c (bfd_section_init): Remove unnecessary initialisations.
3088         (bfd_section_list_clear): New function.
3089         (bfd_section_list_remove, bfd_section_list_insert): New macros.
3090         (_bfd_strip_section_from_output): Use them.
3091         * coffcode.h (coff_set_alignment_hook): Likewise.
3092         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3093         * elf64-mips.c (mips_elf64_final_link): Likewise.
3094         * elf64-mmix.c (mmix_elf_final_link): Likewise.
3095         * sunos.c (sunos_add_dynamic_symbols): Likewise.
3096         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3097         * bfd-in2.h: Regenerate.
3098
3099         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3100         rather than doing our own section handling.  Clean up after errors
3101         with bfd_release and bfd_section_list_clear.  Handle unexpected
3102         flags.
3103         * aoutf1.h (sunos4_core_file_p): Likewise.
3104         * aix386-core.c (aix386_core_file_p): Likewise.
3105         * cisco-core.c (cisco_core_file_validate): Likewise.
3106         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3107         * trad-core.c (trad_unix_core_file_p): Likewise.
3108
3109         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
3110         with bfd_release and bfd_section_list_clear.
3111         * hpux-core.c (hpux_core_core_file_p): Likewise.
3112         * irix-core.c (irix_core_core_file_p): Likewise.
3113         * lynx-core.c (lynx_core_file_p): Likewise.
3114         * osf-core.c (osf_core_core_file_p): Likewise.
3115         * rs6000-core.c (rs6000coff_core_p): Likewise.
3116         * sco5-core.c (sco5_core_file_p): Likewise.
3117
3118         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3119         sign extension adjustments without conditionals.
3120
3121 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
3122
3123         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3124         CIE at .eh_frame start is removed due to no FDEs referencing it.
3125
3126 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
3127
3128         * config.bfd (x86_64-*-netbsd*): New target.
3129         * configure.in (x86_64-*-netbsd*): Set COREFILE
3130         to netbsd-core.lo.
3131         * configure: Regenerated.
3132
3133 2002-01-03  Tom Rix  <trix@redhat.com>
3134
3135         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3136         for recent bfd_make_section_anyway change.
3137
3138 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
3139
3140         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3141         R_ARM_THM_PC11 reloc.
3142
3143 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
3144
3145         * configure.in (LINGUAS): Add ja.
3146         * configure: Regenerate.
3147         * po/ja.po: Import from translation project's web site.
3148
3149 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
3150
3151         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3152         messages to ease translation into other languages.
3153
3154 For older changes see ChangeLog-0001
3155 \f
3156 Local Variables:
3157 mode: change-log
3158 left-margin: 8
3159 fill-column: 74
3160 version-control: never
3161 End: