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