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