* elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
[external/binutils.git] / bfd / ChangeLog
1 2002-04-01  Richard Henderson  <rth@redhat.com>
2
3         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4         (elf32_sparc_relocate_section): Use it to figure out when to
5         initialize .got entries.
6         * elf64-sparc.c: Similarly.
7
8 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
9
10         * linker.c (link_action): Ignore duplicate warning syms.
11         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
12         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
13         (elf_adjust_dynamic_symbol): Likewise.
14         (elf_export_symbol): Likewise.
15         (elf_link_find_version_dependencies): Likewise.
16         (elf_link_assign_sym_version): Likewise.
17         (elf_link_sec_merge_syms): Likewise.
18         (elf_link_output_extsym): Likewise.
19         (elf_gc_sweep_symbol): Likewise.
20         (elf_gc_propagate_vtable_entries_used): Likewise.
21         (elf_gc_smash_unused_vtentry_relocs): Likewise.
22         (elf_gc_allocate_got_offsets): Likewise.
23         (elf_collect_hash_codes): Likewise.
24         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
25         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
26         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
27         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
28         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
29         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
30         (elf_cris_discard_excess_dso_dynamics): Likewise.
31         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
32         (mark_PIC_calls): Likewise.
33         (allocate_plt_static): Likewise.
34         (allocate_dynrelocs): Likewise.
35         (readonly_dynrelocs): Likewise.
36         * elf32-i386.c (allocate_dynrelocs): Likewise.
37         (readonly_dynrelocs): Likewise.
38         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
39         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
40         * elf32-mips.c (mips_elf_output_extsym): Likewise.
41         (mips_elf_sort_hash_table_f): Likewise.
42         (mips_elf_check_mips16_stubs): Likewise.
43         * elf32-s390.c (allocate_dynrelocs): Likewise.
44         (readonly_dynrelocs): Likewise.
45         * elf32-sh.c (sh_elf_discard_copies): Likewise.
46         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
47         (xstormy16_relax_plt_realloc): Likewise.
48         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
49         (elf64_alpha_output_extsym): Likewise.
50         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
51         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
52         (mips_elf64_check_mips16_stubs): Likewise.
53         (mips_elf64_output_extsym): Likewise.
54         * elf64-ppc.c (func_desc_adjust): Likewise.
55         (allocate_dynrelocs): Likewise.
56         (readonly_dynrelocs): Likewise.
57         * elf64-s390.c (allocate_dynrelocs): Likewise.
58         (readonly_dynrelocs): Likewise.
59         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
60         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
61         (readonly_dynrelocs): Likewise.
62         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
63         * aoutx.h (aout_link_write_other_symbol): Likewise.
64         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
65         (_bfd_coff_write_global_sym): Likewise.
66         * i386linux.c (linux_tally_symbols): Likewise.
67         * m68klinux.c (linux_tally_symbols): Likewise.
68         * sparclinux.c (linux_tally_symbols): Likewise.
69         * pdp11.c (aout_link_write_other_symbol): Likewise.
70         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
71         * xcofflink.c (xcoff_build_ldsyms): Likewise.
72         (xcoff_write_global_symbol): Likewise.
73
74         * cofflink.c (_bfd_coff_final_link): Formatting.
75         * cpu-mips.c (mips_compatible): Make static, prototype.
76         * elf32-i386.c (elf_i386_check_relocs): Formatting.
77         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
78         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
79         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
80         (mips_elf64_final_link): Likewise.
81         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
82         prototype.
83
84 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
85
86         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
87         (SWAP_OUT_RELOC_OFFSET): Define.
88
89 2002-03-27  Gregory Steuck <greg@nest.cx>
90
91         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
92         terminating NULL if empty symbol table.
93         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
94
95 2002-03-26  H.J. Lu  (hjl@gnu.org)
96
97         * elflink.h (elf_link_input_bfd): Revert the last change since
98         the gcc exception handling isn't fixed yet.
99
100 2002-03-26  H.J. Lu  (hjl@gnu.org)
101
102         * elflink.h (elf_link_input_bfd): Complain about relocations
103         against local symbols in discarded sections.
104
105 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
106
107         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
108
109 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
110
111         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
112         section file offset for !SEC_LOAD sections.
113
114 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
115
116         * elf32-arm.h (elf32_arm_final_link_relocate case R_ARM_GOTOFF)
117         (case R_ARM_GOT): Handle relocations to Thumb functions.
118
119 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
120
121         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
122         Whitespace changes.
123         * archive.c: Update copyright date.
124         * bfd-in2.h: Regenerate.
125         * libbfd.h: Regenerate.
126         * Makefile.am: Run "make dep-am"
127         * Makefile.in: Regenerate.
128         * po/SRC-POTFILES.in: Regenerate.
129
130 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
131
132         * dwarf2.c (struct funcinfo): Move up.
133         (lookup_address_in_function_table): New argument function_ptr.
134         Set it.
135         (lookup_address_in_line_table): New argument function.  If function
136         is non-NULL, use it to handle ``addr'' before the first line note of
137         the function.
138         (comp_unit_find_nearest_line): Update and swap calls to
139         lookup_address_in_function_table and lookup_address_in_line_table.
140         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
141         N_SLINE encountered if we see an N_FUN before any N_SLINE.
142
143 2002-03-20  Tom Rix  <trix@redhat.com>
144
145         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from 
146         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
147         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt. 
148
149 2002-03-19  Tom Rix  <trix@redhat.com>
150
151         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all 
152         dynamic objects in archives.
153
154 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
155
156         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
157         STT_NOTYPE symbols to STT_OBJECT.
158
159 Mon Mar 18 17:38:03 CET 2002  Jan Hubicka  <jh@suse.cz>
160
161         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
162
163 2002-03-18  Tom Rix  <trix@redhat.com>
164
165         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
166         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
167         * coff-rs6000 (do_pad) : New function for archive padding.
168         (do_copy) : New function for object file copying in archives.
169         (do_shared_object_padding) : New function for padding shared
170         objects to their text section alignment in archives.
171         (bfd_xcoff_ar_achive_set_magic) : Stub.
172         (xcoff_write_armap_big) : Use do_copy and do_pad.
173         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
174         do_copy and do_pad.
175         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
176         bfd_xcoff_magic_number. 
177         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
178         fop.
179         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
180         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
181         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
182         * rs6000-core.c : Update copyright date.
183         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL 
184         csectpp.
185         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
186         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
187         (coff_set_flags) : Use bfd_xcoff_magic_number.
188         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
189         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
190         * Makefile.am : Same.
191         * config.bfd : Same.
192         * targets.c : Same.
193         * configure : Regnerate.
194         * Makefile.in : Same.
195         * bfd-in2.h : Same.
196
197 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
198
199         * po/fr.po: Updated version.
200
201 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
202
203         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
204         * libbfd.h: Regenerate.
205         * archive.c (coff_write_armap): Pass on failures from
206         bfd_write_bigendian_4byte_int.
207
208 2002-03-14  H.J. Lu <hjl@gnu.org>
209
210         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
211         error to bfd_error_nonrepresentable_section for reinit_array
212         section in DSO.
213
214 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
215
216         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
217         OR it in rather than replacing previously selected flags.
218
219         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
220         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
221
222 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
223
224         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
225         (N): Use the above.
226         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
227         ensure reloc size matches before calling elf_link_input_bfd.
228         Add an assert to check reloc size when counting output relocs.
229
230 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
231
232         * mmo.c (mmo_get_loc): Return NULL rather than false.
233
234 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
235
236         * po/fr.po: Updated version.
237
238 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
239
240         * archures.c (bfd_default_compatible): Test bits_per_word.
241         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
242         bfd_default_compatible.
243         * cpu-i370.c (i370_compatible): Likewise.
244         * cpu-sparc.c (sparc_compatible): Likewise.
245         * cpu-h8300.c (compatible): Test in->arch == out->arch.
246
247         * elflink.h: Formatting fixes.
248         (elf_link_output_extsym): Merge undefined and undef weak cases.
249
250         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
251         when word size of input matches output word size.
252
253 2002-03-12  Andreas Jaeger  <aj@suse.de>
254
255         * cpu-i386.c (i386_compatible): New.  Use it instead of
256         bfd_default_compatible.
257
258 2002-03-07  H.J. Lu  (hjl@gnu.org)
259
260         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
261         as the type for bfd_reloc_val.
262
263 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
264
265         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
266         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
267         (elf_hppa_final_link_relocate): Correct relocations for indirect
268         references to local data through the DLT.  Fix .opd creation for
269         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
270         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
271         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
272         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
273         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
274         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
275         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
276
277 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
278
279         * merge.c (_bfd_merge_sections): Don't segfault if there
280         is nothing to merge due to GC.
281
282 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
283
284         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
285         symbols that have been forced local.
286
287         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
288         to output forced local syms for non-shared link.
289         (elf_link_output_extsym): Tweak condition for calling backend
290         adjust_dynamic_symbol so that previous behaviour is kept.
291         Whitespace changes throughout file.
292
293 2002-03-04  H.J. Lu <hjl@gnu.org>
294
295         * elf.c (bfd_section_from_shdr): Handle special sections,
296         .init_array, .fini_array and .preinit_array.
297         (elf_fake_sections): Likewise.
298
299         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
300         DT entry only if the section is in output for .init_array,
301         .fini_array and .preinit_array. Complain about .preinit_array
302         section in DSO.
303         (elf_bfd_final_link): Warn zero size for .init_array,
304         .fini_array and .preinit_array sections.
305
306         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
307         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
308         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
309         .preinit_array.
310
311 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
312
313         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
314         * configure: Regenerate.
315
316 2002-03-02  Tom Rix  <trix@redhat.com>
317
318         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
319         symbolic equiv.
320         * coff-rs6000.c (xcoff_howto_table): Same.
321
322 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
323
324         * elflink.h (size_dynamic_sections): If section named
325         ".preinit_array" exists, create DT_PREINIT_ARRAY and
326         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
327         ".init_array" and ".fini_array".
328         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
329         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
330         DT_FINI_ARRAY.
331
332 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
333
334         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
335         dynsyms.
336
337 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
338
339         * elf64-hppa.h: Update copyright date.
340
341         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
342         (ppc64_elf_relocate_section): Don't generate power4 style branch
343         hints for *_BRTAKEN and *_BRNTAKEN relocs.
344
345 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
346
347         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
348         last patch.
349         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
350
351 2002-02-21  Andreas Jaeger  <aj@suse.de>
352
353         * elf64-x86-64.c: Major rework that introduces all recent changes
354         to the x86-64 backend.  Get a closer match to elf32-i386.
355         (struct elf64_x86_64_dyn_relocs): Rename from
356         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
357         all users.
358         (struct elf64_x86_64_link_hash_table): Add short cuts to some
359         sections.
360         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
361         remove casts, initialize new hash members.
362         (create_got_section): New.
363         (elf64_x86_64_create_dynamic_sections): New.
364         (elf64_x86_64_copy_indirect_symbol): New.
365         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
366         relocs, .got or .relgot here but do it in allocate_dynrelocs.
367         Reference count possible .plt and .got entries.  Don't test input
368         section SEC_READONLY here to try to avoid copy relocs, and keep
369         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
370         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
371         pointer to "sreloc" section in elf_section_data. Tweak condition
372         under which .got created.  Report files with bad relocation
373         section names.
374         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
375         Reference count possible .plt entries.  Don't deallocate .got and
376         .relgot space here.
377         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
378         do copy reloc processing for weakdefs.  Remove redundant casts and
379         aborts.  Delay setting of vars until needed.  Move creation of
380         dynamic symbols and allocation of .plt and .rela.plt to
381         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
382         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
383         (allocate_dynrelocs): New.
384         (readonly_dynrelocs): New.
385         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
386         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
387         Zero out the dynamic allocated content space.
388         (elf64_x86_64_discard_copies): Removed.
389         (elf64_x86_64_relocate_section): Make use of dynamic section
390         short-cuts.  Localise vars, and delay setting.  Better error
391         reporting, replace BFD_ASSERT with abort.  Check
392         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
393         regular object file and tread the weak definition as the normal
394         one.  Don't discard relocs for undefweak or undefined symbols and
395         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
396         relocs.
397         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
398         symbols that have been forced local.  Use same test to decide if
399         we can use a relative reloc for got as relocate_section.  Expand
400         SHN_UNDEF comment.  Move expressions out of function calls.
401         Replace BFD_ASSERT with abort.
402         (bfd_elf64_bfd_final_link): Removed.
403         (elf_backend_copy_indirect_symbol): Define.
404
405 2002-02-20  Tom Rix  <trix@redhat.com>
406
407         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
408         (_bfd_xcoff_reloc_type_lookup): Use it.
409         * coff64-rs6000.c (xcoff64_howto_table): Same.
410         (xcoff64_reloc_type_lookup): Same.
411
412 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
413
414         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
415         little endian.
416
417 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
418
419         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
420         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
421         * bfd-in2.h: Regenerate.
422         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
423         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
424         with "s390:64-bit".
425         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
426         (elf_s390_reloc_type_lookup): Likewise.
427         (elf_s390_check_relocs): Likewise.
428         (elf_s390_gc_sweep_hook): Likewise.
429         (elf_s390_relocate_section): Likewise.
430         (elf_s390_object_p): Use renamed architecture define.
431         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
432
433 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
434
435         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
436
437 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
438
439         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
440         absptr -> pcrel optimization for shared libs.
441         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
442         library cannot be converted to pcrel.
443         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
444         relative.
445         * elf32-i386.c (elf_i386_relocate_section): If
446         _bfd_elf_section_offset returned -2, skip, but make sure the
447         relocation is installed.
448         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
449         * elf32-cris.c (cris_elf_relocate_section): Likewise.
450         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
451         * elf32-i370.c (i370_elf_relocate_section): Likewise.
452         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
453         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
454         * elf32-s390.c (elf_s390_relocate_section): Likewise.
455         * elf32-sh.c (sh_elf_relocate_section): Likewise.
456         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
457         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
458         * elf64-s390.c (elf_s390_relocate_section): Likewise.
459         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
460         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
461         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
462         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
463         _bfd_elf_section_offset returning -2 the same way as -1.
464         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
465         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
466         and BFD_ASSERT.
467         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
468
469 2002-02-18  Tom Rix  <trix@redhat.com>
470
471         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
472         (bfd_xcoff_size_dynamic_sections): Same.
473         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
474         (bfd_xcoff_size_dynamic_sections): Same.
475         * coff-rs6000.c (xcoff_generate_rtinit): Same.
476         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
477         * libxcoff.h (struct xcoff_backend_data_rec): Same.
478         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
479         * bfd-in2.h: Regenerate.
480
481 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
482
483         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
484         (struct ppc_link_hash_table): Add sfpr.
485         (ppc64_elf_link_hash_table_create): Init it.
486         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
487         .glink out to..
488         (create_linkage_sections): ..here.  Make .sfpr too.
489         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
490         dynobj early.
491         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
492         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
493         ._restf* functions, and create as needed.
494         (func_desc_adjust): Only force_local for shared libs.
495
496 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
497
498         * configure.in: Bump version number post 2.12 branching.
499         * configure: Regenerate.
500
501 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
502
503         * mmo.c: Correct and improve comments.
504         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
505         zero-pad.  Use input to fill up non-empty bfd buffer.
506         (mmo_flush_chunk): New function.
507         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
508         changed.  Don't emit location specifier if VMA is same as
509         *LAST_VMAP after omitting leading zero contents.  Call
510         mmo_flush_chunk before emitting location specifier.
511         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
512         with mmo_write_loc_chunk calls.
513         (mmo_internal_write_section): Call mmo_flush_chunk after
514         mmo_write_chunk.
515         (mmo_write_symbols_and_terminator): Move :Main to first position
516         in symbol array.  Add faked one if it does not exist if there are
517         other symbols.  Don't add it if there are no symbols at all.  Move
518         out test for value of :Main from symbol loop.  Rename table
519         fakemain to maintable and variable mainsym to fakemain.
520
521 2002-02-15  Richard Henderson  <rth@redhat.com>
522
523         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
524         section with no got matches any got.  Simplify error generaion.
525
526 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
527
528         Support arbitrary length fill patterns.
529         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
530         (_bfd_default_link_order): Remove bfd_fill_link_order code.
531         Call default_data_link_order.
532         (default_fill_link_order): Delete.
533         (default_data_link_order): New function.
534         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
535         of bfd_fill_link_order with bfd_data_link_order.
536         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
537         * elf64-mips.c (mips_elf64_final_link): Likewise.
538
539         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
540         Correct value returned in "end" for "0x<non-hex>".
541
542 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
543
544         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
545         (scan): Test against 'mach' field in info structure.
546
547 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
548
549         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
550
551 2002-02-14  Matt Fredette  <fredette@netbsd.org>
552
553         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
554         EF_M68000.
555
556 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
557
558         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
559         non-zero physical addresses when adjusting the LMAs of new
560         sections.
561
562 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
563
564         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
565         from _bfd_elf_hppa_gen_reloc_type.
566         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
567         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
568         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
569         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
570
571 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
572
573         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
574         loading its contents if there's nothing to do in it.
575
576 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
577
578         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
579         64k boundary.
580
581         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
582         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
583         (ppc64_elf_finish_dynamic_sections): Set values for them.
584
585 2002-02-11  Michael Snyder  <msnyder@redhat.com>
586
587         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
588         * elf.c (elfcore_grok_pstatus): Add prototype.
589         (elfcore_grok_lwpstatus): Add prototype.
590         (elfcore_write_lwpstatus): New function.
591         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
592
593 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
594
595         * elf32-sh.c: Added missing prototypes.
596         * elf32-sh64.c: Likewise.
597         (sh_elf_align_loads): Mark unused args as such.
598         * elf64-sh64.c: Added missing prototypes.
599         (struct elf_sh64_link_hash_entry): Fix typo.
600         (sh_elf64_relocate_section): Fix info argument passed to
601         _bfd_elf_section_offset.
602
603 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
604
605         * Makefile.am: "make dep-am".
606         * Makefile.in: Regenerate.
607         * aclocal.m4: Regenerate.
608         * config.in: Regenerate.
609         * configure: Regenerate.
610
611 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
612
613         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
614         variable warnings.
615         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
616         comparison warning.
617         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
618         cast warnings for the common case.
619
620 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
621
622         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
623         vectors.
624         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
625         vectors.
626
627 2002-02-09  Richard Henderson  <rth@redhat.com>
628
629         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
630         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
631         (elf64_alpha_relocate_section): Likewise.
632         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
633         * bfd-in2.h, libbfd.h: Rebuild.
634
635 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
636
637         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
638         that base-plus-offset reloc accounting is consistent.
639         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
640         up to date for undefined symbols.
641
642 2002-02-08  Eric Christopher  <echristo@redhat.com>
643
644         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
645
646         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
647         sections for the O32 ABI.
648
649 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
650
651         * elf32-arm.h: Fix formatting of _("...").
652         * elf32-d10v.c: Likewise.
653         * elf32-m68k.c: Likewise.
654         * elf32-mips.c: Likewise.
655
656 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
657
658         * coff-or32.c: Fix compile time warning messages.
659
660 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
661
662         Contribute sh64-elf.
663         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
664         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
665         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
666         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
667         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
668         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
669         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
670         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
671         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
672         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
673         New relocs.
674         * libbfd.h, bfd-in2.h: Rebuilt.
675         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
676         (sh_reloc_map): Map them.
677         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
678         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
679         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
680         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
681         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
682         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
683         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
684         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
685         datalabel_got_offset.
686         (sh_elf_link_hash_newfunc): Initialize it.
687         (sh_elf_relocate_section): Augment the scope of
688         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
689         GOT and GOTOFF handling to new SHmedia relocation types.  Support
690         GOT_BIAS.
691         (sh_elf_check_relocs): Likewise.
692         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
693         PLT entries using movi_shori_putval.  Support GOT_BIAS.
694         (sh_elf_finish_dynamic_sections): Likewise.
695         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
696         relocation, it's now done by the caller.
697         (GOT_BIAS): New.
698         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
699         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
700         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
701         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
702         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
703         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
704         sh64_elf64_hash_table): New.
705         (sh_elf64_howto_table): Introduce new relocs.
706         (sh_elf64_info_to_howto): Accept new PIC relocs.
707         (sh_elf64_relocate_section): Augment the scope of
708         seen_stt_datalabel.  Support new PIC relocs.
709         (sh_elf64_check_relocs): Support new PIC relocs.
710         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
711         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
712         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
713         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
714         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
715         movi_shori_putval, movi_3shori_putval,
716         sh64_elf64_create_dynamic_sections,
717         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
718         sh64_elf64_size_dynamic_sections,
719         sh64_elf64_finish_dynamic_symbol,
720         sh64_elf64_finish_dynamic_sections): New.
721         (elf_backend_create_dynamic-sections,
722         bfd_elf64_bfd_link_hash_table_create,
723         elf_backend_adjust_dynamic_symbol,
724         elf_backend_size_dynamic_sections,
725         elf_backend_finish_dynamic_symbol,
726         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
727         elf_backend_plt_readonly, elf_backend_want_plt_sym,
728         elf_backend_got_header_size, elf_backend_plt_header_size):
729         Define.
730         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
731         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
732         match official numbers and names; moved unmaching ones to the
733         range 0xf2-0xff.
734         * elf32-sh64.c, elf64-sh64.c: Likewise.
735         2001-03-12  DJ Delorie  <dj@redhat.com>
736         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
737         sections.
738         2001-03-12  DJ Delorie  <dj@redhat.com>
739         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
740         be aligned.
741         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
742         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
743         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
744         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
745         .cranges section with SEC_SORT_ENTRIES set.
746         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
747         incoming sorted .cranges section.
748         (sh64_bfd_elf_copy_private_section_data): New.
749         (sh64_elf_final_write_processing): Only sort .cranges and modify
750         start address if called by linker.
751         2001-01-08  Ben Elliston  <bje@redhat.com>
752         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
753         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
754         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
755         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
756         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
757         line.  Add comments before all entries.
758         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
759         comment.
760         (sh_elf64_reloc): Correct head comment.
761         (sh_elf64_relocate_section): Correct spacing.
762         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
763         instead call reloc_dangerous callback.
764         <case R_SH_SHMEDIA_CODE>: New case.
765         (sh_elf64_gc_mark_hook): Correct spacing.
766         (sh_elf64_check_relocs): Ditto.
767         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
768         New case.
769         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
770         functions.
771         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
772         clarify describing comment.  Add comments before all entries.
773         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
774         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
775         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
776         Sort .cranges section in final link.  Prepare to set bit 0 on
777         entry address.
778         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
779         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
780         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
781         .cranges section.
782         (sh64_backend_section_from_shdr): New, to recognize
783         SHT_SH5_CR_SORTED on incoming .cranges section.
784         (elf_backend_section_from_shdr): Define.
785         (sh64_elf_final_write_processing): Sort outgoing .cranges
786         section.  (New, temporarily disabled:) Set bit 0 on entry address
787         according to ISA type.
788         (sh64_find_section_for_address): New.
789         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
790         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
791         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
792         bfd_malloc, not xmalloc.
793         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
794         global.
795         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
796         temporarily disabled) setting bit 0 on entry address.
797         (elf_backend_final_write_processing): Define.
798         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
799         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
800         be a proper relocation for PTA and PTB rather than a marker.
801         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
802         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
803         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
804         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
805         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
806         Zero src_mask.
807         * elf64-sh64.c: Ditto.
808         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
809         * elf32-sh64.c: Include opcodes/sh64-opc.h
810         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
811         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
812         parameters.  No unused parameters.  Caller changed.
813         <case R_SH_PT_16>: New case.
814         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
815         * Makefile.in: Regenerate.
816         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
817         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
818         all code sections.
819         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
820         (sh64_elf_merge_private_data): Ditto.
821         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
822         to access stored section flags.
823         (sh64_elf_final_write_processing): Return immediately unless
824         called by linker.  Use sh64_elf_section_data (cranges) to get size
825         of linker-generated cranges entries.
826         (sh64_elf_copy_private_data): Add missing "return true".
827         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
828         (sh_elf64_merge_private_data): Ditto.
829         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
830         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
831         elf64-sh64.c:sh64_elf_fake_sections.
832         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
833         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
834         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
835         (sh64_elf_final_write_processing): New.
836         (elf_backend_final_write_processing): Define.
837         (sh64_elf_fake_sections): Get header flags from tdata field.
838         (sh64_elf_copy_private_data): Do not call
839         sh64_elf_copy_private_data_internal, just copy e_flags field.
840         (sh64_elf_merge_private_data): Do not call
841         sh64_elf_copy_private_data_internal.
842         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
843         Remove EF_SH64_ABI64, let ELF size make difference.
844         Remove SH64-specific BFD section flag.
845         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
846         containing SHmedia through elf_section_data (asect)->tdata
847         non-zero, not using a BFD section flag.
848         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
849         (sh64_elf_merge_private_data): Similar.
850         (elf_backend_section_flags): Don't define.
851         (sh64_elf_backend_section_flags): Delete.
852         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
853         not EF_SH64_ABI64.
854         (sh_elf64_merge_private_data): Similar.
855         * section.c (Section flags definitions): Don't define
856         SEC_SH_ISA_SHMEDIA.
857         (bfd-in2.h): Regenerate.
858         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
859         Make DataLabel references work with partial linking.
860         * elf32-sh64.c: Fix formatting.
861         (sh64_elf_link_output_symbol_hook): New.
862         (elf_backend_link_output_symbol_hook): Define to
863         sh64_elf_link_output_symbol_hook.
864         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
865         undefined if partial linking.  Adjust sanity check.
866         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
867         (elf_backend_link_output_symbol_hook): Define to
868         sh64_elf64_link_output_symbol_hook.
869         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
870         undefined if partial linking.  Adjust sanity check.
871         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
872         Implement semantics for inter-file DataLabel references.
873         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
874         (sh64_elf64_add_symbol_hook): New.
875         (sh_elf64_relocate_section): If passing an indirect symbol with
876         st_type STT_DATALABEL on the way to a symbol with st_other
877         STO_SH5_ISA32, do not bitor 1 to the relocation.
878         (elf_backend_add_symbol_hook): Define to
879         sh64_elf64_add_symbol_hook.
880         * elf64-sh32.c: Tweak comments.
881         (DATALABEL_SUFFIX): Define.
882         (sh64_elf_add_symbol_hook): New.
883         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
884         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
885         symbol with st_type STT_DATALABEL on the way to a symbol with
886         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
887         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
888         Pass through STT_DATALABEL.
889         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
890         (elf_backend_get_symbol_type): Define.
891         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
892         (elf_backend_get_symbol_type): Define.
893         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
894         * elf32-sh64.c: Tweak comments.
895         (sh64_elf_copy_private_data_internal): Add prototype.
896         (bfd_elf32_bfd_set_private_flags): Define.
897         (sh64_elf_copy_private_data_internal): Compare machine name, not
898         textual BFD target name, to check whether to copy section flag
899         SHF_SH5_ISA32.
900         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
901         Tweak section-contents-type-mismatch message.
902         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
903         Validize reloc-types.
904         * elf64-sh64.c: New file.
905         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
906         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
907         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
908         Regenerate dependencies.
909         * Makefile.in: Regenerate.
910         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
911         bfd_elf64_sh64l_vec.
912         * configure.in: Handle bfd_elf64_sh64_vec and
913         bfd_elf64_sh64l_vec.
914         * configure: Regenerate.
915         * po/POTFILES.in: Regenerate.
916         * po/bfd.pot: Regenerate.
917         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
918         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
919         anything else but EF_SH64 and EF_SH64_ABI64.
920         (sh64_elf_merge_private_data): Emit error for anything else but
921         EF_SH64 and EF_SH64_ABI64.
922         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
923         from targ_selvecs.
924         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
925         bfd_elf32_sh64l_vec as a temporary measure.
926         * configure: Regenerate.
927         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
928         * cpu-sh.c (arch_info_struct): Include sh5 item
929         unconditionalized.
930         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
931         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
932         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
933         * elf32-sh64.c: Tweak comments.
934         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
935         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
936         (sh64_elf_copy_private_data_internal): Wrap long line.
937         (sh64_elf_merge_private_data): Rewrite to allow objects from
938         SH64 subsets to be linked together.
939         (INCLUDE_SHMEDIA): Define.
940         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
941         Parenthesize plus-expression inside or-expression.
942         <global symbol>: Ditto.
943         (sh_elf_set_mach_from_flags): Remove code refusing
944         deleted EF_SH64_32BIT_ABI flag.
945         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
946         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
947         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
948         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
949         (sh_elf_relocate_section) <local symbol>: Or 1 in
950         calculation of relocation if sym->st_other & STO_SH5_ISA32.
951         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
952         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
953         relocation.
954         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
955         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
956         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
957         Regenerate dependencies.
958         * Makefile.in: Regenerate.
959         * archures.c: Add bfd_mach_sh5.
960         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
961         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
962         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
963         * configure: Regenerate.
964         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
965         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
966         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
967         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
968         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
969         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
970         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
971         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
972         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
973         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
974         in item for SH5.
975         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
976         for SHmedia relocs.
977         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
978         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
979         shmedia_prepare_reloc, goto final_link_relocate if it returns
980         non-zero, else fail as before.
981         (sh_elf_set_mach_from_flags): Provide function only if not defined
982         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
983         (sh_elf_set_private_flags): Provide function only if not defined
984         as a macro.
985         (sh_elf_copy_private_data): Similar.
986         (sh_elf_merge_private_data): Similar.
987         * section.c (SEC_SH_ISA_SHMEDIA): New.
988         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
989         * elf32-sh64.c: New file.
990         * libbfd.h: Regenerate.
991         * bfd-in2.h: Regenerate.
992         * po/POTFILES.in: Regenerate.
993         * po/bfd.pot: Regenerate.
994         * bfd-in2.h: Regenerate.
995         * libbfd.h: Regenerate.
996
997 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
998
999         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
1000         been included, not drag it in.
1001         * bfd-in2.h: Regenerate.
1002
1003 2002-02-06  H.J. Lu  (hjl@gnu.org)
1004
1005         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
1006         the mach and ISA fields if necessary.
1007
1008 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
1009
1010         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
1011         ARM architecture when an F_ARM_5 flag is detected, since we cannot
1012         be sure exactly which architecture this represents.
1013
1014 2002-02-05  Nick Clifton  <nickc@redhat.com>
1015
1016         * po/tr.po: Updated translation.
1017
1018 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
1019
1020         From Jimi X <jimix@watson.ibm.com>
1021         * archures (bfd_mach_ppc64): Define.
1022         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
1023         (bfd_powerpc_arch): Define.
1024         * bfd-in2.h: Regenerate.
1025         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
1026         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
1027         (bfd_powerpc_archs): Add default powerpc64 arch.
1028
1029 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
1030
1031         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
1032         against section syms in readonly sections.  Don't do the global
1033         sym check if we find one.
1034         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1035         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1036         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1037         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1038         (elf_s390_grok_prstatus): Add missing prototype.
1039
1040 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
1041
1042         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
1043         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
1044         Call bfd_get_section_by_name only once.  Initialize
1045         bpodata->n_bpo_relocs_this_section.
1046         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
1047         referring to DSOs.
1048         (bpo_reloc_request_sort_fn): Don't use difference of values as
1049         return-value.
1050
1051 2002-02-02  David O'Brien  <obrien@FreeBSD>
1052
1053         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
1054         version 4.5 and later the same as 5-CURRENT.
1055         * configure: Re-generate.
1056
1057 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
1058
1059         * config.bfd (hppa*-*-netbsd*): New target.
1060
1061 2002-01-31  Philipp Thomas  <pthomas@suse.de>
1062
1063         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
1064         to front of message. Unify messages with elf32-arm.h. Use
1065         commas where neccessary.
1066         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
1067         ERROR in messages. Unify messages with coff-arm.c. Correct
1068         VFP/FPA error message.
1069         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
1070         APCS-32 for translation.
1071
1072 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
1073
1074         Perform on-demand global register allocation from
1075         R_MMIX_BASE_PLUS_OFFSET relocs.
1076         * elf64-mmix.c (struct bpo_reloc_section_info, struct
1077         bpo_reloc_request, struct bpo_greg_section_info): New.
1078         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
1079         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
1080         _bfd_mmix_check_all_relocs,
1081         _bfd_mmix_prepare_linker_allocated_gregs,
1082         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
1083         (elf_mmix_howto_table): Correct src_mask for most relocs.
1084         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
1085         case.
1086         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
1087         case.  Fix typo in comment.  New label do_mmix_reloc.
1088         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
1089         store first object file with a base-plus-offset reloc.  Call
1090         mmix_elf_check_common_relocs for the part common with mmo.
1091         (mmix_elf_final_link): Write out linker-allocated register
1092         contents section.
1093         (elf_backend_gc_sweep_hook): Define.
1094         (bfd_elf64_bfd_relax_section): Define.
1095
1096         * mmo.c: Don't include <ctype.h>
1097         (mmo_init): Correct init-once logic.
1098
1099 2002-02-01  Tom Rix  <trix@redhat.com>
1100
1101         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
1102
1103 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
1104
1105         * Makefile.am: Run "make dep-am"
1106         * Makefile.in: Regenerate.
1107
1108 2002-01-31  David O'Brien  <obrien@FreeBSD>
1109
1110         * configure.in: Recognize the differences in core files from FreeBSD
1111         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
1112         5-CURRENT.
1113         * configure: Regenerate.
1114
1115 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
1116
1117         * coff-or32.c: New file.
1118         * cpu-or32.c: New file.
1119         * elf32-or32.c: New file.
1120         * archures.c: Add support for or32.
1121         * targets.c: Add support for or32.
1122         * bfd-in2.h: Regenerate.
1123         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
1124         coff_write_object_contents): Add support for or32.
1125         * config.bfd: Add target.
1126         * configure.in: Add support for or32.
1127         * configure: Regenerate.
1128         * Makefile.am: Add support for or32.
1129         * Makefile.in: Regenerate.
1130         * po/SRC-POTFILES.in: Add or32 files.
1131         * po/bfd.pot: Regenerate.
1132
1133 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
1134             Don Lindsay  <lindsayd@cisco.com>
1135
1136         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
1137         false' with a return of a bfd_reloc_ error code.
1138
1139 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
1140
1141         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1142         unexport unreferenced symbols when --export-dynamic.  Call
1143         _bfd_elf_strtab_delref when unexporting.
1144
1145 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
1146
1147         * bfd-in.h: Include <stdbool.h> if it is available.
1148         * bfd-in2.h: Regenerated.
1149
1150 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
1151
1152         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
1153         not go via the plt.
1154
1155 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
1156
1157         * archures.c: Tidy up formatting of embedded comments.
1158         * bfd.c: Tidy up formatting of embedded comments.
1159         * bfd-in.h: Fix formatting of comments.
1160         * reloc.c: Tidy up formatting of ordinary & embedded comments.
1161         * section.c: Tidy up formatting of embedded comments.
1162         * syms.c: Tidy up formatting of embedded comments.
1163         * targets.c: Tidy up formatting of embedded comments.
1164
1165         * bfd-in2.h: Regenerate.
1166
1167 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
1168
1169         * vms-tir.c (cmd_name): New function.
1170         (tir_cmd_name): New function.
1171         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
1172         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
1173         Fix formatting.
1174
1175         * peXXigen.c (pe_print_idata): Rearrange message to aid in
1176         translation.
1177         (pe_print_pdata):  Rearrange message to aid in translation.
1178
1179         * libbfd.c (warn_deprecated): Rearrange error message to aid in
1180         translation.
1181
1182         * ihex.c (ihex_write_object_contents): Fix spelling typo.
1183
1184         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
1185
1186         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
1187         message to aid in translation.
1188
1189         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
1190         to aid in translation.
1191
1192         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
1193
1194 2002-01-30  Philipp Thomas  <pthomas@suse.de>
1195
1196         * coff-arm.c, elf32-elf.h: Unify messages.
1197
1198 2002-01-30  Nick Clifton <nickc@redhat.com>
1199
1200         * po/sv.po: Updated translation.
1201
1202 2002-01-30  Philipp Thomas  <pthomas@suse.de>
1203
1204         * dwarf2.c (read_abbrev): Use full section name in error message.
1205         (decode_line_info): Likewise.
1206
1207         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
1208         message.
1209
1210 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
1211
1212         * elf64-ppc.c (func_desc_adjust): Only provide missing function
1213         descriptor symbols for undefined function code syms.  Clear
1214         ELF_LINK_NON_ELF so that they can stay weak.
1215
1216 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
1217             Mitch Lichtenberg  <mpl@broadcom.com>
1218
1219         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
1220         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
1221         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
1222         generation.
1223         * bfd-in2.h: Regenerate.
1224
1225 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
1226
1227         * elf32-mips.c: Add additional comments about HI16 relocation
1228         processing.
1229         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
1230         pc-relative relocations.  (Reverts change made on 2001-10-31.)
1231         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
1232         for pc-relative relocations.
1233         (mips_elf_calculate_relocation): Add a comment about a kludge
1234         in the R_MIPS_GNU_REL_HI16 handling.
1235         (_bfd_mips_elf_relocate_section): Implement that kludge;
1236         adjust pc-relative HI16 relocation for difference in HI16 and
1237         LO16 addresses, since it can't easily be done in
1238         mips_elf_calculate_relocation.
1239
1240 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1241
1242         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
1243         relocations with PC32 relocations for undefined or weak symbols.
1244         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
1245         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
1246
1247 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
1248
1249         * elfcore.h (elf_core_file_p): Improve comment for last change.
1250
1251 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
1252
1253         * configure: Regenerated.
1254
1255 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
1256
1257         * elfcore.h (elf_core_file_p): Set the machine architecture
1258         before processing the program headers.
1259
1260 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
1261
1262         * configure.in <64-bit configuration>: If using gcc, check and
1263         emit error for egcs-1.1.2.
1264         * configure: Regenerate.
1265
1266 2002-01-26  Egor Duda  <deo@logos-m.ru>
1267
1268         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
1269         as possible to avoid stack corruption.
1270
1271 2002-01-26  Richard Henderson  <rth@redhat.com>
1272
1273         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
1274         for non-allocated sections.
1275
1276 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
1277
1278         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
1279         prstat.pr_reg even if it is a struct.
1280
1281 2002-01-25  Steve Ellcey <sje@cup.hp.com>
1282
1283         * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
1284
1285 2002-01-25  Philipp Thomas  <pthomas@suse.de>
1286
1287         * coffgen.c (coff_print_symbol): Don't mark info message
1288         for translation.
1289
1290 2002-01-25  Nick Clifton <nickc@redhat.com>
1291
1292         * po/fr.po: Updated translation.
1293         * po/es.po: Updated translation.
1294
1295 2002-01-25  Philipp Thomas  <pthomas@suse.de>
1296
1297         * coff-alpha.c (alpha_relocate_section): Unify warning message
1298         for GP relative relocations without GP defined.
1299         * coff-mips.c (mips_relocate_section): Likewise.
1300
1301 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
1302
1303         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
1304         unsigned overflow when new_offset < old_offset.
1305
1306 2002-01-24  Philipp Thomas  <pthomas@suse.de>
1307
1308         * bfd.c (_bfd_abort): Fix typo.
1309
1310 2002-01-23  Richard Henderson  <rth@redhat.com>
1311
1312         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
1313         plt entries for undefweak symbols.
1314
1315 2002-01-23  Steve Ellcey <sje@cup.hp.com>
1316
1317         * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
1318         DEFAULT_VECTOR.
1319         (bfd_elf64_ia64_hpux_big_vec): Ditto.
1320         (bfd_elf32_h8300_vec): Ditto.
1321
1322 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
1323
1324         * elf64-ppc.c: Remove stale part of ABI comment.
1325         (NO_OPD_RELOCS): Define.
1326         (ppc64_elf_check_relocs): Use it.
1327         (ppc64_elf_relocate_section): Here too.
1328         (build_one_stub): Don't point function syms at the stub.  Instead,
1329         hijack plt.offset.
1330         (ppc64_elf_relocate_section): Check whether REL24 relocs should
1331         really go to the stub.  Make all dynamic relocs in opd against
1332         locals.
1333         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
1334         plt.offset.
1335
1336 2002-01-22  Richard Henderson  <rth@redhat.com>
1337
1338         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
1339
1340 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
1341
1342         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
1343         TOC_BASE_OFF adjustment.
1344
1345         * Makefile.am: Run "make dep-am".
1346         * Makefile.in: Regenerate.
1347         * po/SRC-POTFILES.in: Regenerate.
1348
1349 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1350
1351         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
1352         host defines.
1353
1354 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
1355
1356         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
1357         Check for and emit error if sgot is NULL at this point.
1358
1359 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
1360
1361         * config.bfd (ia64*-*-netbsd*): New target.
1362
1363 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
1364
1365         * som.c (som_write_space_strings): Comment typo fix.
1366
1367 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
1368
1369         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
1370         is_func_descriptor fields.
1371         (link_hash_newfunc): Init them.
1372         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
1373         dot are candidates for plt entries.  When processing .opd relocs,
1374         set function descriptor strings to point inside function code
1375         string, and set new ppc_link_hash_entry fields.
1376         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
1377         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
1378         function descriptors.  It's now done in..
1379         (func_desc_adjust): New.
1380         (ppc64_elf_func_desc_adjust): New.
1381         (define elf_backend_always_size_sections): Define.
1382         (ppc64_elf_hide_symbol): New.
1383         (define elf_backend_hide_symbol): Define.
1384         (allocate_dynrelocs): Remove code looking up function descriptors
1385         as that has been done earlier.
1386         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
1387         table.
1388         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
1389         up function descriptor.
1390         (build_one_stub): Look up the function code sym.  Check for
1391         invalid plt offsets.
1392         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
1393         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
1394
1395         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
1396         boolean param.
1397         (_bfd_elf_link_hash_hide_symbol): Likewise.
1398         * elflink.h (elf_link_add_object_symbols): Adjust call to
1399         elf_backend_hide_symbol.
1400         (elf_fix_symbol_flags): Likewise.
1401         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
1402         than bfd_alloc.
1403         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
1404         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
1405         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1406         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
1407         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
1408         and adjust to suit.
1409         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
1410         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
1411         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1412
1413 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
1414
1415         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
1416         dynamic function descriptor symbol, not the associated function
1417         symbol.
1418
1419 2002-01-17  Eric Christopher  <echristo@redhat.com>
1420
1421         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
1422
1423 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
1424
1425         * po/bfd.pot: Regenerate.
1426         * po/fr.po: Regenerate.
1427
1428 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
1429
1430         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
1431         Remove "Elf_Internal_Shdr *" param.
1432         (_bfd_mips_elf_section_from_bfd_section): Ditto.
1433         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
1434         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
1435         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
1436         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
1437         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
1438         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
1439         function to override special sections.  Remove hdr arg from
1440         backend call, and don't loop.
1441
1442 2002-01-16  Eric Christopher  <echristo@redhat.com>
1443
1444         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
1445         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
1446         relocations requiring gp0 and gp.
1447
1448 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
1449
1450         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
1451         EF_ARM_VFP_FLOAT.
1452         (elf32_arm_print_private_bfd_data): Likewise.
1453
1454 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
1455
1456         * po/tr.po: Import new version.
1457
1458 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
1459
1460         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
1461         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
1462         (ORI_R0_R0_0): Correct.
1463
1464 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
1465
1466         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
1467         when plt_not_loaded.
1468         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
1469         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
1470         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
1471         (ppc64_elf_glink_code): Delete.
1472         (PPC64_ELF_GLINK_SIZE): Delete.
1473         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
1474         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
1475         ORI_R0_R0_0): Define.
1476         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
1477         (struct ppc_link_hash_table): Add sstub and plt_overflow.
1478         (ppc64_elf_link_hash_table_create): Init them.
1479         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
1480         Don't copy to shared lib.
1481         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
1482         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
1483         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
1484         room for .stub and .glink code.
1485         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
1486         DT_PPC64_GLINK.
1487         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
1488         bfd_elf64_bfd_final_link.
1489         (bfd_elf64_bfd_final_link): Don't define.
1490         (ppc64_elf_size_stubs): New.
1491         (build_plt_stub): New.
1492         (build_one_stub): New.
1493         (ppc64_elf_build_stubs): New.
1494         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
1495         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
1496         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
1497         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
1498         case output sections not separate.  Adjust DT_RELASZ to not
1499         include plt relocs.  Set reserved got entry.  Set got and plt
1500         entry size.
1501         (elf_backend_got_header_size): Set to 8.
1502         * elf64-ppc.h: New file.
1503
1504 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
1505
1506         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
1507         sections, use bfd_section_list_remove.
1508         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1509         * elflink.h (elf_link_add_object_symbols): When removing all
1510         sections, use bfd_section_list_clear.
1511
1512 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
1513
1514         * po/sv.po: New file: Swedish translation.
1515         * configure.in (ALL_LINGUAS): Add sv.
1516         * configure: Regenerate.
1517
1518 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
1519
1520         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
1521         * elf.c (merge_sections_remove_hook): New function.
1522         (_bfd_elf_merge_sections): Pass it as 3rd argument to
1523         _bfd_merge_sections.
1524         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
1525         * libbfd.h: Rebuilt.
1526         * merge.c (_bfd_merge_sections): Add remove_hook argument.
1527         Call remove_hook if a SEC_EXCLUDE section is encountered.
1528
1529 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
1530
1531         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
1532         (xstormy16_reloc_map): Initialise new field with correct howto
1533         table.
1534         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
1535         howto entry.
1536
1537 2002-01-10  Michael Snyder  <msnyder@redhat.com>
1538
1539         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
1540         (elfcore_write_pstatus): Use long instead of pid_t;
1541         * elf-bfd.h: Change prototypes to use long instead of pid_t;
1542
1543 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
1544
1545         * elf.c: Update copyright years.
1546         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
1547         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
1548
1549 2002-01-08  Michael Snyder  <msnyder@redhat.com>
1550
1551         Add capability to write corefile note sections, for gdb.
1552         * elf.c (elfcore_write_note): New function.
1553         (elfcore_write_prpsinfo): New function.
1554         (elfcore_write_prstatus): New function.
1555         (elfcore_write_pstatus): New function.
1556         (elfcore_write_prfpreg): New function.
1557         (elfcore_write_prxfpreg): New function.
1558         * elf-bfd.h: Add prototypes for above functions.
1559
1560 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
1561
1562         * elf.c (elf_fake_sections): Propagate errors from
1563         elf_backend_fake_section.
1564
1565 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
1566
1567         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
1568         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
1569         (elf32-sh-nbsd.lo): New rule.
1570         * Makefile.in: Regenerate.
1571         * config.bfd (sh*le-*-netbsdelf*): New target.
1572         (sh*-*-netbsdelf*): New target.
1573         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
1574         (bfd_elf32_shnbsd_vec): New vector.
1575         (bfd_elf32_shlnbsd_vec): New vector.
1576         * configure: Regenerate.
1577         * elf32-sh-nbsd.c: New file.
1578         * targets.c: Update copyright years.
1579         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
1580         bfd_elf32_shnbsd_vec.
1581
1582 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
1583
1584         * coff-rs6000.c (READ20): Use bfd_scan_vma.
1585
1586 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
1587
1588         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
1589         of a symbol in a section that will be deleted.
1590
1591 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
1592
1593         * po/es.po: New file: Spanish translation.
1594         * configure.in (ALL_LINGUAS): Add es.
1595         * configure: Regenerate.
1596
1597 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
1598
1599         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
1600         argument so we can handle HP-UX specially.
1601         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
1602         (elfNN_hpux_backend_section_from_bfd_section): New for support
1603         of SHN_IA_64_ANSI_COMMON.
1604         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
1605         (is_unwind_section_name): Add special HP-UX support.
1606         (elfNN_ia64_section_from_shdr): Add support for more sections.
1607         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
1608         add support for more sections.
1609         (elfNN_ia64_additional_program_headers): Modify
1610         is_unwind_section_name call.
1611         (elfNN_ia64_modify_segment_map): Remove assumption that there is
1612         only one unwind section in segment.
1613
1614 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
1615
1616         * syms.c (_bfd_generic_make_empty_symbol): New function.
1617         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
1618         _bfd_generic_make_empty_symbol.
1619         * libbfd.h: Regenerate.
1620         * bfd-in2.h: Regenerate.
1621         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
1622         (hppabsd_core_get_symtab_upper_bound): Don't define.
1623         (hppabsd_core_get_symtab): Likewise.
1624         (hppabsd_core_print_symbol): Likewise.
1625         (hppabsd_core_get_symbol_info): Likewise.
1626         (hppabsd_core_bfd_is_local_label_name): Likewise.
1627         (hppabsd_core_get_lineno): Likewise.
1628         (hppabsd_core_find_nearest_line): Likewise.
1629         (hppabsd_core_bfd_make_debug_symbol): Likewise.
1630         (hppabsd_core_read_minisymbols): Likewise.
1631         (hppabsd_core_minisymbol_to_symbol): Likewise.
1632         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
1633         Formatting fixes.
1634         * hpux-core.c: Similarly.
1635         * irix-core.c: Similarly.
1636         * osf-core.c: Similarly.
1637         * sco5-core.c: Similarly.
1638         * binary.c (binary_make_empty_symbol): Remove function, define as
1639         _bfd_generic_make_empty_symbol.
1640         * ihex.c (ihex_make_empty_symbol): Likewise.
1641         * mmo.c (mmo_make_empty_symbol): Likewise.
1642         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
1643         * srec.c (srec_make_empty_symbol): Likewise.
1644         * versados.c (versados_make_empty_symbol): Likewise.
1645         * vms.c (_bfd_vms_make_empty_symbol): Remove.
1646         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
1647         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
1648         rather than _bfd_vms_make_empty_symbol.
1649         * vms-misc.c (new_symbol): Likewise.
1650
1651 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
1652
1653         * section.c (bfd_section_init): Remove unnecessary initialisations.
1654         (bfd_section_list_clear): New function.
1655         (bfd_section_list_remove, bfd_section_list_insert): New macros.
1656         (_bfd_strip_section_from_output): Use them.
1657         * coffcode.h (coff_set_alignment_hook): Likewise.
1658         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
1659         * elf64-mips.c (mips_elf64_final_link): Likewise.
1660         * elf64-mmix.c (mmix_elf_final_link): Likewise.
1661         * sunos.c (sunos_add_dynamic_symbols): Likewise.
1662         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1663         * bfd-in2.h: Regenerate.
1664
1665         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
1666         rather than doing our own section handling.  Clean up after errors
1667         with bfd_release and bfd_section_list_clear.  Handle unexpected
1668         flags.
1669         * aoutf1.h (sunos4_core_file_p): Likewise.
1670         * aix386-core.c (aix386_core_file_p): Likewise.
1671         * cisco-core.c (cisco_core_file_validate): Likewise.
1672         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1673         * trad-core.c (trad_unix_core_file_p): Likewise.
1674
1675         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
1676         with bfd_release and bfd_section_list_clear.
1677         * hpux-core.c (hpux_core_core_file_p): Likewise.
1678         * irix-core.c (irix_core_core_file_p): Likewise.
1679         * lynx-core.c (lynx_core_file_p): Likewise.
1680         * osf-core.c (osf_core_core_file_p): Likewise.
1681         * rs6000-core.c (rs6000coff_core_p): Likewise.
1682         * sco5-core.c (sco5_core_file_p): Likewise.
1683
1684         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
1685         sign extension adjustments without conditionals.
1686
1687 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
1688
1689         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
1690         CIE at .eh_frame start is removed due to no FDEs referencing it.
1691
1692 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
1693
1694         * config.bfd (x86_64-*-netbsd*): New target.
1695         * configure.in (x86_64-*-netbsd*): Set COREFILE
1696         to netbsd-core.lo.
1697         * configure: Regenerated.
1698
1699 2002-01-03  Tom Rix  <trix@redhat.com>
1700
1701         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
1702         for recent bfd_make_section_anyway change.
1703
1704 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
1705
1706         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
1707         R_ARM_THM_PC11 reloc.
1708
1709 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
1710
1711         * configure.in (LINGUAS): Add ja.
1712         * configure: Regenerate.
1713         * po/ja.po: Import from translation project's web site.
1714
1715 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
1716
1717         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
1718         messages to ease translation into other languages.
1719
1720 For older changes see ChangeLog-0001
1721 \f
1722 Local Variables:
1723 mode: change-log
1724 left-margin: 8
1725 fill-column: 74
1726 version-control: never
1727 End: