bc5c02e2b51fe8fb98fdb9545d2dbfdfeef05d1a
[external/binutils.git] / bfd / ChangeLog
1 2002-02-18  Tom Rix  <trix@redhat.com>
2
3         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4         (bfd_xcoff_size_dynamic_sections): Same.
5         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6         (bfd_xcoff_size_dynamic_sections): Same.
7         * coff-rs6000.c (xcoff_generate_rtinit): Same.
8         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9         * libxcoff.h (struct xcoff_backend_data_rec): Same.
10         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
11         * bfd-in2.h: Regenerate.
12
13 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
14
15         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
16         (struct ppc_link_hash_table): Add sfpr.
17         (ppc64_elf_link_hash_table_create): Init it.
18         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
19         .glink out to..
20         (create_linkage_sections): ..here.  Make .sfpr too.
21         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
22         dynobj early.
23         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
24         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
25         ._restf* functions, and create as needed.
26         (func_desc_adjust): Only force_local for shared libs.
27
28 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
29
30         * configure.in: Bump version number post 2.12 branching.
31         * configure: Regenerate.
32
33 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
34
35         * mmo.c: Correct and improve comments.
36         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
37         zero-pad.  Use input to fill up non-empty bfd buffer.
38         (mmo_flush_chunk): New function.
39         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
40         changed.  Don't emit location specifier if VMA is same as
41         *LAST_VMAP after omitting leading zero contents.  Call
42         mmo_flush_chunk before emitting location specifier.
43         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
44         with mmo_write_loc_chunk calls.
45         (mmo_internal_write_section): Call mmo_flush_chunk after
46         mmo_write_chunk.
47         (mmo_write_symbols_and_terminator): Move :Main to first position
48         in symbol array.  Add faked one if it does not exist if there are
49         other symbols.  Don't add it if there are no symbols at all.  Move
50         out test for value of :Main from symbol loop.  Rename table
51         fakemain to maintable and variable mainsym to fakemain.
52
53 2002-02-15  Richard Henderson  <rth@redhat.com>
54
55         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
56         section with no got matches any got.  Simplify error generaion.
57
58 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
59
60         Support arbitrary length fill patterns.
61         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
62         (_bfd_default_link_order): Remove bfd_fill_link_order code.
63         Call default_data_link_order.
64         (default_fill_link_order): Delete.
65         (default_data_link_order): New function.
66         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
67         of bfd_fill_link_order with bfd_data_link_order.
68         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
69         * elf64-mips.c (mips_elf64_final_link): Likewise.
70
71         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
72         Correct value returned in "end" for "0x<non-hex>".
73
74 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
75
76         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
77         (scan): Test against 'mach' field in info structure.
78
79 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
80
81         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
82
83 2002-02-14  Matt Fredette  <fredette@netbsd.org>
84
85         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
86         EF_M68000.
87
88 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
89
90         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
91         non-zero physical addresses when adjusting the LMAs of new
92         sections.
93
94 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
95
96         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
97         from _bfd_elf_hppa_gen_reloc_type.
98         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
99         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
100         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
101         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
102
103 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
104
105         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
106         loading its contents if there's nothing to do in it.
107
108 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
109
110         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
111         64k boundary.
112
113         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
114         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
115         (ppc64_elf_finish_dynamic_sections): Set values for them.
116
117 2002-02-11  Michael Snyder  <msnyder@redhat.com>
118
119         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
120         * elf.c (elfcore_grok_pstatus): Add prototype.
121         (elfcore_grok_lwpstatus): Add prototype.
122         (elfcore_write_lwpstatus): New function.
123         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
124
125 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
126
127         * elf32-sh.c: Added missing prototypes.
128         * elf32-sh64.c: Likewise.
129         (sh_elf_align_loads): Mark unused args as such.
130         * elf64-sh64.c: Added missing prototypes.
131         (struct elf_sh64_link_hash_entry): Fix typo.
132         (sh_elf64_relocate_section): Fix info argument passed to
133         _bfd_elf_section_offset.
134
135 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
136
137         * Makefile.am: "make dep-am".
138         * Makefile.in: Regenerate.
139         * aclocal.m4: Regenerate.
140         * config.in: Regenerate.
141         * configure: Regenerate.
142
143 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
144
145         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
146         variable warnings.
147         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
148         comparison warning.
149         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
150         cast warnings for the common case.
151
152 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
153
154         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
155         vectors.
156         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
157         vectors.
158
159 2002-02-09  Richard Henderson  <rth@redhat.com>
160
161         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
162         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
163         (elf64_alpha_relocate_section): Likewise.
164         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
165         * bfd-in2.h, libbfd.h: Rebuild.
166
167 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
168
169         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
170         that base-plus-offset reloc accounting is consistent.
171         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
172         up to date for undefined symbols.
173
174 2002-02-08  Eric Christopher  <echristo@redhat.com>
175
176         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
177
178         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
179         sections for the O32 ABI.
180
181 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
182
183         * elf32-arm.h: Fix formatting of _("...").
184         * elf32-d10v.c: Likewise.
185         * elf32-m68k.c: Likewise.
186         * elf32-mips.c: Likewise.
187
188 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
189
190         * coff-or32.c: Fix compile time warning messages.
191
192 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
193
194         Contribute sh64-elf.
195         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
196         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
197         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
198         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
199         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
200         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
201         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
202         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
203         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
204         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
205         New relocs.
206         * libbfd.h, bfd-in2.h: Rebuilt.
207         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
208         (sh_reloc_map): Map them.
209         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
210         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
211         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
212         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
213         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
214         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
215         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
216         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
217         datalabel_got_offset.
218         (sh_elf_link_hash_newfunc): Initialize it.
219         (sh_elf_relocate_section): Augment the scope of
220         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
221         GOT and GOTOFF handling to new SHmedia relocation types.  Support
222         GOT_BIAS.
223         (sh_elf_check_relocs): Likewise.
224         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
225         PLT entries using movi_shori_putval.  Support GOT_BIAS.
226         (sh_elf_finish_dynamic_sections): Likewise.
227         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
228         relocation, it's now done by the caller.
229         (GOT_BIAS): New.
230         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
231         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
232         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
233         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
234         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
235         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
236         sh64_elf64_hash_table): New.
237         (sh_elf64_howto_table): Introduce new relocs.
238         (sh_elf64_info_to_howto): Accept new PIC relocs.
239         (sh_elf64_relocate_section): Augment the scope of
240         seen_stt_datalabel.  Support new PIC relocs.
241         (sh_elf64_check_relocs): Support new PIC relocs.
242         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
243         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
244         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
245         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
246         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
247         movi_shori_putval, movi_3shori_putval,
248         sh64_elf64_create_dynamic_sections,
249         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
250         sh64_elf64_size_dynamic_sections,
251         sh64_elf64_finish_dynamic_symbol,
252         sh64_elf64_finish_dynamic_sections): New.
253         (elf_backend_create_dynamic-sections,
254         bfd_elf64_bfd_link_hash_table_create,
255         elf_backend_adjust_dynamic_symbol,
256         elf_backend_size_dynamic_sections,
257         elf_backend_finish_dynamic_symbol,
258         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
259         elf_backend_plt_readonly, elf_backend_want_plt_sym,
260         elf_backend_got_header_size, elf_backend_plt_header_size):
261         Define.
262         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
263         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
264         match official numbers and names; moved unmaching ones to the
265         range 0xf2-0xff.
266         * elf32-sh64.c, elf64-sh64.c: Likewise.
267         2001-03-12  DJ Delorie  <dj@redhat.com>
268         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
269         sections.
270         2001-03-12  DJ Delorie  <dj@redhat.com>
271         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
272         be aligned.
273         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
274         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
275         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
276         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
277         .cranges section with SEC_SORT_ENTRIES set.
278         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
279         incoming sorted .cranges section.
280         (sh64_bfd_elf_copy_private_section_data): New.
281         (sh64_elf_final_write_processing): Only sort .cranges and modify
282         start address if called by linker.
283         2001-01-08  Ben Elliston  <bje@redhat.com>
284         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
285         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
286         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
287         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
288         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
289         line.  Add comments before all entries.
290         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
291         comment.
292         (sh_elf64_reloc): Correct head comment.
293         (sh_elf64_relocate_section): Correct spacing.
294         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
295         instead call reloc_dangerous callback.
296         <case R_SH_SHMEDIA_CODE>: New case.
297         (sh_elf64_gc_mark_hook): Correct spacing.
298         (sh_elf64_check_relocs): Ditto.
299         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
300         New case.
301         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
302         functions.
303         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
304         clarify describing comment.  Add comments before all entries.
305         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
306         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
307         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
308         Sort .cranges section in final link.  Prepare to set bit 0 on
309         entry address.
310         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
311         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
312         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
313         .cranges section.
314         (sh64_backend_section_from_shdr): New, to recognize
315         SHT_SH5_CR_SORTED on incoming .cranges section.
316         (elf_backend_section_from_shdr): Define.
317         (sh64_elf_final_write_processing): Sort outgoing .cranges
318         section.  (New, temporarily disabled:) Set bit 0 on entry address
319         according to ISA type.
320         (sh64_find_section_for_address): New.
321         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
322         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
323         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
324         bfd_malloc, not xmalloc.
325         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
326         global.
327         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
328         temporarily disabled) setting bit 0 on entry address.
329         (elf_backend_final_write_processing): Define.
330         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
331         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
332         be a proper relocation for PTA and PTB rather than a marker.
333         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
334         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
335         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
336         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
337         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
338         Zero src_mask.
339         * elf64-sh64.c: Ditto.
340         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
341         * elf32-sh64.c: Include opcodes/sh64-opc.h
342         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
343         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
344         parameters.  No unused parameters.  Caller changed.
345         <case R_SH_PT_16>: New case.
346         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
347         * Makefile.in: Regenerate.
348         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
349         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
350         all code sections.
351         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
352         (sh64_elf_merge_private_data): Ditto.
353         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
354         to access stored section flags.
355         (sh64_elf_final_write_processing): Return immediately unless
356         called by linker.  Use sh64_elf_section_data (cranges) to get size
357         of linker-generated cranges entries.
358         (sh64_elf_copy_private_data): Add missing "return true".
359         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
360         (sh_elf64_merge_private_data): Ditto.
361         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
362         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
363         elf64-sh64.c:sh64_elf_fake_sections.
364         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
365         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
366         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
367         (sh64_elf_final_write_processing): New.
368         (elf_backend_final_write_processing): Define.
369         (sh64_elf_fake_sections): Get header flags from tdata field.
370         (sh64_elf_copy_private_data): Do not call
371         sh64_elf_copy_private_data_internal, just copy e_flags field.
372         (sh64_elf_merge_private_data): Do not call
373         sh64_elf_copy_private_data_internal.
374         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
375         Remove EF_SH64_ABI64, let ELF size make difference.
376         Remove SH64-specific BFD section flag.
377         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
378         containing SHmedia through elf_section_data (asect)->tdata
379         non-zero, not using a BFD section flag.
380         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
381         (sh64_elf_merge_private_data): Similar.
382         (elf_backend_section_flags): Don't define.
383         (sh64_elf_backend_section_flags): Delete.
384         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
385         not EF_SH64_ABI64.
386         (sh_elf64_merge_private_data): Similar.
387         * section.c (Section flags definitions): Don't define
388         SEC_SH_ISA_SHMEDIA.
389         (bfd-in2.h): Regenerate.
390         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
391         Make DataLabel references work with partial linking.
392         * elf32-sh64.c: Fix formatting.
393         (sh64_elf_link_output_symbol_hook): New.
394         (elf_backend_link_output_symbol_hook): Define to
395         sh64_elf_link_output_symbol_hook.
396         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
397         undefined if partial linking.  Adjust sanity check.
398         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
399         (elf_backend_link_output_symbol_hook): Define to
400         sh64_elf64_link_output_symbol_hook.
401         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
402         undefined if partial linking.  Adjust sanity check.
403         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
404         Implement semantics for inter-file DataLabel references.
405         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
406         (sh64_elf64_add_symbol_hook): New.
407         (sh_elf64_relocate_section): If passing an indirect symbol with
408         st_type STT_DATALABEL on the way to a symbol with st_other
409         STO_SH5_ISA32, do not bitor 1 to the relocation.
410         (elf_backend_add_symbol_hook): Define to
411         sh64_elf64_add_symbol_hook.
412         * elf64-sh32.c: Tweak comments.
413         (DATALABEL_SUFFIX): Define.
414         (sh64_elf_add_symbol_hook): New.
415         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
416         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
417         symbol with st_type STT_DATALABEL on the way to a symbol with
418         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
419         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
420         Pass through STT_DATALABEL.
421         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
422         (elf_backend_get_symbol_type): Define.
423         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
424         (elf_backend_get_symbol_type): Define.
425         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
426         * elf32-sh64.c: Tweak comments.
427         (sh64_elf_copy_private_data_internal): Add prototype.
428         (bfd_elf32_bfd_set_private_flags): Define.
429         (sh64_elf_copy_private_data_internal): Compare machine name, not
430         textual BFD target name, to check whether to copy section flag
431         SHF_SH5_ISA32.
432         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
433         Tweak section-contents-type-mismatch message.
434         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
435         Validize reloc-types.
436         * elf64-sh64.c: New file.
437         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
438         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
439         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
440         Regenerate dependencies.
441         * Makefile.in: Regenerate.
442         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
443         bfd_elf64_sh64l_vec.
444         * configure.in: Handle bfd_elf64_sh64_vec and
445         bfd_elf64_sh64l_vec.
446         * configure: Regenerate.
447         * po/POTFILES.in: Regenerate.
448         * po/bfd.pot: Regenerate.
449         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
450         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
451         anything else but EF_SH64 and EF_SH64_ABI64.
452         (sh64_elf_merge_private_data): Emit error for anything else but
453         EF_SH64 and EF_SH64_ABI64.
454         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
455         from targ_selvecs.
456         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
457         bfd_elf32_sh64l_vec as a temporary measure.
458         * configure: Regenerate.
459         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
460         * cpu-sh.c (arch_info_struct): Include sh5 item
461         unconditionalized.
462         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
463         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
464         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
465         * elf32-sh64.c: Tweak comments.
466         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
467         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
468         (sh64_elf_copy_private_data_internal): Wrap long line.
469         (sh64_elf_merge_private_data): Rewrite to allow objects from
470         SH64 subsets to be linked together.
471         (INCLUDE_SHMEDIA): Define.
472         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
473         Parenthesize plus-expression inside or-expression.
474         <global symbol>: Ditto.
475         (sh_elf_set_mach_from_flags): Remove code refusing
476         deleted EF_SH64_32BIT_ABI flag.
477         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
478         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
479         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
480         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
481         (sh_elf_relocate_section) <local symbol>: Or 1 in
482         calculation of relocation if sym->st_other & STO_SH5_ISA32.
483         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
484         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
485         relocation.
486         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
487         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
488         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
489         Regenerate dependencies.
490         * Makefile.in: Regenerate.
491         * archures.c: Add bfd_mach_sh5.
492         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
493         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
494         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
495         * configure: Regenerate.
496         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
497         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
498         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
499         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
500         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
501         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
502         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
503         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
504         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
505         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
506         in item for SH5.
507         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
508         for SHmedia relocs.
509         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
510         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
511         shmedia_prepare_reloc, goto final_link_relocate if it returns
512         non-zero, else fail as before.
513         (sh_elf_set_mach_from_flags): Provide function only if not defined
514         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
515         (sh_elf_set_private_flags): Provide function only if not defined
516         as a macro.
517         (sh_elf_copy_private_data): Similar.
518         (sh_elf_merge_private_data): Similar.
519         * section.c (SEC_SH_ISA_SHMEDIA): New.
520         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
521         * elf32-sh64.c: New file.
522         * libbfd.h: Regenerate.
523         * bfd-in2.h: Regenerate.
524         * po/POTFILES.in: Regenerate.
525         * po/bfd.pot: Regenerate.
526         * bfd-in2.h: Regenerate.
527         * libbfd.h: Regenerate.
528
529 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
530
531         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
532         been included, not drag it in.
533         * bfd-in2.h: Regenerate.
534
535 2002-02-06  H.J. Lu  (hjl@gnu.org)
536
537         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
538         the mach and ISA fields if necessary.
539
540 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
541
542         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
543         ARM architecture when an F_ARM_5 flag is detected, since we cannot
544         be sure exactly which architecture this represents.
545
546 2002-02-05  Nick Clifton  <nickc@redhat.com>
547
548         * po/tr.po: Updated translation.
549
550 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
551
552         From Jimi X <jimix@watson.ibm.com>
553         * archures (bfd_mach_ppc64): Define.
554         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
555         (bfd_powerpc_arch): Define.
556         * bfd-in2.h: Regenerate.
557         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
558         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
559         (bfd_powerpc_archs): Add default powerpc64 arch.
560
561 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
562
563         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
564         against section syms in readonly sections.  Don't do the global
565         sym check if we find one.
566         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
567         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
568         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
569         (elf_s390_grok_prstatus): Add missing prototype.
570
571 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
572
573         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
574         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
575         Call bfd_get_section_by_name only once.  Initialize
576         bpodata->n_bpo_relocs_this_section.
577         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
578         referring to DSOs.
579         (bpo_reloc_request_sort_fn): Don't use difference of values as
580         return-value.
581
582 2002-02-02  David O'Brien  <obrien@FreeBSD>
583
584         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
585         version 4.5 and later the same as 5-CURRENT.
586         * configure: Re-generate.
587
588 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
589
590         * config.bfd (hppa*-*-netbsd*): New target.
591
592 2002-01-31  Philipp Thomas  <pthomas@suse.de>
593
594         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
595         to front of message. Unify messages with elf32-arm.h. Use
596         commas where neccessary.
597         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
598         ERROR in messages. Unify messages with coff-arm.c. Correct
599         VFP/FPA error message.
600         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
601         APCS-32 for translation.
602
603 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
604
605         Perform on-demand global register allocation from
606         R_MMIX_BASE_PLUS_OFFSET relocs.
607         * elf64-mmix.c (struct bpo_reloc_section_info, struct
608         bpo_reloc_request, struct bpo_greg_section_info): New.
609         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
610         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
611         _bfd_mmix_check_all_relocs,
612         _bfd_mmix_prepare_linker_allocated_gregs,
613         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
614         (elf_mmix_howto_table): Correct src_mask for most relocs.
615         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
616         case.
617         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
618         case.  Fix typo in comment.  New label do_mmix_reloc.
619         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
620         store first object file with a base-plus-offset reloc.  Call
621         mmix_elf_check_common_relocs for the part common with mmo.
622         (mmix_elf_final_link): Write out linker-allocated register
623         contents section.
624         (elf_backend_gc_sweep_hook): Define.
625         (bfd_elf64_bfd_relax_section): Define.
626
627         * mmo.c: Don't include <ctype.h>
628         (mmo_init): Correct init-once logic.
629
630 2002-02-01  Tom Rix  <trix@redhat.com>
631
632         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
633
634 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
635
636         * Makefile.am: Run "make dep-am"
637         * Makefile.in: Regenerate.
638
639 2002-01-31  David O'Brien  <obrien@FreeBSD>
640
641         * configure.in: Recognize the differences in core files from FreeBSD
642         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
643         5-CURRENT.
644         * configure: Regenerate.
645
646 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
647
648         * coff-or32.c: New file.
649         * cpu-or32.c: New file.
650         * elf32-or32.c: New file.
651         * archures.c: Add support for or32.
652         * targets.c: Add support for or32.
653         * bfd-in2.h: Regenerate.
654         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
655         coff_write_object_contents): Add support for or32.
656         * config.bfd: Add target.
657         * configure.in: Add support for or32.
658         * configure: Regenerate.
659         * Makefile.am: Add support for or32.
660         * Makefile.in: Regenerate.
661         * po/SRC-POTFILES.in: Add or32 files.
662         * po/bfd.pot: Regenerate.
663
664 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
665             Don Lindsay  <lindsayd@cisco.com>
666
667         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
668         false' with a return of a bfd_reloc_ error code.
669
670 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
671
672         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
673         unexport unreferenced symbols when --export-dynamic.  Call
674         _bfd_elf_strtab_delref when unexporting.
675
676 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
677
678         * bfd-in.h: Include <stdbool.h> if it is available.
679         * bfd-in2.h: Regenerated.
680
681 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
682
683         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
684         not go via the plt.
685
686 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
687
688         * archures.c: Tidy up formatting of embedded comments.
689         * bfd.c: Tidy up formatting of embedded comments.
690         * bfd-in.h: Fix formatting of comments.
691         * reloc.c: Tidy up formatting of ordinary & embedded comments.
692         * section.c: Tidy up formatting of embedded comments.
693         * syms.c: Tidy up formatting of embedded comments.
694         * targets.c: Tidy up formatting of embedded comments.
695
696         * bfd-in2.h: Regenerate.
697
698 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
699
700         * vms-tir.c (cmd_name): New function.
701         (tir_cmd_name): New function.
702         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
703         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
704         Fix formatting.
705
706         * peXXigen.c (pe_print_idata): Rearrange message to aid in
707         translation.
708         (pe_print_pdata):  Rearrange message to aid in translation.
709
710         * libbfd.c (warn_deprecated): Rearrange error message to aid in
711         translation.
712
713         * ihex.c (ihex_write_object_contents): Fix spelling typo.
714
715         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
716
717         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
718         message to aid in translation.
719
720         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
721         to aid in translation.
722
723         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
724
725 2002-01-30  Philipp Thomas  <pthomas@suse.de>
726
727         * coff-arm.c, elf32-elf.h: Unify messages.
728
729 2002-01-30  Nick Clifton <nickc@redhat.com>
730
731         * po/sv.po: Updated translation.
732
733 2002-01-30  Philipp Thomas  <pthomas@suse.de>
734
735         * dwarf2.c (read_abbrev): Use full section name in error message.
736         (decode_line_info): Likewise.
737
738         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
739         message.
740
741 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
742
743         * elf64-ppc.c (func_desc_adjust): Only provide missing function
744         descriptor symbols for undefined function code syms.  Clear
745         ELF_LINK_NON_ELF so that they can stay weak.
746
747 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
748             Mitch Lichtenberg  <mpl@broadcom.com>
749
750         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
751         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
752         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
753         generation.
754         * bfd-in2.h: Regenerate.
755
756 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
757
758         * elf32-mips.c: Add additional comments about HI16 relocation
759         processing.
760         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
761         pc-relative relocations.  (Reverts change made on 2001-10-31.)
762         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
763         for pc-relative relocations.
764         (mips_elf_calculate_relocation): Add a comment about a kludge
765         in the R_MIPS_GNU_REL_HI16 handling.
766         (_bfd_mips_elf_relocate_section): Implement that kludge;
767         adjust pc-relative HI16 relocation for difference in HI16 and
768         LO16 addresses, since it can't easily be done in
769         mips_elf_calculate_relocation.
770
771 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
772
773         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
774         relocations with PC32 relocations for undefined or weak symbols.
775         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
776         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
777
778 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
779
780         * elfcore.h (elf_core_file_p): Improve comment for last change.
781
782 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
783
784         * configure: Regenerated.
785
786 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
787
788         * elfcore.h (elf_core_file_p): Set the machine architecture
789         before processing the program headers.
790
791 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
792
793         * configure.in <64-bit configuration>: If using gcc, check and
794         emit error for egcs-1.1.2.
795         * configure: Regenerate.
796
797 2002-01-26  Egor Duda  <deo@logos-m.ru>
798
799         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
800         as possible to avoid stack corruption.
801
802 2002-01-26  Richard Henderson  <rth@redhat.com>
803
804         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
805         for non-allocated sections.
806
807 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
808
809         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
810         prstat.pr_reg even if it is a struct.
811
812 2002-01-25  Steve Ellcey <sje@cup.hp.com>
813
814         * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
815
816 2002-01-25  Philipp Thomas  <pthomas@suse.de>
817
818         * coffgen.c (coff_print_symbol): Don't mark info message
819         for translation.
820
821 2002-01-25  Nick Clifton <nickc@redhat.com>
822
823         * po/fr.po: Updated translation.
824         * po/es.po: Updated translation.
825
826 2002-01-25  Philipp Thomas  <pthomas@suse.de>
827
828         * coff-alpha.c (alpha_relocate_section): Unify warning message
829         for GP relative relocations without GP defined.
830         * coff-mips.c (mips_relocate_section): Likewise.
831
832 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
833
834         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
835         unsigned overflow when new_offset < old_offset.
836
837 2002-01-24  Philipp Thomas  <pthomas@suse.de>
838
839         * bfd.c (_bfd_abort): Fix typo.
840
841 2002-01-23  Richard Henderson  <rth@redhat.com>
842
843         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
844         plt entries for undefweak symbols.
845
846 2002-01-23  Steve Ellcey <sje@cup.hp.com>
847
848         * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
849         DEFAULT_VECTOR.
850         (bfd_elf64_ia64_hpux_big_vec): Ditto.
851         (bfd_elf32_h8300_vec): Ditto.
852
853 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
854
855         * elf64-ppc.c: Remove stale part of ABI comment.
856         (NO_OPD_RELOCS): Define.
857         (ppc64_elf_check_relocs): Use it.
858         (ppc64_elf_relocate_section): Here too.
859         (build_one_stub): Don't point function syms at the stub.  Instead,
860         hijack plt.offset.
861         (ppc64_elf_relocate_section): Check whether REL24 relocs should
862         really go to the stub.  Make all dynamic relocs in opd against
863         locals.
864         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
865         plt.offset.
866
867 2002-01-22  Richard Henderson  <rth@redhat.com>
868
869         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
870
871 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
872
873         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
874         TOC_BASE_OFF adjustment.
875
876         * Makefile.am: Run "make dep-am".
877         * Makefile.in: Regenerate.
878         * po/SRC-POTFILES.in: Regenerate.
879
880 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
881
882         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
883         host defines.
884
885 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
886
887         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
888         Check for and emit error if sgot is NULL at this point.
889
890 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
891
892         * config.bfd (ia64*-*-netbsd*): New target.
893
894 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
895
896         * som.c (som_write_space_strings): Comment typo fix.
897
898 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
899
900         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
901         is_func_descriptor fields.
902         (link_hash_newfunc): Init them.
903         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
904         dot are candidates for plt entries.  When processing .opd relocs,
905         set function descriptor strings to point inside function code
906         string, and set new ppc_link_hash_entry fields.
907         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
908         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
909         function descriptors.  It's now done in..
910         (func_desc_adjust): New.
911         (ppc64_elf_func_desc_adjust): New.
912         (define elf_backend_always_size_sections): Define.
913         (ppc64_elf_hide_symbol): New.
914         (define elf_backend_hide_symbol): Define.
915         (allocate_dynrelocs): Remove code looking up function descriptors
916         as that has been done earlier.
917         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
918         table.
919         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
920         up function descriptor.
921         (build_one_stub): Look up the function code sym.  Check for
922         invalid plt offsets.
923         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
924         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
925
926         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
927         boolean param.
928         (_bfd_elf_link_hash_hide_symbol): Likewise.
929         * elflink.h (elf_link_add_object_symbols): Adjust call to
930         elf_backend_hide_symbol.
931         (elf_fix_symbol_flags): Likewise.
932         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
933         than bfd_alloc.
934         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
935         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
936         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
937         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
938         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
939         and adjust to suit.
940         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
941         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
942         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
943
944 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
945
946         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
947         dynamic function descriptor symbol, not the associated function
948         symbol.
949
950 2002-01-17  Eric Christopher  <echristo@redhat.com>
951
952         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
953
954 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
955
956         * po/bfd.pot: Regenerate.
957         * po/fr.po: Regenerate.
958
959 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
960
961         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
962         Remove "Elf_Internal_Shdr *" param.
963         (_bfd_mips_elf_section_from_bfd_section): Ditto.
964         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
965         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
966         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
967         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
968         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
969         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
970         function to override special sections.  Remove hdr arg from
971         backend call, and don't loop.
972
973 2002-01-16  Eric Christopher  <echristo@redhat.com>
974
975         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
976         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
977         relocations requiring gp0 and gp.
978
979 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
980
981         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
982         EF_ARM_VFP_FLOAT.
983         (elf32_arm_print_private_bfd_data): Likewise.
984
985 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
986
987         * po/tr.po: Import new version.
988
989 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
990
991         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
992         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
993         (ORI_R0_R0_0): Correct.
994
995 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
996
997         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
998         when plt_not_loaded.
999         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
1000         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
1001         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
1002         (ppc64_elf_glink_code): Delete.
1003         (PPC64_ELF_GLINK_SIZE): Delete.
1004         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
1005         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
1006         ORI_R0_R0_0): Define.
1007         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
1008         (struct ppc_link_hash_table): Add sstub and plt_overflow.
1009         (ppc64_elf_link_hash_table_create): Init them.
1010         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
1011         Don't copy to shared lib.
1012         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
1013         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
1014         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
1015         room for .stub and .glink code.
1016         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
1017         DT_PPC64_GLINK.
1018         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
1019         bfd_elf64_bfd_final_link.
1020         (bfd_elf64_bfd_final_link): Don't define.
1021         (ppc64_elf_size_stubs): New.
1022         (build_plt_stub): New.
1023         (build_one_stub): New.
1024         (ppc64_elf_build_stubs): New.
1025         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
1026         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
1027         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
1028         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
1029         case output sections not separate.  Adjust DT_RELASZ to not
1030         include plt relocs.  Set reserved got entry.  Set got and plt
1031         entry size.
1032         (elf_backend_got_header_size): Set to 8.
1033         * elf64-ppc.h: New file.
1034
1035 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
1036
1037         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
1038         sections, use bfd_section_list_remove.
1039         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1040         * elflink.h (elf_link_add_object_symbols): When removing all
1041         sections, use bfd_section_list_clear.
1042
1043 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
1044
1045         * po/sv.po: New file: Swedish translation.
1046         * configure.in (ALL_LINGUAS): Add sv.
1047         * configure: Regenerate.
1048
1049 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
1050
1051         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
1052         * elf.c (merge_sections_remove_hook): New function.
1053         (_bfd_elf_merge_sections): Pass it as 3rd argument to
1054         _bfd_merge_sections.
1055         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
1056         * libbfd.h: Rebuilt.
1057         * merge.c (_bfd_merge_sections): Add remove_hook argument.
1058         Call remove_hook if a SEC_EXCLUDE section is encountered.
1059
1060 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
1061
1062         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
1063         (xstormy16_reloc_map): Initialise new field with correct howto
1064         table.
1065         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
1066         howto entry.
1067
1068 2002-01-10  Michael Snyder  <msnyder@redhat.com>
1069
1070         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
1071         (elfcore_write_pstatus): Use long instead of pid_t;
1072         * elf-bfd.h: Change prototypes to use long instead of pid_t;
1073
1074 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
1075
1076         * elf.c: Update copyright years.
1077         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
1078         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
1079
1080 2002-01-08  Michael Snyder  <msnyder@redhat.com>
1081
1082         Add capability to write corefile note sections, for gdb.
1083         * elf.c (elfcore_write_note): New function.
1084         (elfcore_write_prpsinfo): New function.
1085         (elfcore_write_prstatus): New function.
1086         (elfcore_write_pstatus): New function.
1087         (elfcore_write_prfpreg): New function.
1088         (elfcore_write_prxfpreg): New function.
1089         * elf-bfd.h: Add prototypes for above functions.
1090
1091 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
1092
1093         * elf.c (elf_fake_sections): Propagate errors from
1094         elf_backend_fake_section.
1095
1096 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
1097
1098         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
1099         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
1100         (elf32-sh-nbsd.lo): New rule.
1101         * Makefile.in: Regenerate.
1102         * config.bfd (sh*le-*-netbsdelf*): New target.
1103         (sh*-*-netbsdelf*): New target.
1104         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
1105         (bfd_elf32_shnbsd_vec): New vector.
1106         (bfd_elf32_shlnbsd_vec): New vector.
1107         * configure: Regenerate.
1108         * elf32-sh-nbsd.c: New file.
1109         * targets.c: Update copyright years.
1110         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
1111         bfd_elf32_shnbsd_vec.
1112
1113 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
1114
1115         * coff-rs6000.c (READ20): Use bfd_scan_vma.
1116
1117 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
1118
1119         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
1120         of a symbol in a section that will be deleted.
1121
1122 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
1123
1124         * po/es.po: New file: Spanish translation.
1125         * configure.in (ALL_LINGUAS): Add es.
1126         * configure: Regenerate.
1127
1128 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
1129
1130         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
1131         argument so we can handle HP-UX specially.
1132         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
1133         (elfNN_hpux_backend_section_from_bfd_section): New for support
1134         of SHN_IA_64_ANSI_COMMON.
1135         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
1136         (is_unwind_section_name): Add special HP-UX support.
1137         (elfNN_ia64_section_from_shdr): Add support for more sections.
1138         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
1139         add support for more sections.
1140         (elfNN_ia64_additional_program_headers): Modify
1141         is_unwind_section_name call.
1142         (elfNN_ia64_modify_segment_map): Remove assumption that there is
1143         only one unwind section in segment.
1144
1145 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
1146
1147         * syms.c (_bfd_generic_make_empty_symbol): New function.
1148         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
1149         _bfd_generic_make_empty_symbol.
1150         * libbfd.h: Regenerate.
1151         * bfd-in2.h: Regenerate.
1152         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
1153         (hppabsd_core_get_symtab_upper_bound): Don't define.
1154         (hppabsd_core_get_symtab): Likewise.
1155         (hppabsd_core_print_symbol): Likewise.
1156         (hppabsd_core_get_symbol_info): Likewise.
1157         (hppabsd_core_bfd_is_local_label_name): Likewise.
1158         (hppabsd_core_get_lineno): Likewise.
1159         (hppabsd_core_find_nearest_line): Likewise.
1160         (hppabsd_core_bfd_make_debug_symbol): Likewise.
1161         (hppabsd_core_read_minisymbols): Likewise.
1162         (hppabsd_core_minisymbol_to_symbol): Likewise.
1163         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
1164         Formatting fixes.
1165         * hpux-core.c: Similarly.
1166         * irix-core.c: Similarly.
1167         * osf-core.c: Similarly.
1168         * sco5-core.c: Similarly.
1169         * binary.c (binary_make_empty_symbol): Remove function, define as
1170         _bfd_generic_make_empty_symbol.
1171         * ihex.c (ihex_make_empty_symbol): Likewise.
1172         * mmo.c (mmo_make_empty_symbol): Likewise.
1173         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
1174         * srec.c (srec_make_empty_symbol): Likewise.
1175         * versados.c (versados_make_empty_symbol): Likewise.
1176         * vms.c (_bfd_vms_make_empty_symbol): Remove.
1177         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
1178         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
1179         rather than _bfd_vms_make_empty_symbol.
1180         * vms-misc.c (new_symbol): Likewise.
1181
1182 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
1183
1184         * section.c (bfd_section_init): Remove unnecessary initialisations.
1185         (bfd_section_list_clear): New function.
1186         (bfd_section_list_remove, bfd_section_list_insert): New macros.
1187         (_bfd_strip_section_from_output): Use them.
1188         * coffcode.h (coff_set_alignment_hook): Likewise.
1189         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
1190         * elf64-mips.c (mips_elf64_final_link): Likewise.
1191         * elf64-mmix.c (mmix_elf_final_link): Likewise.
1192         * sunos.c (sunos_add_dynamic_symbols): Likewise.
1193         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1194         * bfd-in2.h: Regenerate.
1195
1196         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
1197         rather than doing our own section handling.  Clean up after errors
1198         with bfd_release and bfd_section_list_clear.  Handle unexpected
1199         flags.
1200         * aoutf1.h (sunos4_core_file_p): Likewise.
1201         * aix386-core.c (aix386_core_file_p): Likewise.
1202         * cisco-core.c (cisco_core_file_validate): Likewise.
1203         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1204         * trad-core.c (trad_unix_core_file_p): Likewise.
1205
1206         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
1207         with bfd_release and bfd_section_list_clear.
1208         * hpux-core.c (hpux_core_core_file_p): Likewise.
1209         * irix-core.c (irix_core_core_file_p): Likewise.
1210         * lynx-core.c (lynx_core_file_p): Likewise.
1211         * osf-core.c (osf_core_core_file_p): Likewise.
1212         * rs6000-core.c (rs6000coff_core_p): Likewise.
1213         * sco5-core.c (sco5_core_file_p): Likewise.
1214
1215         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
1216         sign extension adjustments without conditionals.
1217
1218 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
1219
1220         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
1221         CIE at .eh_frame start is removed due to no FDEs referencing it.
1222
1223 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
1224
1225         * config.bfd (x86_64-*-netbsd*): New target.
1226         * configure.in (x86_64-*-netbsd*): Set COREFILE
1227         to netbsd-core.lo.
1228         * configure: Regenerated.
1229
1230 2002-01-03  Tom Rix  <trix@redhat.com>
1231
1232         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
1233         for recent bfd_make_section_anyway change.
1234
1235 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
1236
1237         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
1238         R_ARM_THM_PC11 reloc.
1239
1240 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
1241
1242         * configure.in (LINGUAS): Add ja.
1243         * configure: Regenerate.
1244         * po/ja.po: Import from translation project's web site.
1245
1246 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
1247
1248         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
1249         messages to ease translation into other languages.
1250
1251 For older changes see ChangeLog-0001
1252 \f
1253 Local Variables:
1254 mode: change-log
1255 left-margin: 8
1256 fill-column: 74
1257 version-control: never
1258 End: