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