1 2002-07-04 Jakub Jelinek <jakub@redhat.com>
3 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
5 Reported by Michael Schumacher <mike@hightec-rt.com>.
7 2002-07-04 Alan Modra <amodra@bigpond.net.au>
9 * section.c (_bfd_strip_section_from_output): Remove unnecessary
10 link order code. Don't actually remove the output section here;
11 Just set a flag for the linker to do so.
12 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
13 sections when setting up output section dynsyms.
15 2002-07-04 Alan Modra <amodra@bigpond.net.au>
17 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
19 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
22 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
24 * elf64-s390.c (create_got_section): Set .got section alignment to
26 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
28 2002-07-02 Alan Modra <amodra@bigpond.net.au>
30 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
32 2002-07-01 Matt Thomas <matt@3am-software.com>
34 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
37 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
39 * elfxx-mips.c (ABI_64_P): Fix comment.
40 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
41 new section names for N64 ABI.
42 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
43 (mips_elf_calculate_relocation): Code formatting.
44 (mips_elf_create_dynamic_relocation): Likewise.
45 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
46 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
47 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
49 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
51 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
52 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
55 2002-07-01 Andreas Schwab <schwab@suse.de>
57 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
58 R_X86_64_64 to R_X86_64_RELATIVE.
60 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
62 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
63 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
65 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
67 * configure.in (vaxbsd_vec): Add.
68 * targets.c (vaxbsd_vec): Add.
69 * Makefile.in: Rebuild.
71 * po/SRC-POTFILES.in: Rebuild.
73 2002-07-01 Alan Modra <amodra@bigpond.net.au>
75 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
76 examining to gc_mark_hook, rather than the bfd.
77 (elf_gc_sections): Adjust.
78 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
79 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
80 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
81 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
82 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
83 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
84 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
85 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
86 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
87 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
88 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
89 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
90 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
91 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
92 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
93 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
94 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
95 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
96 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
97 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
98 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
99 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
100 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
101 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
102 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
103 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
104 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
105 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
106 redundant local sym tests.
107 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
108 (link_hash_newfunc): Init is_entry.
109 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
110 (ppc64_elf_link_hash_table_create): Init all_local_syms.
111 (create_linkage_sections): Use bfd_make_section_anyway rather than
113 (ppc64_elf_mark_entry_syms): New function.
114 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
115 up opd entry to function section map.
116 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
117 relocs that reference the opd section.
118 (edit_opd): New function.
119 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
120 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
121 (get_local_syms): Do so here. Exit if we already have local syms.
122 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
123 read local syms on non-ELF input.
124 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
125 than duplicating it's function here. Adjust free of internal
127 (ppc64_elf_relocate_section): Adjust local syms in opd section.
128 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
129 * elf32-hppa.c (elf32_hppa_size_stubs): Call
130 _bfd_elf32_link_read_relocs rather than duplicating it's function
131 here. Adjust free of internal relocs to suit.
133 2002-07-01 Andreas Jaeger <aj@suse.de>
135 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
136 are not allowed in shared libs code, enforce -fPIC.
138 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
140 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
141 trailing zero-sequences when there's previous left-over data.
143 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
145 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
146 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
147 and opd_rel_sec in order for starting rela section. Check _raw_size.
148 (elf_backend_reloc_type_class): Define.
150 2002-06-27 Kevin Buettner <kevinb@redhat.com>
152 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
155 2002-06-27 Alan Modra <amodra@bigpond.net.au>
157 * cpu-powerpc.c: Comment on ordering of arch_info.
158 * elf32-ppc.c (ppc_elf_object_p): New function.
159 (elf_backend_object_p): Define.
160 * elf64-ppc.c (ppc64_elf_object_p): New function.
161 (elf_backend_object_p): Define.
163 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
165 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
166 * configure: Regenerate.
168 2002-06-25 Jason Eckhardt <jle@rice.edu>
170 * dwarf2.c (decode_line_info): Check unit->addr_size
171 to read in the proper number of prologue bytes.
173 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
175 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
176 aix5coff64_vec if 64-bit bfd support has been enabled.
177 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
180 * targets.c (_bfd_target_vector[]): Only include
181 aix5coff64_vec if 64-bit bfd support has been enabled.
183 2002-06-25 Alan Modra <amodra@bigpond.net.au>
185 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
186 * elf32-hppa.c (hppa_add_stub): Likewise.
187 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
188 * elflink.h (elf_add_default_symbol): Fix comment typo.
189 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
190 (elf_link_add_object_symbols): Likewise.
191 (elf_link_assign_sym_version): Likewise.
192 * hash.c (bfd_hash_lookup): Likewise.
193 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
194 * section.c (bfd_get_unique_section_name): Likewise.
195 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
196 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
197 (assign_section_numbers): Likewise.
198 (_bfd_elfcore_make_pseudosection): Likewise.
199 (elfcore_grok_lwpstatus): Likewise.
200 (elfcore_grok_win32pstatus): Likewise.
201 (elfcore_write_note): Constify input params. Use PTR instead of
202 void *. Include terminating NUL in namesz. Correct padding.
203 Support NULL "name" param. Use memcpy instead of strcpy.
204 (elfcore_write_prpsinfo): Constify input params.
205 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
206 (elfcore_write_lwpstatus): Likewise.
207 (elfcore_write_pstatus): Likewise.
208 (elfcore_write_prfpreg): Likewise.
209 (elfcore_write_prxfpreg): Likewise.
210 * elf-bfd.h (elfcore_write_note): Update declaration.
211 (elfcore_write_prpsinfo): Likewise.
212 (elfcore_write_prstatus): Likewise.
213 (elfcore_write_pstatus): Likewise.
214 (elfcore_write_prfpreg): Likewise.
215 (elfcore_write_prxfpreg): Likewise.
216 (elfcore_write_lwpstatus): Likewise.
218 2002-06-25 Jason Eckhardt <jle@rice.edu>
220 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
221 symbols of type stProc and stStaticProc.
223 2002-06-25 Nick Clifton <nickc@redhat.com>
225 * ecoff.c: VArious formatting fixes.
227 2002-06-25 Alan Modra <amodra@bigpond.net.au>
229 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
231 2002-06-25 Alan Modra <amodra@bigpond.net.au>
233 * aout-adobe.c: Don't compare against "true" or "false.
234 * aout-target.h: Likewise.
236 * archive.c: Likewise.
239 * coff-a29k.c: Likewise.
240 * coff-alpha.c: Likewise.
241 * coff-i386.c: Likewise.
242 * coff-mips.c: Likewise.
243 * coff-or32.c: Likewise.
244 * coff64-rs6000.c: Likewise.
245 * coffcode.h: Likewise.
246 * coffgen.c: Likewise.
247 * cpu-ns32k.c: Likewise.
249 * ecofflink.c: Likewise.
251 * elf32-arm.h: Likewise.
252 * elf32-cris.c: Likewise.
253 * elf32-d30v.c: Likewise.
254 * elf32-i386.c: Likewise.
255 * elf32-mcore.c: Likewise.
256 * elf32-ppc.c: Likewise.
257 * elf32-sh.c: Likewise.
258 * elf32-sh64.c: Likewise.
259 * elf32-v850.c: Likewise.
260 * elf64-alpha.c: Likewise.
261 * elf64-sh64.c: Likewise.
262 * elfcode.h: Likewise.
263 * elfcore.h: Likewise.
264 * elflink.h: Likewise.
265 * elfxx-mips.c: Likewise.
266 * i386os9k.c: Likewise.
268 * libbfd.c: Likewise.
269 * linker.c: Likewise.
271 * nlm32-alpha.c: Likewise.
272 * nlm32-i386.c: Likewise.
273 * nlm32-ppc.c: Likewise.
274 * nlm32-sparc.c: Likewise.
275 * nlmcode.h: Likewise.
278 * peicode.h: Likewise.
282 * tekhex.c: Likewise.
284 * xcofflink.c: Likewise.
285 * elf64-sparc.c: Edit comment to not use "== false".
287 * aoutf1.h: Don't use "? true : false".
289 * format.c: Likewise.
291 * linker.c: Likewise.
295 2002-06-23 H.J. Lu <hjl@gnu.org>
297 * elflink.h (elf_link_add_archive_symbols): For the default
298 version, check references with only one `@' first.
300 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
302 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
304 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
306 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
307 (elf64_hppa_size_dynamic_sections): Revise to use
308 elf64_hppa_mark_milli_and_exported_functions.
309 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
310 symbols out of dynamic symbol table.
312 2002-06-23 Alan Modra <amodra@bigpond.net.au>
314 * Makefile.in: Regenerate.
315 * libbfd.h: Regenerate.
316 * bfd-in2.h: Regenerate.
317 * configure: Regenerate.
318 * po/SRC-POTFILES.in: Regenerate.
320 * elflink.h: Comment typo fixes.
322 2002-06-23 H.J. Lu <hjl@gnu.org>
324 * elf-bfd.h (elf_link_loaded_list): New structure.
325 (elf_link_hash_table): Add "loaded".
326 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
327 * elflink.h (elf_link_check_versioned_symbol): New function.
328 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
330 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
332 * elflink.h (size_dynamic_sections): If the target does not
333 support an ELF style hash table, return true, indicating that
334 nothing needed to be done, rather than false, indicating that the
335 section's size could not be computed.
337 2002-06-18 Dave Brolley <brolley@redhat.com>
339 From Catherine Moore, Michael Meissner, Dave Brolley:
340 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
341 * targets.c: Support bfd_elf32_frv_vec.
342 * reloc.c: Add FRV relocs.
343 * configure.in: Add support for bfd-elf32-frv-vec.
344 * config.bfd (targ_cpu): Add support for frv-*-elf.
345 * archures.c: Add frv arch and machines.
346 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
347 (ALL_MACHINES_CFILES): Add cpu-frv.c.
348 (BFD32_BACKENDS): Add elf32-frv.lo.
349 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
350 (cpu-frv.lo): New target.
351 (elf32-frv.lo): New target.
352 * cpu-frv.c: New file.
353 * elf32-frv.c: New file.
355 2002-06-18 Jakub Jelinek <jakub@redhat.com>
357 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
359 Only read the first section header if e_shoff is non-zero.
360 Don't consider e_shstrndx if there are no sections.
362 2002-06-17 Tom Rix <trix@redhat.com>
364 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
365 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
366 complain_overflow_bitfield.
368 2002-06-17 Alan Modra <amodra@bigpond.net.au>
370 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
371 (bfd_fdopenr): Likewise.
372 (bfd_openstreamr): Likewise.
373 (bfd_openw): Likewise.
375 * targets.c: Sort target vecs.
376 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
377 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
378 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
379 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
380 * configure.in: Sort target vecs. Add m88kmach3_vec.
381 * configure: Regenerate.
383 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
385 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
386 bpo_reloc_no to break sort order ties, not address of items.
388 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
390 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
391 Skip excluded sections in determing __gp value.
392 (elf_hppa_final_link_relocate): Use the symbol's address in
393 R_PARISC_FPTR64 relocations that don't need an opd entry.
394 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
395 (elf64_hppa_finalize_dynreloc): Likewise.
396 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
397 (elf64_hppa_finish_dynamic_symbol): Break up assert.
399 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
401 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
402 alignment for .bss, .data and .text sections so that sse and sse2
404 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
406 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
408 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
411 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
413 * elflink.h (elf_bfd_final_link): Improve error handling for missing
416 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
417 for a symbol that has no output section.
418 (allocate_dynrel_entries): Correct comment.
419 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
421 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
422 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
423 with no section. Remove unnecessary parentheses.
425 2002-06-11 Tom Rix <trix@redhat.com>
427 * coffcode.h (coff_compute_section_file_positions): Add data
428 section to AIX loader alignment check.
430 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
431 alignment to 4 bytes.
432 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
433 power accessor macro.
434 (do_shared_object_padding): Remove invalid assertion.
436 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
438 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
439 for removed output sections.
441 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
443 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
445 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
447 2002-06-08 H.J. Lu <hjl@gnu.org>
449 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
450 work around a long long bug in gcc 2.96 on mips.
452 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
454 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
455 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
456 Regenerate dependency lists.
457 * Makefile.in: Regenerate.
458 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
459 vax1knetbsd_vec to targ_selvecs.
460 * configure.in: Add vax1knetbsd_vec.
461 * configure: Regenerate.
462 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
463 * vax1knetbsd.c: New file.
464 * vaxnetbsd.c: Update copyright years.
465 (TARGET_PAGE_SIZE): Set to 0x1000.
466 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
468 2002-06-08 Matt Thomas <matt@3am-software.com>
470 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
472 2002-06-08 Alan Modra <amodra@bigpond.net.au>
474 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
476 2002-06-08 Alan Modra <amodra@bigpond.net.au>
478 * Makefile.am: Run "make dep-am".
479 * Makefile.in: Regenerate.
481 * armnetbsd.c: Replace CONST with const.
482 * corefile.c: Likewise.
483 * elf32-dlx.c: Likewise.
484 * elf64-mips.c: Likewise.
486 * ns32knetbsd.c: Likewise.
488 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
489 table is elf64-sparc.
491 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
493 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
494 Fix RELA addends to get not shifted in the result. Don't do special
495 handling of R_MIPS_64 for NewABI.
497 2002-06-07 Alan Modra <amodra@bigpond.net.au>
499 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
500 (NAME(aout,slurp_reloc_table)): Likewise.
501 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
502 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
503 (xcoff_write_archive_contents_big): Likewise.
504 (xcoff_generate_rtinit): Likewise.
505 (xcoff_generate_rtinit): Likewise, and check error return.
506 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
507 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
508 (coff_get_normalized_symtab): Likewise.
509 (coff_make_empty_symbol): Likewise.
510 (bfd_coff_set_symbol_class): Likewise.
511 * cofflink.c (coff_link_add_symbols): Likewise.
512 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
513 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
514 (bfd_ecoff_write_accumulated_debug): Likewise.
515 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
516 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
517 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
518 * ieee.c (do_with_relocs): Use bfd_zalloc.
519 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
520 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
521 (NAME(aout,slurp_reloc_table)): Likewise.
522 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
523 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
524 * som.c (som_build_and_write_symbol_table): Likewise.
525 (som_slurp_string_table): Likewise.
526 (som_slurp_symbol_table): Likewise.
527 (som_bfd_ar_write_symbol_stuff): Likewise.
528 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
529 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
530 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
531 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
532 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
534 2002-06-07 Alan Modra <amodra@bigpond.net.au>
536 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
538 (elf_group_name): Update.
539 (elf_group_id): Define.
540 (bfd_elf_set_group_contents): Declare.
541 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
542 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
543 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
544 that sym for the signature.
545 (_bfd_elf_compute_section_file_positions): Don't call
546 set_group_contents for "ld -r" case.
547 (swap_out_syms): Use bfd_zalloc.
548 * elflink.h (elf_link_add_archive_symbols): Likewise.
549 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
550 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
552 2002-06-07 Alan Modra <amodra@bigpond.net.au>
554 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
555 relocs in opd for non-shared too.
557 2002-06-06 Jeffrey Law <law@redhat.com
559 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
562 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
564 * merge.c: Include libiberty.h.
565 * elf-strtab.c: Include libiberty.h.
567 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
569 * peXXigen.c (pe_print_idata): Remove unused variable.
571 2002-06-06 David Heine <dlheine@tensilica.com>
573 * elf.c (assign_file_positions_for_segments): Remove unallocated
574 sections from the section to segment mapping for PT_LOAD segments.
575 Update comment about empty loadable segments.
577 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
579 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
580 is within the .stabstr section.
582 2002-06-06 Alan Modra <amodra@bigpond.net.au>
584 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
585 are "const PTR", not "const PTR *".
586 (bfd_elf32_swap_symbol_in): Likewise.
587 (bfd_elf64_swap_symbol_in): Likewise.
588 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
589 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
590 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
591 (elf_link_add_object_symbols): Likewise.
592 (elf_link_record_local_dynamic_symbol): Likewise.
593 (elf_link_input_bfd): Likewise.
594 (elf_gc_mark): Likewise.
595 (elf_reloc_symbol_deleted_p): Likewise.
596 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
597 (mn10200_elf_relax_delete_bytes): Likewise.
598 (mn10200_elf_symbol_address_p): Likewise.
599 (mn10200_elf_get_relocated_section_contents): Likewise.
600 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
601 (mn10300_elf_relax_section): Likewise.
602 (mn10300_elf_relax_delete_bytes): Likewise.
603 (mn10300_elf_symbol_address_p): Likewise.
604 (mn10300_elf_get_relocated_section_contents): Likewise.
605 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
606 (elf32_h8_relax_delete_bytes): Likewise.
607 (elf32_h8_symbol_address_p): Likewise.
608 (elf32_h8_get_relocated_section_contents): Likewise.
609 * elf32-hppa.c (get_local_syms): Likewise.
610 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
611 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
612 * elf32-sh.c (sh_elf_relax_section): Likewise.
613 (sh_elf_relax_delete_bytes): Likewise.
614 (sh_elf_get_relocated_section_contents): Likewise.
615 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
616 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
617 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
618 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
619 * elf64-ppc.c (get_local_syms): Likewise.
620 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
621 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
623 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
625 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
627 2002-06-05 Alan Modra <amodra@bigpond.net.au>
629 * elf.c (group_signature): Swap in the whole symbol, and handle
630 extracting section symbol names.
631 (setup_group): Add comment.
632 (set_group_contents): When called from objcopy or ld, arrange for
633 section contents to be written. Write group member output section
634 indices to allow objcopy to reorganize sections.
635 (_bfd_elf_copy_private_section_data): Copy group info.
637 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
638 (bfd_elf32_swap_symbol_in): Update prototype.
639 (bfd_elf64_swap_symbol_in): Likewise.
640 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
641 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
642 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
643 (elf_link_add_object_symbols): Likewise.
644 (elf_link_record_local_dynamic_symbol): Likewise.
645 (elf_link_input_bfd): Likewise.
646 (elf_gc_mark): Likewise.
647 (elf_reloc_symbol_deleted_p): Likewise.
648 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
649 (mn10200_elf_relax_delete_bytes): Likewise.
650 (mn10200_elf_symbol_address_p): Likewise.
651 (mn10200_elf_get_relocated_section_contents): Likewise.
652 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
653 (mn10300_elf_relax_section): Likewise.
654 (mn10300_elf_relax_delete_bytes): Likewise.
655 (mn10300_elf_symbol_address_p): Likewise.
656 (mn10300_elf_get_relocated_section_contents): Likewise.
657 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
658 (elf32_h8_relax_delete_bytes): Likewise.
659 (elf32_h8_symbol_address_p): Likewise.
660 (elf32_h8_get_relocated_section_contents): Likewise.
661 * elf32-hppa.c (get_local_syms): Likewise.
662 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
663 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
664 * elf32-sh.c (sh_elf_relax_section): Likewise.
665 (sh_elf_relax_delete_bytes): Likewise.
666 (sh_elf_get_relocated_section_contents): Likewise.
667 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
668 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
669 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
670 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
671 * elf64-ppc.c (get_local_syms): Likewise.
672 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
673 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
674 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
675 * elf64-alpha.c (alpha_elf_size_info): Likewise.
676 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
677 * elf64-mips.c (mips_elf64_size_info): Likewise.
678 * elf64-s390.c (s390_elf64_size_info): Likewise.
679 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
681 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
683 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
684 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
685 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
686 _bfd_mips_elf_ignore_discarded_relocs.
687 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
689 2002-06-05 H.J. Lu <hjl@gnu.org>
691 * elfxx-mips.c (mips_elf_calculate_relocation): Call
692 _bfd_elf_rel_local_sym for STT_SECTION relocations against
693 the SEC_MERGE section.
695 2002-06-05 Alan Modra <amodra@bigpond.net.au>
697 * coff-alpha.c: Update copyright date.
698 * coff-mips.c: Likewise.
699 * xcoff-target.h: Likewise.
701 * bfd-in.h: Remove "taken from the source" comment.
702 * libbfd-in.h: Likewise.
703 * libcoff-in.h: Likewise.
704 * bfd-in2.h: Regenerate.
705 * libbfd.h: Regenerate.
706 * libcoff.h: Regenerate.
708 * elf.c (bfd_elf_discard_group): Return true.
709 * elf-bfd.h (bfd_elf_discard_group): Declare.
710 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
711 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
712 * bfd.c (bfd_discard_group): Define.
713 * targets.c (struct bfd_target): Add _bfd_discard_group.
714 (BFD_JUMP_TABLE_LINK): Here too.
715 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
716 * aout-adobe.c (aout_32_bfd_discard_group): Define.
717 * aout-target.h (MY_bfd_discard_group): Define.
718 * aout-tic30.c (MY_bfd_discard_group): Define.
719 * binary.c (binary_bfd_discard_group): Define.
720 * bout.c (b_out_bfd_discard_group): Define.
721 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
722 * coffcode.h (coff_bfd_discard_group): Define.
723 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
724 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
725 * i386msdos.c (msdos_bfd_discard_group): Define.
726 * i386os9k.c (os9k_bfd_discard_group): Define.
727 * ieee.c (ieee_bfd_discard_group): Define.
728 * ihex.c (ihex_bfd_discard_group): Define.
729 * mmo.c (mmo_bfd_discard_group): Define.
730 * nlm-target.h (nlm_bfd_discard_group): Define.
731 * oasys.c (oasys_bfd_discard_group): Define.
732 * ppcboot.c (ppcboot_bfd_discard_group): Define.
733 * som.c (som_bfd_discard_group): Define.
734 * srec.c (srec_bfd_discard_group): Define.
735 * tekhex.c (tekhex_bfd_discard_group): Define.
736 * versados.c (versados_bfd_discard_group): Define.
737 * vms.c (vms_bfd_discard_group): Define.
738 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
739 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
740 (aix5coff64_vec): Likewise.
741 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
743 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
745 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
746 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
747 (elf32-sh64-com.lo): New dependency list.
748 * Makefile.in: Regenerate.
749 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
750 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
752 * configure: Regenerate.
753 * elf32-sh64.c (sh64_address_in_cranges)
754 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
755 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
756 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
757 * elf32-sh64-com.c: ...here. New file.
759 2002-06-04 Alan Modra <amodra@bigpond.net.au>
761 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
762 ATTRIBUTE_UNUSED on used params.
763 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
764 before calling bfd_section_from_elf_index on local syms.
765 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
767 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
769 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
770 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
771 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
772 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
773 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
774 * Makefile.in: Regenerate.
775 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
776 (sh64-*-netbsd*): New targets.
777 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
778 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
779 * configure: Regenerate.
780 * elf32-sh64-nbsd.c: New file.
781 * elf64-sh64-nbsd.c: New file.
782 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
783 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
784 bfd_elf64_sh64lnbsd_vec.
786 2002-06-04 Alan Modra <amodra@bigpond.net.au>
788 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
789 (bfd_section_from_shdr): Likewise. Set section name of group
790 sections from signature.
791 (group_signature): Split out from setup_group. Ensure symbol table
793 (bfd_elf_discard_group): New function.
794 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
795 .gnu.linkonce* sections if they are members of a group.
796 (set_group_contents): Set GRP_COMDAT flag.
797 * section.c (bfd_discard_group): New function.
798 * bfd-in.h (bfd_elf_discard_group): Declare.
799 * bfd-in2.h: Regenerate.
800 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
801 (elf_linkonce_p): Define.
803 2002-06-04 Alan Modra <amodra@bigpond.net.au>
805 * elf.c (bfd_section_from_shdr): Make "name" const.
806 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
807 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
808 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
809 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
810 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
811 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
812 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
813 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
814 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
815 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
816 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
818 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
820 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
823 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
825 * elf32-arc.c: Fix formatting.
826 * elf32-arm.h: Likewise.
827 * elf32-cris.c: Likewise.
828 * elf32-dlx.c: Likewise.
829 * elf32-hppa.c: Likewise.
830 * elf32-i386.c: Likewise.
831 * elf32-i386qnx.c: Likewise.
832 * elf32-or32.c: Likewise.
833 * elf32-s390.c: Likewise.
834 * elf32-sh64.c: Likewise.
835 * elf32-vax.c: Likewise.
836 * elf32-xstormy16.c: Likewise.
837 * elf64-alpha.c: Likewise.
838 * elf64-mmix.c: Likewise.
839 * elf64-ppc.c: Likewise.
840 * elf64-s390.c: Likewise.
841 * elf64-sh64.c: Likewise.
842 * elf64-x86-64.c: Likewise.
844 2002-06-02 Richard Henderson <rth@redhat.com>
846 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
847 null when there are no got entries for a symbol.
848 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
849 uninitialized variable warning.
851 2002-06-01 Richard Henderson <rth@redhat.com>
853 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
854 undefined symbols here.
855 (elf64_alpha_relax_section): Do it here. Also test for not
856 defined in the current module.
857 (elf64_alpha_relocate_section_r): Split out of ...
858 (elf64_alpha_relocate_section): ... here. Don't dereference
859 NULL when looking up local got entries.
861 2002-06-01 Richard Henderson <rth@redhat.com>
863 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
864 symbols from JSR relaxation.
865 (elf64_alpha_size_plt_section_1): New.
866 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
867 (elf64_alpha_size_rela_got_1): ... here.
868 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
869 (elf64_alpha_size_rela_got_section): ... here.
870 (elf64_alpha_size_plt_section): New.
871 (elf64_alpha_relax_section): Call them.
872 (elf64_alpha_size_got_sections): Remove output_bfd arg.
873 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
875 2002-06-01 Richard Henderson <rth@redhat.com>
877 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
878 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
879 in shared libraries. Fix DTPRELHI and TPRELHI value.
880 (INSN_ADDQ, INSN_RDUNIQ): New.
881 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
882 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
883 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
884 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
885 Handle GOTDTPREL and GOTTPREL relocations.
886 (elf64_alpha_relax_gprelhilo): New.
887 (elf64_alpha_relax_tls_get_addr): New.
888 (elf64_alpha_relax_find_tls_segment): New.
889 (elf64_alpha_relax_section): Handle TLS relocations.
890 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
891 (elf64_alpha_check_relocs): Set it.
893 2002-06-01 Richard Henderson <rth@redhat.com>
895 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
897 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
898 check; don't suppress dynamic relocs for non-allocated sections.
900 * elf64-alpha.c: Remove dead code.
902 2002-05-31 Alan Modra <amodra@bigpond.net.au>
904 * bfd-in2.h: Regenerate.
905 * libbfd.h: Regenerate.
906 * po/SRC-POTFILES.in: Regenerate.
908 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
911 2002-05-31 Graeme Peterson <gp@qnx.com>
913 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
914 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
916 * Makefile.in: Regenerate.
917 * config.bfd: Add i[3456]86-*-nto-qnx* support.
918 * configure.in: Add bfd_elf32_i386qnx_vec support.
919 * configure: Regenerate.
920 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
921 is_contained_by_filepos, and copy_private_bfd_data_p.
922 * elf.c (assign_file_positions_for_segments): Call backend
923 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
924 (IS_CONTAINED_BY_FILEPOS): Define.
925 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
926 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
927 Fix non-K&R call to _bfd_error_handler.
928 (_bfd_elf_copy_private_section_data): Use backend
929 copy_private_bfd_data_p.
930 * elf32-i386.c: Don't include elfxx-target.h when
931 ELF32_I386_C_INCLUDED is defined.
932 * elf32-i386qnx.c: New QNX elf backend file.
933 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
934 elf_backend_is_contained_by_filepos, and
935 elf_backend_do_copy_private_bfd_data.
936 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
938 2002-05-31 Alan Modra <amodra@bigpond.net.au>
940 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
941 Move other similar defines to start of file.
943 2002-05-30 Tom Rix <trix@redhat.com>
945 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
946 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
948 2002-05-30 Richard Henderson <rth@redhat.com>
950 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
951 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
952 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
953 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
954 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
955 (struct alpha_elf_obj_tdata): Rename total_got_entries and
956 n_local_got_entries to total_got_size and local_got_size.
957 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
958 (alpha_got_entry_size): New.
959 (elf64_alpha_relax_with_lituse): Use it.
960 (elf64_alpha_relax_without_lituse): Likewise.
961 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
962 (get_got_entry): New.
963 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
964 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
965 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
966 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
967 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
968 (elf64_alpha_calc_got_offsets): Likewise.
969 (alpha_dynamic_entries_for_reloc): New.
970 (elf64_alpha_calc_dynrel_sizes): Use it.
971 (elf64_alpha_size_dynamic_sections): Likewise.
972 (elf64_alpha_relocate_section): Handle TLS relocations.
973 * reloc.c: Add Alpha TLS relocations.
974 * bfd-in2.h, libbfd.h: Rebuild.
976 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
978 * peXXigen.c (pe_print_idata): Remove double printed
979 import table lines; add Bound-To comment.
981 2002-05-29 Matt Thomas <matt@3am-software.com>
983 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
984 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
985 (elf32-vax.lo): New rule.
986 * Makefile.in: Regenerate.
987 * configure.in (bfd_elf32_vax_vec)
988 (vaxnetbsd_vec): New vectors.
989 * configure: Regenerate.
990 * config.bfd (vax-*-netbsdelf*)
992 (vax-*-netbsd*): New targets.
993 * elf32-vax.c: New file.
994 * reloc.c: Add VAX relocations.
995 * bfd-in2.h: Regenerate.
996 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
998 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
1000 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1001 and bfd_elf32_bigarm_vec to targ_selvecs.
1003 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1005 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1006 with auto-imported symbols.
1008 2002-05-29 Adam Nemet <anemet@lnxw.com>
1010 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1011 sections only record bfd.
1012 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
1013 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
1014 * bfd-in2.h: Regenerate.
1016 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
1018 * syms.c (_bfd_stab_section_find_nearest_line): Move
1019 declaration and initialisation of saw_line and saw_func out of
1022 2002-05-29 Alan Modra <amodra@bigpond.net.au>
1024 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1025 (bfd_elf64_get_symbol_info): Define.
1026 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1028 2002-05-29 Andrey Volkov <avolkov@transas.com>
1030 * cpu-h8300.c: Make default h8300 machine first in machine list.
1032 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
1034 * config.bfd: Added DLX configuraton.
1035 * Makefile.am: Added DLX configuraton.
1036 * configure.in: Added DLX configuraton.
1037 * archures.c: Add DLX architecure.
1038 * reloc.c: Add DLX relocs.
1039 * targets.c: Added DLX target vector.
1040 * configure: Regenerate.
1041 * Makefile.in: Regenreate.
1042 * bfd-in2.h: Regenreate.
1043 * elf32-dlx.c: New file: Support DLX target.
1044 * cpu-dlx.c: New file: Support DLX target.
1046 2002-05-25 Alan Modra <amodra@bigpond.net.au>
1048 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
1050 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
1051 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
1052 strings to point inside function code sym string.
1053 (func_desc_adjust): Likewise.
1054 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
1056 2002-05-24 Michal Ludvig <mludvig@suse.cz>
1058 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
1059 (elf64_x86_64_grok_psinfo): Added.
1061 2002-05-24 TAMURA Kent <kent@netbsd.org>
1063 * config.bfd: Add a target for i386-netbsdpe.
1065 2002-05-24 Alan Modra <amodra@bigpond.net.au>
1067 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
1068 and is_func_descriptor.
1069 (func_desc_adjust): Hide function code sym in shared libs unless
1070 there is a matching exported function descriptor sym.
1072 2002-05-23 Jakub Jelinek <jakub@redhat.com>
1074 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1075 for symbols from SHF_TLS section.
1076 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1077 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1078 (map_sections_to_segments): Build PT_TLS segment if necessary.
1079 (assign_file_positions_for_segments): Likewise.
1080 (get_program_header_size): Account for PT_TLS segment.
1081 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1082 SEC_THREAD_LOCAL sections to STT_TLS.
1083 * reloc.c: Add 386 and IA-64 TLS relocs.
1084 * section.c (SEC_THREAD_LOCAL): Define.
1085 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1087 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1088 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1090 (struct elf_final_link_info): Add first_tls_sec.
1091 (elf_bfd_final_link): Set first_tls_sec.
1092 Compute elf_hash_table (info)->tls_segment.
1093 (elf_link_output_extsym): Handle STT_TLS symbols.
1094 (elf_link_input_bfd): Likewise.
1095 * syms.c (BSF_THREAD_LOCAL): Define.
1096 * bfd-in2.h: Rebuilt.
1097 * libbfd.h: Rebuilt.
1098 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1099 elf_i386_mkobject, elf_i386_object_p): New functions.
1100 (elf_howto_table): Add TLS relocs.
1101 (elf_i386_reloc_type_lookup): Support TLS relocs.
1102 (elf_i386_info_to_howto_rel): Likewise.
1103 (struct elf_i386_link_hash_entry): Add tls_type.
1104 (struct elf_i386_obj_tdata): New.
1105 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1107 (struct elf_i386_link_hash_table): Add tls_ldm_got.
1108 (link_hash_newfunc): Clear tls_type.
1109 (elf_i386_check_relocs): Support TLS relocs.
1110 (elf_i386_gc_sweep_hook): Likewise.
1111 (allocate_dynrelocs): Likewise.
1112 (elf_i386_size_dynamic_sections): Likewise.
1113 (elf_i386_relocate_section): Likewise.
1114 (elf_i386_finish_dynamic_symbol): Likewise.
1115 (bfd_elf32_mkobject, elf_backend_object_p): Define.
1116 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1117 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1118 want_tprel, want_dtpmod, want_dtprel.
1119 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1120 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1121 R_IA64_LTOFF_TPREL22.
1122 (elf_code_to_howto_index): Add TLS relocs.
1123 (elfNN_ia64_check_relocs): Support TLS relocs.
1124 (allocate_global_data_got): Account for TLS .got data.
1125 (allocate_dynrel_entries): Account for TLS dynamic relocations.
1126 (elfNN_ia64_install_value): Supprt TLS relocs.
1127 (set_got_entry): Support TLS relocs.
1128 (elfNN_ia64_relocate_section): Likewise.
1130 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
1132 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1133 BLX reloc round the relocation up rather than down.
1134 * coff-arm.c (coff_arm_relocate_section): Likewise.
1136 2002-05-21 H.J. Lu (hjl@gnu.org)
1138 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1141 2002-05-22 Alan Modra <amodra@bigpond.net.au>
1143 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1144 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1146 2002-05-22 Alan Modra <amodra@bigpond.net.au>
1148 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1150 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1152 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1154 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1157 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1159 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1161 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1162 return with false on error.
1163 (elf_link_input_bfd): Check reloc_emitter return value.
1165 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1167 * config.bfd (armeb-*-netbsdelf*): New target.
1169 2002-05-20 Alan Modra <amodra@bigpond.net.au>
1171 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1172 at the plt call stub.
1174 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1176 * cpu-mips.c (mips_compatible): Don't try to check machine
1179 2002-05-18 Tom Rix <trix@redhat.com>
1181 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1183 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1185 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1186 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1187 we've already warned about an undefined symbol. Report more
1188 detail on reloc errors.
1190 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1192 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1193 * configure.in: Invoke AM_INSTALL_LIBBFD.
1194 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1195 (install_libbfd): .. New target.
1196 (uninstall_libbfd): Likewise.
1197 (install-bfdlibLTLIBRARIES): Likewise.
1198 (uninstall-bfdlibLTLIBRARIES): Likewise.
1200 (bfdincludedir): New.
1201 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1202 * aclocal.m4: Regenerate.
1203 * configure: Regenerate.
1204 * Makefile.in: Regenerate.
1206 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
1208 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1211 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1213 * config.bfd: Add targets for sh64-linux (little endian and
1216 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1218 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1219 is located in the same section as the import table. Instead
1220 check, and if necessary load the section containing the thunk.
1222 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1224 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
1226 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1229 2002-05-15 Alan Modra <amodra@bigpond.net.au>
1231 * aix5ppc-core.c: Warning fixes.
1232 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1233 * aout-target.h (MY_bfd_link_just_syms): Define.
1234 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1235 * bfd.c (bfd_link_just_syms): Define.
1236 * binary.c (binary_bfd_link_just_syms): Define.
1237 * bout.c (b_out_bfd_link_just_syms): Define.
1238 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1239 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1240 * coffcode.h (coff_bfd_link_just_syms): Define.
1241 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1242 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1243 (_bfd_elf_link_just_syms): Declare.
1244 * elf.c (_bfd_elf_link_just_syms): New function.
1245 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1246 sections haven't already been discarded by the linker.
1247 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1248 sections and SEC_MERGE sections.
1249 (elf_bfd_discard_info): Similarly here.
1250 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1251 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1252 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1253 * ieee.c (ieee_bfd_link_just_syms): Define.
1254 * ihex.c (ihex_bfd_link_just_syms): Define.
1255 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1256 (_bfd_generic_link_just_syms): Declare.
1257 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1258 * linker.c (_bfd_generic_link_just_syms): New function.
1259 * mmo.c (mmo_bfd_link_just_syms): Define.
1260 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1261 * oasys.c (oasys_bfd_link_just_syms): Define.
1262 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1263 * som.c (som_bfd_link_just_syms): Define.
1264 * srec.c (srec_bfd_link_just_syms): Define.
1265 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1266 (BFD_JUMP_TABLE_LINK): And here.
1267 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1268 * versados.c (versados_bfd_link_just_syms): Define.
1269 * vms.c (vms_bfd_link_just_syms): Define.
1270 * libbfd.h: Regenerate.
1271 * bfd-in2.h: Regenerate.
1273 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1275 * elf32-mips.c: Remove superfluous definitions copied from
1277 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1278 SGIish vectors to check the special case.
1279 (mips_elf_hi16_reloc): Fix comment.
1280 (mips_elf_got16_reloc): Likewise.
1281 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1282 (elf_reloc_map): Code cleanup.
1283 (mips_reloc_map): Add comment.
1284 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1285 (mips_elf32_rtype_to_howto): Likewise.
1286 (mips_elf32_discard_info): Likewise.
1287 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1288 lead to IRIX compatibility now.
1290 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1292 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1294 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1296 * config.bfd (shle-*-netbsdelf*): Add target which includes
1299 2002-05-13 David Edelsohn <edelsohn@gnu.org>
1301 * configure.in: Revert 2002-04-07. Instead, auto-configure
1303 * configure: Regenerate.
1304 * config.in: Regenerate.
1305 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1308 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1310 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1312 * configure: Regenerate.
1314 2002-05-13 Alan Modra <amodra@bigpond.net.au>
1316 * Makefile.am (install-data-local): Install headers to
1317 $(exec_prefix)/include.
1318 * Makefile.in: Regenerate.
1320 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1321 Daniel Jacobowitz <drow@mvista.com>
1323 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1326 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1328 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1329 hppa*-*-openbsd*): New targets.
1330 * configure.in (alpha*-*-openbsd*): Set COREFILE.
1331 * configure: Regenerate.
1333 2002-05-10 Tom Rix <trix@redhat.com>
1335 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
1336 xcoff64_ppc_relocate_section.
1337 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1338 * libxcoff.h: Common xcoff_reloc_type function declaration.
1340 2002-05-10 Alan Modra <amodra@bigpond.net.au>
1342 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
1343 added in 2002-05-09 commit.
1345 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1346 don't look for stubs on all undefined syms.
1348 2002-05-09 Alan Modra <amodra@bigpond.net.au>
1350 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1351 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1354 * elf32-i386.c (elf_howto_table): Comments.
1355 (elf_i386_relocate_section): Handle more relocs for relocatable
1356 linking and against SEC_MERGE sections.
1358 2002-05-08 Alan Modra <amodra@bigpond.net.au>
1360 * elf32-ppc.c (ppc_elf_create_got): New function.
1361 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
1362 _bfd_elf_create_dynamic_sections. Correct .plt flags.
1363 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1364 _bfd_elf_create_got_section.
1366 2002-05-07 Alan Modra <amodra@bigpond.net.au>
1368 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1369 * elfxx-target.h (elf_backend_rela_normal): Define.
1370 (elfNN_bed): Init rela_normal.
1371 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1372 for section symbols here if rela_normal. Simplify abs section test.
1373 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1374 return immediately. Remove code handling relocatable linking.
1375 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1376 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1377 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1378 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1379 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1380 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1381 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1382 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1383 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1384 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1385 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1386 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1387 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1388 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1389 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1390 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1391 * elf-m10200.c (elf_backend_rela_normal): Define.
1392 * elf-m10300.c (elf_backend_rela_normal): Define.
1393 * elf32-fr30.c (elf_backend_rela_normal): Define.
1394 * elf32-i370.c (elf_backend_rela_normal): Define.
1395 * elf32-i860.c (elf_backend_rela_normal): Define.
1396 * elf32-m68k.c (elf_backend_rela_normal): Define.
1397 * elf32-mcore.c (elf_backend_rela_normal): Define.
1398 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1399 * elf32-ppc.c (elf_backend_rela_normal): Define.
1400 * elf32-s390.c (elf_backend_rela_normal): Define.
1401 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1402 * elf64-ppc.c (elf_backend_rela_normal): Define.
1403 * elf64-s390.c (elf_backend_rela_normal): Define.
1404 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1405 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1406 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1407 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1409 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1411 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1412 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1414 2002-05-06 Alan Modra <amodra@bigpond.net.au>
1416 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1417 when not relocatable. Fix reloc_emitter call for K&R.
1419 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1421 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1422 reloading local sym addend mistakenly removed in 2002-05-01 change.
1424 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1425 (read_abbrevs): Change "offset" param to bfd_vma.
1426 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1427 Change "abbrev_offset" to bfd_vma.
1428 (read_indirect_string): Use correct conversion chars in error
1429 message format string, cast bfd_vma's to unsigned long.
1430 (read_abbrevs): Likewise.
1431 (read_attribute_value): Likewise.
1432 (decode_line_info): Likewise.
1433 (scan_unit_for_functions): Likewise.
1434 (parse_comp_unit): Likewise.
1436 2002-05-04 Tom Rix <trix@redhat.com>
1438 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1439 (coff_swap_reloc_out): Same.
1440 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1441 (xcoff_swap_reloc_out): Same.
1442 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1443 case some 16 bit relocs. Add reloc value to output.
1444 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
1445 R_RBR. Improve names.
1446 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1447 (bfd_xcoff_backend_data): Update with new reloc swap names.
1448 (bfd_pmac_xcoff_backend_data) : Same.
1449 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1450 (xcoff64_swap_reloc_out): Same.
1451 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
1452 R_POS. Add reloc value to output.
1453 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1454 bit R_RBR. Improve names, masks.
1455 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1456 (bfd_xcoff_backend_data): Update with new reloc swap names.
1457 (bfd_xcoff_aix5_backend_data) : Same.
1459 2002-05-04 Alan Modra <amodra@bigpond.net.au>
1461 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1462 bfd_count top_index, input_list, all_local_syms.
1463 (elf32_hppa_setup_section_lists): New function, split from
1464 elf32_hppa_size_stubs.
1465 (elf32_hppa_next_input_section): Likewise.
1466 (group_sections): Likewise.
1467 (get_local_syms): Likewise.
1468 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1469 stubs on undefined syms too.
1470 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
1471 Only access htab elf fields when we have an elf hash table.
1472 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1473 (elf32_hppa_next_input_section): Declare.
1475 2002-05-04 Bob Byrnes <byrnes@curl.com>
1477 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1480 2002-05-03 H.J. Lu (hjl@gnu.org)
1482 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1483 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1484 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1485 to hide a global symbol.
1486 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
1487 forced_local to true.
1489 2002-05-02 Richard Henderson <rth@redhat.com>
1491 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1492 vs SHN_UNDEF to zero.
1494 2002-05-02 Alan Modra <amodra@bigpond.net.au>
1496 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1498 <R_PPC64_SECTOFF_DS>: Likewise.
1499 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1501 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1502 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1505 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1506 (ppc64_elf_ha_reloc): New function.
1507 (ppc64_elf_brtaken_reloc): New function.
1508 (ppc64_elf_sectoff_reloc): New function.
1509 (ppc64_elf_sectoff_ha_reloc): New function.
1510 (ppc64_elf_toc_reloc): New function.
1511 (ppc64_elf_toc_ha_reloc): New function.
1512 (ppc64_elf_toc64_reloc): New function.
1513 (ppc64_elf_unhandled_reloc): New function.
1514 (ppc64_elf_howto_raw): Use the above.
1515 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1516 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1517 <R_PPC64_SECTOFF_DS>: Likewise.
1518 (IS_ABSOLUTE_RELOC): Update.
1519 (struct ppc_link_hash_table): Add have_undefweak.
1520 (ppc64_elf_link_hash_table_create): Init.
1521 (func_desc_adjust): Set have_undefweak.
1522 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1523 add the .sfpr blr when have_undefweak.
1524 (ppc64_elf_setup_section_lists): Check hash table flavour.
1525 (ppc64_elf_next_input_section): Move output_section->owner test to
1527 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1528 and relocatable test. Return TOCstart and don't set elf_gp.
1529 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1530 offset calculation. Add assert on weak sym branch tweaks.
1531 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1532 (ppc64_elf_toc): Declare.
1533 (ppc64_elf_next_input_section): Update.
1535 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1537 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1540 2002-05-01 Alan Modra <amodra@bigpond.net.au>
1542 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1543 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1544 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1545 call branches. Correct undefined weak destination.
1546 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1547 .sfpr, and correct case where either only savef* or restf* is
1550 Long branch stubs, multiple stub sections.
1551 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1552 (ppc64_elf_next_input_section): Declare.
1553 * elf64-ppc.c: Move linker-only prototypes.
1554 (STUB_SUFFIX): Define.
1555 (enum ppc_stub_type): New.
1556 (struct ppc_stub_hash_entry): New.
1557 (struct ppc_branch_hash_entry): New.
1558 (struct ppc_link_hash_entry): Add stub_cache, oh.
1559 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1560 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1561 Rename plt_overflow to stub_error.
1562 (ppc_stub_hash_lookup): Define.
1563 (ppc_branch_hash_lookup): Define.
1564 (stub_hash_newfunc): New function.
1565 (branch_hash_newfunc): New function.
1566 (link_hash_newfunc): Init new fields.
1567 (ppc64_elf_link_hash_table_create): Likewise.
1568 (ppc64_elf_link_hash_table_free): New function.
1569 (ppc_stub_name): New function.
1570 (ppc_get_stub_entry): New function.
1571 (ppc_add_stub): New function.
1572 (create_linkage_sections): Use bfd_make_section_anyway. Create
1573 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1574 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1575 and set up for plt call stubs. Link func and func desc syms.
1576 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1577 (func_desc_adjust): Avoid hash lookup when func desc sym available
1578 via shortcut, and set links when processing.
1579 (ppc64_elf_hide_symbol): Likewise.
1580 (allocate_dynrelocs): Don't allocate stub section here.
1581 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1583 (ppc_type_of_stub): New function.
1584 (build_one_stub): Delete.
1585 (ppc_build_one_stub): New function.
1586 (ppc_size_one_stub): New function.
1587 (ppc64_elf_setup_section_lists): New function.
1588 (ppc64_elf_next_input_section): New function.
1589 (group_sections): New function.
1590 (get_local_syms): New function.
1591 (ppc64_elf_size_stubs): Rewrite.
1592 (ppc64_elf_build_stubs): Rewrite.
1593 (ppc64_elf_relocate_section): Look up stub entry for REL24
1594 relocs. Don't propagate REL14* to dynamic objects. Look for long
1595 branch stubs if REL14* or REL24 relocs won't reach.
1596 (bfd_elf64_bfd_link_hash_table_free): Define.
1598 2002-04-30 Mark Mitchell <mark@codesourcery.com>
1600 * bfd/config.bfd: Add support for powerpc-*-windiss.
1602 2002-04-30 Tom Rix <trix@redhat.com>
1604 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1605 symbol names into the hash table.
1607 2002-04-28 Tom Rix <trix@redhat.com>
1609 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
1610 calulating relocations.
1611 (xcoff_complain_overflow) : Function table for relocation errors.
1612 (xcoff_ppc_relocate_section): Use relocation and complain function
1614 (xcoff_complain_overflow_unsigned_func): New complain function.
1615 (xcoff_complain_overflow_signed_func): Same.
1616 (xcoff_complain_overflow_bitfield_func): Same.
1617 (xcoff_complain_overflow_dont_func): Same.
1618 (xcoff_reloc_type_crel): New recot function.
1619 (xcoff_reloc_type_br): Same.
1620 (xcoff_reloc_type_ba): Same.
1621 (xcoff_reloc_type_toc): Same.
1622 (xcoff_reloc_type_rel): Same.
1623 (xcoff_reloc_type_neg): Same.
1624 (xcoff_reloc_type_pos): Same.
1625 (xcoff_reloc_type_fail): Same.
1626 (xcoff_reloc_type_noop): Same.
1627 * libxcoff.h : Declare common parts for xcoff64.
1628 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
1629 and complain function tables.
1631 2002-04-28 Alan Modra <amodra@bigpond.net.au>
1633 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1634 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1636 2002-04-26 Alan Modra <amodra@bigpond.net.au>
1638 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1639 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1641 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1642 same as the output before calling elf_link_input_bfd.
1644 * coffcode.h (coff_compute_section_file_positions): Set
1645 section_tail after shuffling section list.
1647 2002-04-24 Christian Groessler <chris@groessler.org>
1649 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1650 addresses are 23bit with a special layout, not plain 32bit
1651 values. Prevent relocation of immediate values.
1653 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
1655 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1656 MIPS-16 ASE flags are set, print something to indicate that.
1658 2002-04-23 Alan Modra <amodra@bigpond.net.au>
1660 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1661 under which a plt call stub is used.
1662 (final_link_relocate): Similarly.
1663 (allocate_plt_static): Clear h-plabel except when plt entry is
1664 exclusively used for a plabel.
1665 (allocate_dynrelocs): Use the above to simplify plt sizing.
1666 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1667 (elf32_hppa_link_hash_table_create): Init.
1669 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1670 (elf32_hppa_check_relocs): Set has_22bit_branch.
1672 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1673 (final_link_relocate): Likewise.
1675 2002-04-22 Jakub Jelinek <jakub@redhat.com>
1677 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1678 search table if some FDE is DW_EH_PE_aligned encoded either.
1679 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1681 2002-04-22 Richard Smith <richard@ex-parrot.com>
1682 Jakub Jelinek <jakub@redhat.com>
1684 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1685 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1686 encoded personality.
1687 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1688 for CIE/FDE removal.
1690 2002-04-20 Tom Rix <trix@redhat.com>
1692 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1694 2002-04-20 Alan Modra <amodra@bigpond.net.au>
1696 * archures.c (bfd_lookup_arch): Move the list order comment..
1697 (struct bfd_arch_info): ..to where it belongs.
1698 * bfd-in2.h: Regenerate.
1700 * archures.c (bfd_lookup_arch): Add comment on list order.
1701 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1702 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1703 is always at head of list.
1705 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1707 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1708 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1709 definition of these functions for ARM_WINCE builds as they are
1711 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
1712 for ARM_WINCE builds.
1714 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1716 * coff-arm.c (bfd_arm_process_before_allocation):
1718 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
1720 * cpu-sh.c (scan_mach): Delete.
1721 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1722 (bfd_sh_arch): Likewise.
1724 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1726 * ihex.c (ihex_write_object_contents): Fix check for records
1727 crossing 64K boundaries.
1729 2002-04-16 Alan Modra <amodra@bigpond.net.au>
1731 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1732 type rather than just assuming entries are ELF.
1733 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1734 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1735 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1736 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1737 rather than elf_link_hash_entry.
1739 2002-04-15 Richard Henderson <rth@redhat.com>
1741 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1744 2002-04-15 Michael Snyder <msnyder@redhat.com>
1746 * opncls.c (bfd_close): Write contents if writeable.
1747 Minor formatting tidy-ups.
1749 2002-04-15 Alan Modra <amodra@bigpond.net.au>
1751 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1753 2002-04-12 Michael Snyder <msnyder@redhat.com>
1755 * bfd-in.h (bfd_get_section_lma): New access macro.
1756 Minor white-space fix-up.
1758 2002-04-12 Alan Modra <amodra@bigpond.net.au>
1760 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1763 2002-04-09 DJ Delorie <dj@redhat.com>
1765 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1767 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1769 * coffcode.h (coff_read_word): New.
1770 (coff_compute_checksum): New.
1771 (coff_apply_checksum): New.
1772 (coff_write_object_contents): Call coff_apply_checksum () to
1773 apply checksum to PE image.
1775 2002-04-08 Randolph Chung <tausq@debian.org>
1777 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1778 (elf32_hppa_final_link): Split out sorting logic to..
1779 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1780 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1782 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1784 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1786 * configure: Re-generate.
1788 2002-04-07 Andrew Cagney <ac131313@redhat.com>
1790 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1791 is greater or equal to 4.3.3.
1792 * configure: Regenerate.
1795 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
1797 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1798 R_CRIS_32_PCREL>: Fix typo in name.
1799 (cris_elf_check_relocs): Always create .rela.got here when
1800 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1801 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1802 assume it's created.
1804 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
1806 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1807 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1809 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1810 * bfd.c (bfd_link_hash_table_free): Define.
1811 * binary.c (binary_bfd_link_hash_table_free): Define.
1812 * bout.c (b_out_bfd_link_hash_table_free): Define.
1813 * coff-rs6000.c (rs6000coff_vec): Include
1814 _bfd_generic_link_hash_table_free.
1815 (pmac_xcoff_vec): Likewise.
1816 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1817 (aix5coff64_vec): Likewise.
1818 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1819 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1820 (bfd_elf32_bfd_link_hash_table_free): Define.
1821 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1822 (bfd_elf32_bfd_link_hash_table_free): Define.
1823 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1825 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1826 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1827 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1828 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1829 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1830 (_bfd_generic_link_hash_table_free): Add prototype.
1831 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1832 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1833 * linker.c (_bfd_generic_link_hash_table_free): New function.
1834 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1835 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1836 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1837 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1838 * som.c (som_bfd_link_hash_table_free): Define.
1839 * srec.c (srec_bfd_link_hash_table_free): Define.
1840 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1841 * versados.c (versados_bfd_link_hash_table_free): Define.
1842 * vms.c (vms_bfd_link_hash_table_free): New function.
1843 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1845 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1846 instead of bfd_alloc.
1847 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1848 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1849 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1850 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1851 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1852 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1853 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1854 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1855 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1856 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1857 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1858 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1859 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1860 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1861 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1862 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1863 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1864 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1865 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1866 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1867 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1868 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1869 * m68klinux.c (linux_link_hash_table_create): Likewise.
1870 * sparclinux.c (linux_link_hash_table_create): Likewise.
1871 * sunos.c (sunos_link_hash_table_create): Likewise.
1872 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1874 * targets.c: Add _bfd_link_hash_table_free to xvec.
1876 * bfd-in2.h: Regenerate.
1877 * libbfd.h: Regenerate.
1878 * libcoff.h: Regenerate.
1880 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1882 * dep-in.sed: Cope with absolute paths.
1883 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1885 * Makefile.in: Regenerate.
1886 * coff-arm.c: Fix copyright date.
1887 * cpu-h8300.c: Likewise.
1888 * cpu-i370.c: Likewise.
1889 * cpu-s390.c: Likewise.
1890 * cpu-mips.c: Likewise.
1891 * po/SRC-POTFILES.in: Regenerate.
1893 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1895 * Makefile.am: Add elfxx-mips.c to the known backends.
1896 (elf32-mips.lo): remove dependency to coff/external.h.
1897 * Makefile.in: Regenerate.
1898 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1899 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1901 * configure: Regenerate.
1902 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1903 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1904 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1905 MIPS specific backend functions.
1906 * elf32-mips.c: Moved most code to elfxx-mips.c.
1907 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1909 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1910 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1911 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1912 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1913 interface to allow selection of the right REL or RELA howto table.
1914 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1915 static. Let it refuse n32 objects.
1916 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1917 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1918 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1919 (elf32_mips_ignore_discarded_relocs): Rename from
1920 _bfd_elf32_mips_ignore_discarded_relocs.
1921 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1922 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1923 (elf_mips_howto_table_rela): Remove.
1924 * elf64-mips.c: Moved most code to elfxx-mips.c.
1925 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1926 (mips_elf64_rtype_to_howto): New function.
1927 (mips_elf64_object_p): Likewise.
1928 (elf64_mips_irix_compat): Likewise.
1929 * elfxx-mips.c: New file containing common code merged together from
1930 elf32-mips.c and elf64-mips.c.
1931 * elfxx-mips.h: New file containing MIPS specific prototypes from
1933 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1934 elf_backend_mips_rtype_to_howto.
1936 2002-04-04 Alan Modra <amodra@bigpond.net.au>
1938 * srec.c (MAXCHUNK, Chunk): Revise comments.
1939 (srec_write_record): Correct buffer size.
1940 (srec_write_header): Do without intermediate buffer.
1941 (srec_write_section): Validate Chunk.
1942 (srec_write_terminator): Pass NULL instead of dummy buffer.
1943 (srec_write_symbols): Pass file and symbol names directly to
1944 bfd_bwrite so sprintf won't overflow buffer.
1946 2002-04-03 Jakub Jelinek <jakub@redhat.com>
1948 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1949 PC relative relocs against hidden symbols.
1950 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1952 2002-04-03 Alan Modra <amodra@bigpond.net.au>
1954 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1955 LMAs, loop over segments until p_vaddr and p_memsz specify an
1956 extent enclosing the section.
1958 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1960 * ihex.c (ihex_write_object_contents): Do not allow records to
1961 cross a 64K boundary - wrap if necessary.
1963 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1965 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1966 which caused the returned LWP ID to always be 0.
1968 2002-04-01 Richard Henderson <rth@redhat.com>
1970 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1971 (elf32_sparc_relocate_section): Use it to figure out when to
1972 initialize .got entries.
1973 * elf64-sparc.c: Similarly.
1975 2002-03-28 Alan Modra <amodra@bigpond.net.au>
1977 * linker.c (link_action): Ignore duplicate warning syms.
1978 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1979 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1980 (elf_adjust_dynamic_symbol): Likewise.
1981 (elf_export_symbol): Likewise.
1982 (elf_link_find_version_dependencies): Likewise.
1983 (elf_link_assign_sym_version): Likewise.
1984 (elf_link_sec_merge_syms): Likewise.
1985 (elf_link_output_extsym): Likewise.
1986 (elf_gc_sweep_symbol): Likewise.
1987 (elf_gc_propagate_vtable_entries_used): Likewise.
1988 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1989 (elf_gc_allocate_got_offsets): Likewise.
1990 (elf_collect_hash_codes): Likewise.
1991 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1992 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1993 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1994 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1995 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1996 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1997 (elf_cris_discard_excess_dso_dynamics): Likewise.
1998 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1999 (mark_PIC_calls): Likewise.
2000 (allocate_plt_static): Likewise.
2001 (allocate_dynrelocs): Likewise.
2002 (readonly_dynrelocs): Likewise.
2003 * elf32-i386.c (allocate_dynrelocs): Likewise.
2004 (readonly_dynrelocs): Likewise.
2005 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2006 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2007 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2008 (mips_elf_sort_hash_table_f): Likewise.
2009 (mips_elf_check_mips16_stubs): Likewise.
2010 * elf32-s390.c (allocate_dynrelocs): Likewise.
2011 (readonly_dynrelocs): Likewise.
2012 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2013 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2014 (xstormy16_relax_plt_realloc): Likewise.
2015 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2016 (elf64_alpha_output_extsym): Likewise.
2017 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2018 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2019 (mips_elf64_check_mips16_stubs): Likewise.
2020 (mips_elf64_output_extsym): Likewise.
2021 * elf64-ppc.c (func_desc_adjust): Likewise.
2022 (allocate_dynrelocs): Likewise.
2023 (readonly_dynrelocs): Likewise.
2024 * elf64-s390.c (allocate_dynrelocs): Likewise.
2025 (readonly_dynrelocs): Likewise.
2026 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2027 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2028 (readonly_dynrelocs): Likewise.
2029 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2030 * aoutx.h (aout_link_write_other_symbol): Likewise.
2031 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2032 (_bfd_coff_write_global_sym): Likewise.
2033 * i386linux.c (linux_tally_symbols): Likewise.
2034 * m68klinux.c (linux_tally_symbols): Likewise.
2035 * sparclinux.c (linux_tally_symbols): Likewise.
2036 * pdp11.c (aout_link_write_other_symbol): Likewise.
2037 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2038 * xcofflink.c (xcoff_build_ldsyms): Likewise.
2039 (xcoff_write_global_symbol): Likewise.
2041 * cofflink.c (_bfd_coff_final_link): Formatting.
2042 * cpu-mips.c (mips_compatible): Make static, prototype.
2043 * elf32-i386.c (elf_i386_check_relocs): Formatting.
2044 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2045 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
2046 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
2047 (mips_elf64_final_link): Likewise.
2048 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
2051 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
2053 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
2054 (SWAP_OUT_RELOC_OFFSET): Define.
2056 2002-03-27 Gregory Steuck <greg@nest.cx>
2058 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
2059 terminating NULL if empty symbol table.
2060 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
2062 2002-03-26 H.J. Lu (hjl@gnu.org)
2064 * elflink.h (elf_link_input_bfd): Revert the last change since
2065 the gcc exception handling isn't fixed yet.
2067 2002-03-26 H.J. Lu (hjl@gnu.org)
2069 * elflink.h (elf_link_input_bfd): Complain about relocations
2070 against local symbols in discarded sections.
2072 2002-03-26 Alan Modra <amodra@bigpond.net.au>
2074 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2076 2002-03-23 Alan Modra <amodra@bigpond.net.au>
2078 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2079 section file offset for !SEC_LOAD sections.
2081 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
2083 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2084 <case R_ARM_GOT>): Handle relocations to Thumb functions.
2086 2002-03-21 Alan Modra <amodra@bigpond.net.au>
2088 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2090 * archive.c: Update copyright date.
2091 * bfd-in2.h: Regenerate.
2092 * libbfd.h: Regenerate.
2093 * Makefile.am: Run "make dep-am"
2094 * Makefile.in: Regenerate.
2095 * po/SRC-POTFILES.in: Regenerate.
2097 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
2099 * dwarf2.c (struct funcinfo): Move up.
2100 (lookup_address_in_function_table): New argument function_ptr.
2102 (lookup_address_in_line_table): New argument function. If function
2103 is non-NULL, use it to handle ``addr'' before the first line note of
2105 (comp_unit_find_nearest_line): Update and swap calls to
2106 lookup_address_in_function_table and lookup_address_in_line_table.
2107 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2108 N_SLINE encountered if we see an N_FUN before any N_SLINE.
2110 2002-03-20 Tom Rix <trix@redhat.com>
2112 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
2113 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
2114 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
2116 2002-03-19 Tom Rix <trix@redhat.com>
2118 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
2119 dynamic objects in archives.
2121 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
2123 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2124 STT_NOTYPE symbols to STT_OBJECT.
2126 2002-03-18 Jan Hubicka <jh@suse.cz>
2128 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2130 2002-03-18 Tom Rix <trix@redhat.com>
2132 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2133 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2134 * coff-rs6000 (do_pad) : New function for archive padding.
2135 (do_copy) : New function for object file copying in archives.
2136 (do_shared_object_padding) : New function for padding shared
2137 objects to their text section alignment in archives.
2138 (bfd_xcoff_ar_achive_set_magic) : Stub.
2139 (xcoff_write_armap_big) : Use do_copy and do_pad.
2140 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2142 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
2143 bfd_xcoff_magic_number.
2144 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2146 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2147 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2148 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2149 * rs6000-core.c : Update copyright date.
2150 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
2152 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2153 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2154 (coff_set_flags) : Use bfd_xcoff_magic_number.
2155 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2156 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2157 * Makefile.am : Same.
2158 * config.bfd : Same.
2160 * configure : Regnerate.
2161 * Makefile.in : Same.
2164 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2166 * po/fr.po: Updated version.
2168 2002-03-18 Alan Modra <amodra@bigpond.net.au>
2170 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2171 * libbfd.h: Regenerate.
2172 * archive.c (coff_write_armap): Pass on failures from
2173 bfd_write_bigendian_4byte_int.
2175 2002-03-14 H.J. Lu <hjl@gnu.org>
2177 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2178 error to bfd_error_nonrepresentable_section for reinit_array
2181 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2183 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2184 OR it in rather than replacing previously selected flags.
2186 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2187 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2189 2002-03-14 Alan Modra <amodra@bigpond.net.au>
2191 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2193 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2194 ensure reloc size matches before calling elf_link_input_bfd.
2195 Add an assert to check reloc size when counting output relocs.
2197 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2199 * mmo.c (mmo_get_loc): Return NULL rather than false.
2201 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2203 * po/fr.po: Updated version.
2205 2002-03-13 Alan Modra <amodra@bigpond.net.au>
2207 * archures.c (bfd_default_compatible): Test bits_per_word.
2208 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2209 bfd_default_compatible.
2210 * cpu-i370.c (i370_compatible): Likewise.
2211 * cpu-sparc.c (sparc_compatible): Likewise.
2212 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2214 * elflink.h: Formatting fixes.
2215 (elf_link_output_extsym): Merge undefined and undef weak cases.
2217 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2218 when word size of input matches output word size.
2220 2002-03-12 Andreas Jaeger <aj@suse.de>
2222 * cpu-i386.c (i386_compatible): New. Use it instead of
2223 bfd_default_compatible.
2225 2002-03-07 H.J. Lu (hjl@gnu.org)
2227 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2228 as the type for bfd_reloc_val.
2230 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2232 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2233 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2234 (elf_hppa_final_link_relocate): Correct relocations for indirect
2235 references to local data through the DLT. Fix .opd creation for
2236 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2237 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2238 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2239 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2240 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2241 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2242 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2244 2002-03-05 Jakub Jelinek <jakub@redhat.com>
2246 * merge.c (_bfd_merge_sections): Don't segfault if there
2247 is nothing to merge due to GC.
2249 2002-03-05 Alan Modra <amodra@bigpond.net.au>
2251 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2252 symbols that have been forced local.
2254 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2255 to output forced local syms for non-shared link.
2256 (elf_link_output_extsym): Tweak condition for calling backend
2257 adjust_dynamic_symbol so that previous behaviour is kept.
2258 Whitespace changes throughout file.
2260 2002-03-04 H.J. Lu <hjl@gnu.org>
2262 * elf.c (bfd_section_from_shdr): Handle special sections,
2263 .init_array, .fini_array and .preinit_array.
2264 (elf_fake_sections): Likewise.
2266 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2267 DT entry only if the section is in output for .init_array,
2268 .fini_array and .preinit_array. Complain about .preinit_array
2270 (elf_bfd_final_link): Warn zero size for .init_array,
2271 .fini_array and .preinit_array sections.
2273 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2274 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2275 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2278 2002-03-04 Alan Modra <amodra@bigpond.net.au>
2280 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2281 * configure: Regenerate.
2283 2002-03-02 Tom Rix <trix@redhat.com>
2285 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2287 * coff-rs6000.c (xcoff_howto_table): Same.
2289 2002-03-01 David Mosberger <davidm@hpl.hp.com>
2291 * elflink.h (size_dynamic_sections): If section named
2292 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2293 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2294 ".init_array" and ".fini_array".
2295 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2296 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2299 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
2301 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2304 2002-02-25 Alan Modra <amodra@bigpond.net.au>
2306 * elf64-hppa.h: Update copyright date.
2308 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2309 (ppc64_elf_relocate_section): Don't generate power4 style branch
2310 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2312 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2314 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2316 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2318 2002-02-21 Andreas Jaeger <aj@suse.de>
2320 * elf64-x86-64.c: Major rework that introduces all recent changes
2321 to the x86-64 backend. Get a closer match to elf32-i386.
2322 (struct elf64_x86_64_dyn_relocs): Rename from
2323 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2325 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2327 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2328 remove casts, initialize new hash members.
2329 (create_got_section): New.
2330 (elf64_x86_64_create_dynamic_sections): New.
2331 (elf64_x86_64_copy_indirect_symbol): New.
2332 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2333 relocs, .got or .relgot here but do it in allocate_dynrelocs.
2334 Reference count possible .plt and .got entries. Don't test input
2335 section SEC_READONLY here to try to avoid copy relocs, and keep
2336 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
2337 DF_TEXTREL here. Delay setting of variables until needed. Cache
2338 pointer to "sreloc" section in elf_section_data. Tweak condition
2339 under which .got created. Report files with bad relocation
2341 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2342 Reference count possible .plt entries. Don't deallocate .got and
2344 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
2345 do copy reloc processing for weakdefs. Remove redundant casts and
2346 aborts. Delay setting of vars until needed. Move creation of
2347 dynamic symbols and allocation of .plt and .rela.plt to
2348 allocate_dynrelocs. Replace BFD_ASSERT with abort.
2349 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2350 (allocate_dynrelocs): New.
2351 (readonly_dynrelocs): New.
2352 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2353 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
2354 Zero out the dynamic allocated content space.
2355 (elf64_x86_64_discard_copies): Removed.
2356 (elf64_x86_64_relocate_section): Make use of dynamic section
2357 short-cuts. Localise vars, and delay setting. Better error
2358 reporting, replace BFD_ASSERT with abort. Check
2359 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
2360 regular object file and tread the weak definition as the normal
2361 one. Don't discard relocs for undefweak or undefined symbols and
2362 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2364 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2365 symbols that have been forced local. Use same test to decide if
2366 we can use a relative reloc for got as relocate_section. Expand
2367 SHN_UNDEF comment. Move expressions out of function calls.
2368 Replace BFD_ASSERT with abort.
2369 (bfd_elf64_bfd_final_link): Removed.
2370 (elf_backend_copy_indirect_symbol): Define.
2372 2002-02-20 Tom Rix <trix@redhat.com>
2374 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2375 (_bfd_xcoff_reloc_type_lookup): Use it.
2376 * coff64-rs6000.c (xcoff64_howto_table): Same.
2377 (xcoff64_reloc_type_lookup): Same.
2379 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2381 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2384 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2386 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2387 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2388 * bfd-in2.h: Regenerate.
2389 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2390 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2392 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2393 (elf_s390_reloc_type_lookup): Likewise.
2394 (elf_s390_check_relocs): Likewise.
2395 (elf_s390_gc_sweep_hook): Likewise.
2396 (elf_s390_relocate_section): Likewise.
2397 (elf_s390_object_p): Use renamed architecture define.
2398 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2400 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
2402 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2404 2002-02-19 Jakub Jelinek <jakub@redhat.com>
2406 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2407 absptr -> pcrel optimization for shared libs.
2408 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2409 library cannot be converted to pcrel.
2410 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2412 * elf32-i386.c (elf_i386_relocate_section): If
2413 _bfd_elf_section_offset returned -2, skip, but make sure the
2414 relocation is installed.
2415 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2416 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2417 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2418 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2419 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2420 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2421 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2422 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2423 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2424 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2425 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2426 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2427 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2428 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2429 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2430 _bfd_elf_section_offset returning -2 the same way as -1.
2431 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2432 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2434 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2436 2002-02-18 Tom Rix <trix@redhat.com>
2438 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2439 (bfd_xcoff_size_dynamic_sections): Same.
2440 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2441 (bfd_xcoff_size_dynamic_sections): Same.
2442 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2443 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2444 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2445 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2446 * bfd-in2.h: Regenerate.
2448 2002-02-18 Alan Modra <amodra@bigpond.net.au>
2450 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2451 (struct ppc_link_hash_table): Add sfpr.
2452 (ppc64_elf_link_hash_table_create): Init it.
2453 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2455 (create_linkage_sections): ..here. Make .sfpr too.
2456 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2458 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2459 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2460 ._restf* functions, and create as needed.
2461 (func_desc_adjust): Only force_local for shared libs.
2463 2002-02-18 David O'Brien <obrien@FreeBSD.org>
2465 * configure.in: Bump version number post 2.12 branching.
2466 * configure: Regenerate.
2468 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2470 * mmo.c: Correct and improve comments.
2471 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2472 zero-pad. Use input to fill up non-empty bfd buffer.
2473 (mmo_flush_chunk): New function.
2474 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2475 changed. Don't emit location specifier if VMA is same as
2476 *LAST_VMAP after omitting leading zero contents. Call
2477 mmo_flush_chunk before emitting location specifier.
2478 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2479 with mmo_write_loc_chunk calls.
2480 (mmo_internal_write_section): Call mmo_flush_chunk after
2482 (mmo_write_symbols_and_terminator): Move :Main to first position
2483 in symbol array. Add faked one if it does not exist if there are
2484 other symbols. Don't add it if there are no symbols at all. Move
2485 out test for value of :Main from symbol loop. Rename table
2486 fakemain to maintable and variable mainsym to fakemain.
2488 2002-02-15 Richard Henderson <rth@redhat.com>
2490 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2491 section with no got matches any got. Simplify error generaion.
2493 2002-02-15 Alan Modra <amodra@bigpond.net.au>
2495 Support arbitrary length fill patterns.
2496 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2497 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2498 Call default_data_link_order.
2499 (default_fill_link_order): Delete.
2500 (default_data_link_order): New function.
2501 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2502 of bfd_fill_link_order with bfd_data_link_order.
2503 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2504 * elf64-mips.c (mips_elf64_final_link): Likewise.
2506 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2507 Correct value returned in "end" for "0x<non-hex>".
2509 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2511 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2512 (scan): Test against 'mach' field in info structure.
2514 2002-02-14 Alan Modra <amodra@bigpond.net.au>
2516 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2518 2002-02-14 Matt Fredette <fredette@netbsd.org>
2520 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2523 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2525 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
2526 non-zero physical addresses when adjusting the LMAs of new
2529 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2531 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2532 from _bfd_elf_hppa_gen_reloc_type.
2533 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2534 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2535 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2536 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2538 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
2540 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2541 loading its contents if there's nothing to do in it.
2543 2002-02-12 Alan Modra <amodra@bigpond.net.au>
2545 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2548 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2549 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2550 (ppc64_elf_finish_dynamic_sections): Set values for them.
2552 2002-02-11 Michael Snyder <msnyder@redhat.com>
2554 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2555 * elf.c (elfcore_grok_pstatus): Add prototype.
2556 (elfcore_grok_lwpstatus): Add prototype.
2557 (elfcore_write_lwpstatus): New function.
2558 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2560 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
2562 * elf32-sh.c: Added missing prototypes.
2563 * elf32-sh64.c: Likewise.
2564 (sh_elf_align_loads): Mark unused args as such.
2565 * elf64-sh64.c: Added missing prototypes.
2566 (struct elf_sh64_link_hash_entry): Fix typo.
2567 (sh_elf64_relocate_section): Fix info argument passed to
2568 _bfd_elf_section_offset.
2570 2002-02-11 Alan Modra <amodra@bigpond.net.au>
2572 * Makefile.am: "make dep-am".
2573 * Makefile.in: Regenerate.
2574 * aclocal.m4: Regenerate.
2575 * config.in: Regenerate.
2576 * configure: Regenerate.
2578 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
2580 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2582 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2584 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2585 cast warnings for the common case.
2587 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2589 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2591 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2594 2002-02-09 Richard Henderson <rth@redhat.com>
2596 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2597 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2598 (elf64_alpha_relocate_section): Likewise.
2599 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2600 * bfd-in2.h, libbfd.h: Rebuild.
2602 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2604 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2605 that base-plus-offset reloc accounting is consistent.
2606 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2607 up to date for undefined symbols.
2609 2002-02-08 Eric Christopher <echristo@redhat.com>
2611 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2613 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2614 sections for the O32 ABI.
2616 2002-02-08 Chris Demetriou <cgd@broadcom.com>
2618 * elf32-arm.h: Fix formatting of _("...").
2619 * elf32-d10v.c: Likewise.
2620 * elf32-m68k.c: Likewise.
2621 * elf32-mips.c: Likewise.
2623 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
2625 * coff-or32.c: Fix compile time warning messages.
2627 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
2629 Contribute sh64-elf.
2630 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
2631 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2632 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2633 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2634 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2635 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2636 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2637 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2638 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2639 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2641 * libbfd.h, bfd-in2.h: Rebuilt.
2642 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2643 (sh_reloc_map): Map them.
2644 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2645 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2646 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2647 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2648 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2649 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2650 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2651 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2652 datalabel_got_offset.
2653 (sh_elf_link_hash_newfunc): Initialize it.
2654 (sh_elf_relocate_section): Augment the scope of
2655 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
2656 GOT and GOTOFF handling to new SHmedia relocation types. Support
2658 (sh_elf_check_relocs): Likewise.
2659 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2660 PLT entries using movi_shori_putval. Support GOT_BIAS.
2661 (sh_elf_finish_dynamic_sections): Likewise.
2662 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2663 relocation, it's now done by the caller.
2665 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2666 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2667 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2668 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2669 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2670 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2671 sh64_elf64_hash_table): New.
2672 (sh_elf64_howto_table): Introduce new relocs.
2673 (sh_elf64_info_to_howto): Accept new PIC relocs.
2674 (sh_elf64_relocate_section): Augment the scope of
2675 seen_stt_datalabel. Support new PIC relocs.
2676 (sh_elf64_check_relocs): Support new PIC relocs.
2677 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2678 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2679 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2680 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2681 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2682 movi_shori_putval, movi_3shori_putval,
2683 sh64_elf64_create_dynamic_sections,
2684 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2685 sh64_elf64_size_dynamic_sections,
2686 sh64_elf64_finish_dynamic_symbol,
2687 sh64_elf64_finish_dynamic_sections): New.
2688 (elf_backend_create_dynamic-sections,
2689 bfd_elf64_bfd_link_hash_table_create,
2690 elf_backend_adjust_dynamic_symbol,
2691 elf_backend_size_dynamic_sections,
2692 elf_backend_finish_dynamic_symbol,
2693 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2694 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2695 elf_backend_got_header_size, elf_backend_plt_header_size):
2697 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2698 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2699 match official numbers and names; moved unmaching ones to the
2701 * elf32-sh64.c, elf64-sh64.c: Likewise.
2702 2001-03-12 DJ Delorie <dj@redhat.com>
2703 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2705 2001-03-12 DJ Delorie <dj@redhat.com>
2706 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2708 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2709 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2710 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2711 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2712 .cranges section with SEC_SORT_ENTRIES set.
2713 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2714 incoming sorted .cranges section.
2715 (sh64_bfd_elf_copy_private_section_data): New.
2716 (sh64_elf_final_write_processing): Only sort .cranges and modify
2717 start address if called by linker.
2718 2001-01-08 Ben Elliston <bje@redhat.com>
2719 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2720 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2721 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2722 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2723 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2724 line. Add comments before all entries.
2725 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2727 (sh_elf64_reloc): Correct head comment.
2728 (sh_elf64_relocate_section): Correct spacing.
2729 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2730 instead call reloc_dangerous callback.
2731 <case R_SH_SHMEDIA_CODE>: New case.
2732 (sh_elf64_gc_mark_hook): Correct spacing.
2733 (sh_elf64_check_relocs): Ditto.
2734 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2736 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2738 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2739 clarify describing comment. Add comments before all entries.
2740 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2741 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2742 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2743 Sort .cranges section in final link. Prepare to set bit 0 on
2745 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2746 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2747 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2749 (sh64_backend_section_from_shdr): New, to recognize
2750 SHT_SH5_CR_SORTED on incoming .cranges section.
2751 (elf_backend_section_from_shdr): Define.
2752 (sh64_elf_final_write_processing): Sort outgoing .cranges
2753 section. (New, temporarily disabled:) Set bit 0 on entry address
2754 according to ISA type.
2755 (sh64_find_section_for_address): New.
2756 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2757 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2758 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2759 bfd_malloc, not xmalloc.
2760 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2762 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2763 temporarily disabled) setting bit 0 on entry address.
2764 (elf_backend_final_write_processing): Define.
2765 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2766 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2767 be a proper relocation for PTA and PTB rather than a marker.
2768 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2769 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2770 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2771 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2772 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2774 * elf64-sh64.c: Ditto.
2775 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2776 * elf32-sh64.c: Include opcodes/sh64-opc.h
2777 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2778 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2779 parameters. No unused parameters. Caller changed.
2780 <case R_SH_PT_16>: New case.
2781 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2782 * Makefile.in: Regenerate.
2783 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2784 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2786 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2787 (sh64_elf_merge_private_data): Ditto.
2788 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2789 to access stored section flags.
2790 (sh64_elf_final_write_processing): Return immediately unless
2791 called by linker. Use sh64_elf_section_data (cranges) to get size
2792 of linker-generated cranges entries.
2793 (sh64_elf_copy_private_data): Add missing "return true".
2794 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2795 (sh_elf64_merge_private_data): Ditto.
2796 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2797 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2798 elf64-sh64.c:sh64_elf_fake_sections.
2799 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2800 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2801 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2802 (sh64_elf_final_write_processing): New.
2803 (elf_backend_final_write_processing): Define.
2804 (sh64_elf_fake_sections): Get header flags from tdata field.
2805 (sh64_elf_copy_private_data): Do not call
2806 sh64_elf_copy_private_data_internal, just copy e_flags field.
2807 (sh64_elf_merge_private_data): Do not call
2808 sh64_elf_copy_private_data_internal.
2809 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2810 Remove EF_SH64_ABI64, let ELF size make difference.
2811 Remove SH64-specific BFD section flag.
2812 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2813 containing SHmedia through elf_section_data (asect)->tdata
2814 non-zero, not using a BFD section flag.
2815 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2816 (sh64_elf_merge_private_data): Similar.
2817 (elf_backend_section_flags): Don't define.
2818 (sh64_elf_backend_section_flags): Delete.
2819 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2821 (sh_elf64_merge_private_data): Similar.
2822 * section.c (Section flags definitions): Don't define
2824 (bfd-in2.h): Regenerate.
2825 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2826 Make DataLabel references work with partial linking.
2827 * elf32-sh64.c: Fix formatting.
2828 (sh64_elf_link_output_symbol_hook): New.
2829 (elf_backend_link_output_symbol_hook): Define to
2830 sh64_elf_link_output_symbol_hook.
2831 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2832 undefined if partial linking. Adjust sanity check.
2833 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2834 (elf_backend_link_output_symbol_hook): Define to
2835 sh64_elf64_link_output_symbol_hook.
2836 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2837 undefined if partial linking. Adjust sanity check.
2838 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2839 Implement semantics for inter-file DataLabel references.
2840 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2841 (sh64_elf64_add_symbol_hook): New.
2842 (sh_elf64_relocate_section): If passing an indirect symbol with
2843 st_type STT_DATALABEL on the way to a symbol with st_other
2844 STO_SH5_ISA32, do not bitor 1 to the relocation.
2845 (elf_backend_add_symbol_hook): Define to
2846 sh64_elf64_add_symbol_hook.
2847 * elf64-sh32.c: Tweak comments.
2848 (DATALABEL_SUFFIX): Define.
2849 (sh64_elf_add_symbol_hook): New.
2850 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2851 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2852 symbol with st_type STT_DATALABEL on the way to a symbol with
2853 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2854 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2855 Pass through STT_DATALABEL.
2856 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2857 (elf_backend_get_symbol_type): Define.
2858 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2859 (elf_backend_get_symbol_type): Define.
2860 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2861 * elf32-sh64.c: Tweak comments.
2862 (sh64_elf_copy_private_data_internal): Add prototype.
2863 (bfd_elf32_bfd_set_private_flags): Define.
2864 (sh64_elf_copy_private_data_internal): Compare machine name, not
2865 textual BFD target name, to check whether to copy section flag
2867 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2868 Tweak section-contents-type-mismatch message.
2869 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2870 Validize reloc-types.
2871 * elf64-sh64.c: New file.
2872 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2873 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2874 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2875 Regenerate dependencies.
2876 * Makefile.in: Regenerate.
2877 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2878 bfd_elf64_sh64l_vec.
2879 * configure.in: Handle bfd_elf64_sh64_vec and
2880 bfd_elf64_sh64l_vec.
2881 * configure: Regenerate.
2882 * po/POTFILES.in: Regenerate.
2883 * po/bfd.pot: Regenerate.
2884 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2885 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2886 anything else but EF_SH64 and EF_SH64_ABI64.
2887 (sh64_elf_merge_private_data): Emit error for anything else but
2888 EF_SH64 and EF_SH64_ABI64.
2889 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2891 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2892 bfd_elf32_sh64l_vec as a temporary measure.
2893 * configure: Regenerate.
2894 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2895 * cpu-sh.c (arch_info_struct): Include sh5 item
2897 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2898 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2899 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2900 * elf32-sh64.c: Tweak comments.
2901 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2902 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2903 (sh64_elf_copy_private_data_internal): Wrap long line.
2904 (sh64_elf_merge_private_data): Rewrite to allow objects from
2905 SH64 subsets to be linked together.
2906 (INCLUDE_SHMEDIA): Define.
2907 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2908 Parenthesize plus-expression inside or-expression.
2909 <global symbol>: Ditto.
2910 (sh_elf_set_mach_from_flags): Remove code refusing
2911 deleted EF_SH64_32BIT_ABI flag.
2912 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2913 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2914 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2915 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2916 (sh_elf_relocate_section) <local symbol>: Or 1 in
2917 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2918 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2919 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2921 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2922 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2923 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2924 Regenerate dependencies.
2925 * Makefile.in: Regenerate.
2926 * archures.c: Add bfd_mach_sh5.
2927 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2928 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2929 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2930 * configure: Regenerate.
2931 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2932 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2933 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2934 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2935 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2936 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2937 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2938 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2939 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2940 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2942 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2944 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2945 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2946 shmedia_prepare_reloc, goto final_link_relocate if it returns
2947 non-zero, else fail as before.
2948 (sh_elf_set_mach_from_flags): Provide function only if not defined
2949 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2950 (sh_elf_set_private_flags): Provide function only if not defined
2952 (sh_elf_copy_private_data): Similar.
2953 (sh_elf_merge_private_data): Similar.
2954 * section.c (SEC_SH_ISA_SHMEDIA): New.
2955 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2956 * elf32-sh64.c: New file.
2957 * libbfd.h: Regenerate.
2958 * bfd-in2.h: Regenerate.
2959 * po/POTFILES.in: Regenerate.
2960 * po/bfd.pot: Regenerate.
2961 * bfd-in2.h: Regenerate.
2962 * libbfd.h: Regenerate.
2964 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
2966 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2967 been included, not drag it in.
2968 * bfd-in2.h: Regenerate.
2970 2002-02-06 H.J. Lu (hjl@gnu.org)
2972 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2973 the mach and ISA fields if necessary.
2975 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2977 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2978 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2979 be sure exactly which architecture this represents.
2981 2002-02-05 Nick Clifton <nickc@redhat.com>
2983 * po/tr.po: Updated translation.
2985 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2987 From Jimi X <jimix@watson.ibm.com>
2988 * archures (bfd_mach_ppc64): Define.
2989 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2990 (bfd_powerpc_arch): Define.
2991 * bfd-in2.h: Regenerate.
2992 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2993 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2994 (bfd_powerpc_archs): Add default powerpc64 arch.
2996 2002-02-05 Alan Modra <amodra@bigpond.net.au>
2998 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2999 against section syms in readonly sections. Don't do the global
3000 sym check if we find one.
3001 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3002 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
3003 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3004 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3005 (elf_s390_grok_prstatus): Add missing prototype.
3007 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3009 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3010 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3011 Call bfd_get_section_by_name only once. Initialize
3012 bpodata->n_bpo_relocs_this_section.
3013 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3015 (bpo_reloc_request_sort_fn): Don't use difference of values as
3018 2002-02-02 David O'Brien <obrien@FreeBSD>
3020 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
3021 version 4.5 and later the same as 5-CURRENT.
3022 * configure: Re-generate.
3024 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
3026 * config.bfd (hppa*-*-netbsd*): New target.
3028 2002-01-31 Philipp Thomas <pthomas@suse.de>
3030 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3031 to front of message. Unify messages with elf32-arm.h. Use
3032 commas where neccessary.
3033 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3034 ERROR in messages. Unify messages with coff-arm.c. Correct
3035 VFP/FPA error message.
3036 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3037 APCS-32 for translation.
3039 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
3041 Perform on-demand global register allocation from
3042 R_MMIX_BASE_PLUS_OFFSET relocs.
3043 * elf64-mmix.c (struct bpo_reloc_section_info, struct
3044 bpo_reloc_request, struct bpo_greg_section_info): New.
3045 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
3046 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
3047 _bfd_mmix_check_all_relocs,
3048 _bfd_mmix_prepare_linker_allocated_gregs,
3049 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
3050 (elf_mmix_howto_table): Correct src_mask for most relocs.
3051 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
3053 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
3054 case. Fix typo in comment. New label do_mmix_reloc.
3055 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
3056 store first object file with a base-plus-offset reloc. Call
3057 mmix_elf_check_common_relocs for the part common with mmo.
3058 (mmix_elf_final_link): Write out linker-allocated register
3060 (elf_backend_gc_sweep_hook): Define.
3061 (bfd_elf64_bfd_relax_section): Define.
3063 * mmo.c: Don't include <ctype.h>
3064 (mmo_init): Correct init-once logic.
3066 2002-02-01 Tom Rix <trix@redhat.com>
3068 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
3070 2002-02-01 Alan Modra <amodra@bigpond.net.au>
3072 * Makefile.am: Run "make dep-am"
3073 * Makefile.in: Regenerate.
3075 2002-01-31 David O'Brien <obrien@FreeBSD>
3077 * configure.in: Recognize the differences in core files from FreeBSD
3078 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
3080 * configure: Regenerate.
3082 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
3084 * coff-or32.c: New file.
3085 * cpu-or32.c: New file.
3086 * elf32-or32.c: New file.
3087 * archures.c: Add support for or32.
3088 * targets.c: Add support for or32.
3089 * bfd-in2.h: Regenerate.
3090 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3091 coff_write_object_contents): Add support for or32.
3092 * config.bfd: Add target.
3093 * configure.in: Add support for or32.
3094 * configure: Regenerate.
3095 * Makefile.am: Add support for or32.
3096 * Makefile.in: Regenerate.
3097 * po/SRC-POTFILES.in: Add or32 files.
3098 * po/bfd.pot: Regenerate.
3100 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
3101 Don Lindsay <lindsayd@cisco.com>
3103 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3104 false' with a return of a bfd_reloc_ error code.
3106 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
3108 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3109 unexport unreferenced symbols when --export-dynamic. Call
3110 _bfd_elf_strtab_delref when unexporting.
3112 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
3114 * bfd-in.h: Include <stdbool.h> if it is available.
3115 * bfd-in2.h: Regenerated.
3117 2002-01-31 Alan Modra <amodra@bigpond.net.au>
3119 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3122 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3124 * archures.c: Tidy up formatting of embedded comments.
3125 * bfd.c: Tidy up formatting of embedded comments.
3126 * bfd-in.h: Fix formatting of comments.
3127 * reloc.c: Tidy up formatting of ordinary & embedded comments.
3128 * section.c: Tidy up formatting of embedded comments.
3129 * syms.c: Tidy up formatting of embedded comments.
3130 * targets.c: Tidy up formatting of embedded comments.
3132 * bfd-in2.h: Regenerate.
3134 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3136 * vms-tir.c (cmd_name): New function.
3137 (tir_cmd_name): New function.
3138 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3139 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3142 * peXXigen.c (pe_print_idata): Rearrange message to aid in
3144 (pe_print_pdata): Rearrange message to aid in translation.
3146 * libbfd.c (warn_deprecated): Rearrange error message to aid in
3149 * ihex.c (ihex_write_object_contents): Fix spelling typo.
3151 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3153 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3154 message to aid in translation.
3156 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3157 to aid in translation.
3159 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3161 2002-01-30 Philipp Thomas <pthomas@suse.de>
3163 * coff-arm.c, elf32-elf.h: Unify messages.
3165 2002-01-30 Nick Clifton <nickc@redhat.com>
3167 * po/sv.po: Updated translation.
3169 2002-01-30 Philipp Thomas <pthomas@suse.de>
3171 * dwarf2.c (read_abbrev): Use full section name in error message.
3172 (decode_line_info): Likewise.
3174 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3177 2002-01-30 Alan Modra <amodra@bigpond.net.au>
3179 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3180 descriptor symbols for undefined function code syms. Clear
3181 ELF_LINK_NON_ELF so that they can stay weak.
3183 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3184 Mitch Lichtenberg <mpl@broadcom.com>
3186 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3187 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3188 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3190 * bfd-in2.h: Regenerate.
3192 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3194 * elf32-mips.c: Add additional comments about HI16 relocation
3196 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3197 pc-relative relocations. (Reverts change made on 2001-10-31.)
3198 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3199 for pc-relative relocations.
3200 (mips_elf_calculate_relocation): Add a comment about a kludge
3201 in the R_MIPS_GNU_REL_HI16 handling.
3202 (_bfd_mips_elf_relocate_section): Implement that kludge;
3203 adjust pc-relative HI16 relocation for difference in HI16 and
3204 LO16 addresses, since it can't easily be done in
3205 mips_elf_calculate_relocation.
3207 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3209 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3210 relocations with PC32 relocations for undefined or weak symbols.
3211 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3212 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3214 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3216 * elfcore.h (elf_core_file_p): Improve comment for last change.
3218 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
3220 * configure: Regenerated.
3222 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3224 * elfcore.h (elf_core_file_p): Set the machine architecture
3225 before processing the program headers.
3227 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3229 * configure.in <64-bit configuration>: If using gcc, check and
3230 emit error for egcs-1.1.2.
3231 * configure: Regenerate.
3233 2002-01-26 Egor Duda <deo@logos-m.ru>
3235 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3236 as possible to avoid stack corruption.
3238 2002-01-26 Richard Henderson <rth@redhat.com>
3240 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3241 for non-allocated sections.
3243 2002-01-25 Mark Kettenis <kettenis@gnu.org>
3245 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3246 prstat.pr_reg even if it is a struct.
3248 2002-01-25 Steve Ellcey <sje@cup.hp.com>
3250 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3252 2002-01-25 Philipp Thomas <pthomas@suse.de>
3254 * coffgen.c (coff_print_symbol): Don't mark info message
3257 2002-01-25 Nick Clifton <nickc@redhat.com>
3259 * po/fr.po: Updated translation.
3260 * po/es.po: Updated translation.
3262 2002-01-25 Philipp Thomas <pthomas@suse.de>
3264 * coff-alpha.c (alpha_relocate_section): Unify warning message
3265 for GP relative relocations without GP defined.
3266 * coff-mips.c (mips_relocate_section): Likewise.
3268 2002-01-25 Alan Modra <amodra@bigpond.net.au>
3270 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3271 unsigned overflow when new_offset < old_offset.
3273 2002-01-24 Philipp Thomas <pthomas@suse.de>
3275 * bfd.c (_bfd_abort): Fix typo.
3277 2002-01-23 Richard Henderson <rth@redhat.com>
3279 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3280 plt entries for undefweak symbols.
3282 2002-01-23 Steve Ellcey <sje@cup.hp.com>
3284 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3286 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3287 (bfd_elf32_h8300_vec): Ditto.
3289 2002-01-23 Alan Modra <amodra@bigpond.net.au>
3291 * elf64-ppc.c: Remove stale part of ABI comment.
3292 (NO_OPD_RELOCS): Define.
3293 (ppc64_elf_check_relocs): Use it.
3294 (ppc64_elf_relocate_section): Here too.
3295 (build_one_stub): Don't point function syms at the stub. Instead,
3297 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3298 really go to the stub. Make all dynamic relocs in opd against
3300 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3303 2002-01-22 Richard Henderson <rth@redhat.com>
3305 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3307 2002-01-22 Alan Modra <amodra@bigpond.net.au>
3309 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3310 TOC_BASE_OFF adjustment.
3312 * Makefile.am: Run "make dep-am".
3313 * Makefile.in: Regenerate.
3314 * po/SRC-POTFILES.in: Regenerate.
3316 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3318 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3321 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
3323 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3324 Check for and emit error if sgot is NULL at this point.
3326 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3328 * config.bfd (ia64*-*-netbsd*): New target.
3330 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3332 * som.c (som_write_space_strings): Comment typo fix.
3334 2002-01-21 Alan Modra <amodra@bigpond.net.au>
3336 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3337 is_func_descriptor fields.
3338 (link_hash_newfunc): Init them.
3339 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3340 dot are candidates for plt entries. When processing .opd relocs,
3341 set function descriptor strings to point inside function code
3342 string, and set new ppc_link_hash_entry fields.
3343 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3344 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3345 function descriptors. It's now done in..
3346 (func_desc_adjust): New.
3347 (ppc64_elf_func_desc_adjust): New.
3348 (define elf_backend_always_size_sections): Define.
3349 (ppc64_elf_hide_symbol): New.
3350 (define elf_backend_hide_symbol): Define.
3351 (allocate_dynrelocs): Remove code looking up function descriptors
3352 as that has been done earlier.
3353 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3355 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
3356 up function descriptor.
3357 (build_one_stub): Look up the function code sym. Check for
3358 invalid plt offsets.
3359 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
3360 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3362 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3364 (_bfd_elf_link_hash_hide_symbol): Likewise.
3365 * elflink.h (elf_link_add_object_symbols): Adjust call to
3366 elf_backend_hide_symbol.
3367 (elf_fix_symbol_flags): Likewise.
3368 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3370 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3371 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3372 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3373 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3374 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3376 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3377 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3378 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3380 2002-01-18 Alan Modra <amodra@bigpond.net.au>
3382 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3383 dynamic function descriptor symbol, not the associated function
3386 2002-01-17 Eric Christopher <echristo@redhat.com>
3388 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3390 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3392 * po/bfd.pot: Regenerate.
3393 * po/fr.po: Regenerate.
3395 2002-01-17 Alan Modra <amodra@bigpond.net.au>
3397 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3398 Remove "Elf_Internal_Shdr *" param.
3399 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3400 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3401 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3402 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3403 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3404 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3405 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3406 function to override special sections. Remove hdr arg from
3407 backend call, and don't loop.
3409 2002-01-16 Eric Christopher <echristo@redhat.com>
3411 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3412 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3413 relocations requiring gp0 and gp.
3415 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
3417 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
3419 (elf32_arm_print_private_bfd_data): Likewise.
3421 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3423 * po/tr.po: Import new version.
3425 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3427 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3428 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3429 (ORI_R0_R0_0): Correct.
3431 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3433 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3434 when plt_not_loaded.
3435 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3436 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3437 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3438 (ppc64_elf_glink_code): Delete.
3439 (PPC64_ELF_GLINK_SIZE): Delete.
3440 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3441 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3442 ORI_R0_R0_0): Define.
3443 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3444 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3445 (ppc64_elf_link_hash_table_create): Init them.
3446 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3447 Don't copy to shared lib.
3448 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3449 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3450 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3451 room for .stub and .glink code.
3452 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3454 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3455 bfd_elf64_bfd_final_link.
3456 (bfd_elf64_bfd_final_link): Don't define.
3457 (ppc64_elf_size_stubs): New.
3458 (build_plt_stub): New.
3459 (build_one_stub): New.
3460 (ppc64_elf_build_stubs): New.
3461 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3462 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3463 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3464 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3465 case output sections not separate. Adjust DT_RELASZ to not
3466 include plt relocs. Set reserved got entry. Set got and plt
3468 (elf_backend_got_header_size): Set to 8.
3469 * elf64-ppc.h: New file.
3471 2002-01-16 Alan Modra <amodra@bigpond.net.au>
3473 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3474 sections, use bfd_section_list_remove.
3475 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3476 * elflink.h (elf_link_add_object_symbols): When removing all
3477 sections, use bfd_section_list_clear.
3479 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3481 * po/sv.po: New file: Swedish translation.
3482 * configure.in (ALL_LINGUAS): Add sv.
3483 * configure: Regenerate.
3485 2002-01-15 Jakub Jelinek <jakub@redhat.com>
3487 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3488 * elf.c (merge_sections_remove_hook): New function.
3489 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3490 _bfd_merge_sections.
3491 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3492 * libbfd.h: Rebuilt.
3493 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3494 Call remove_hook if a SEC_EXCLUDE section is encountered.
3496 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3498 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3499 (xstormy16_reloc_map): Initialise new field with correct howto
3501 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3504 2002-01-10 Michael Snyder <msnyder@redhat.com>
3506 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3507 (elfcore_write_pstatus): Use long instead of pid_t;
3508 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3510 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
3512 * elf.c: Update copyright years.
3513 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3514 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3516 2002-01-08 Michael Snyder <msnyder@redhat.com>
3518 Add capability to write corefile note sections, for gdb.
3519 * elf.c (elfcore_write_note): New function.
3520 (elfcore_write_prpsinfo): New function.
3521 (elfcore_write_prstatus): New function.
3522 (elfcore_write_pstatus): New function.
3523 (elfcore_write_prfpreg): New function.
3524 (elfcore_write_prxfpreg): New function.
3525 * elf-bfd.h: Add prototypes for above functions.
3527 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
3529 * elf.c (elf_fake_sections): Propagate errors from
3530 elf_backend_fake_section.
3532 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3534 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3535 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3536 (elf32-sh-nbsd.lo): New rule.
3537 * Makefile.in: Regenerate.
3538 * config.bfd (sh*le-*-netbsdelf*): New target.
3539 (sh*-*-netbsdelf*): New target.
3540 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3541 (bfd_elf32_shnbsd_vec): New vector.
3542 (bfd_elf32_shlnbsd_vec): New vector.
3543 * configure: Regenerate.
3544 * elf32-sh-nbsd.c: New file.
3545 * targets.c: Update copyright years.
3546 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
3547 bfd_elf32_shnbsd_vec.
3549 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
3551 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3553 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
3555 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3556 of a symbol in a section that will be deleted.
3558 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3560 * po/es.po: New file: Spanish translation.
3561 * configure.in (ALL_LINGUAS): Add es.
3562 * configure: Regenerate.
3564 2002-01-06 Steve Ellcey <sje@cup.hp.com>
3566 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3567 argument so we can handle HP-UX specially.
3568 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3569 (elfNN_hpux_backend_section_from_bfd_section): New for support
3570 of SHN_IA_64_ANSI_COMMON.
3571 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3572 (is_unwind_section_name): Add special HP-UX support.
3573 (elfNN_ia64_section_from_shdr): Add support for more sections.
3574 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3575 add support for more sections.
3576 (elfNN_ia64_additional_program_headers): Modify
3577 is_unwind_section_name call.
3578 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3579 only one unwind section in segment.
3581 2002-01-06 Alan Modra <amodra@bigpond.net.au>
3583 * syms.c (_bfd_generic_make_empty_symbol): New function.
3584 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3585 _bfd_generic_make_empty_symbol.
3586 * libbfd.h: Regenerate.
3587 * bfd-in2.h: Regenerate.
3588 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3589 (hppabsd_core_get_symtab_upper_bound): Don't define.
3590 (hppabsd_core_get_symtab): Likewise.
3591 (hppabsd_core_print_symbol): Likewise.
3592 (hppabsd_core_get_symbol_info): Likewise.
3593 (hppabsd_core_bfd_is_local_label_name): Likewise.
3594 (hppabsd_core_get_lineno): Likewise.
3595 (hppabsd_core_find_nearest_line): Likewise.
3596 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3597 (hppabsd_core_read_minisymbols): Likewise.
3598 (hppabsd_core_minisymbol_to_symbol): Likewise.
3599 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3601 * hpux-core.c: Similarly.
3602 * irix-core.c: Similarly.
3603 * osf-core.c: Similarly.
3604 * sco5-core.c: Similarly.
3605 * binary.c (binary_make_empty_symbol): Remove function, define as
3606 _bfd_generic_make_empty_symbol.
3607 * ihex.c (ihex_make_empty_symbol): Likewise.
3608 * mmo.c (mmo_make_empty_symbol): Likewise.
3609 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3610 * srec.c (srec_make_empty_symbol): Likewise.
3611 * versados.c (versados_make_empty_symbol): Likewise.
3612 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3613 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3614 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3615 rather than _bfd_vms_make_empty_symbol.
3616 * vms-misc.c (new_symbol): Likewise.
3618 2002-01-05 Alan Modra <amodra@bigpond.net.au>
3620 * section.c (bfd_section_init): Remove unnecessary initialisations.
3621 (bfd_section_list_clear): New function.
3622 (bfd_section_list_remove, bfd_section_list_insert): New macros.
3623 (_bfd_strip_section_from_output): Use them.
3624 * coffcode.h (coff_set_alignment_hook): Likewise.
3625 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3626 * elf64-mips.c (mips_elf64_final_link): Likewise.
3627 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3628 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3629 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3630 * bfd-in2.h: Regenerate.
3632 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3633 rather than doing our own section handling. Clean up after errors
3634 with bfd_release and bfd_section_list_clear. Handle unexpected
3636 * aoutf1.h (sunos4_core_file_p): Likewise.
3637 * aix386-core.c (aix386_core_file_p): Likewise.
3638 * cisco-core.c (cisco_core_file_validate): Likewise.
3639 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3640 * trad-core.c (trad_unix_core_file_p): Likewise.
3642 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
3643 with bfd_release and bfd_section_list_clear.
3644 * hpux-core.c (hpux_core_core_file_p): Likewise.
3645 * irix-core.c (irix_core_core_file_p): Likewise.
3646 * lynx-core.c (lynx_core_file_p): Likewise.
3647 * osf-core.c (osf_core_core_file_p): Likewise.
3648 * rs6000-core.c (rs6000coff_core_p): Likewise.
3649 * sco5-core.c (sco5_core_file_p): Likewise.
3651 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3652 sign extension adjustments without conditionals.
3654 2002-01-04 Jakub Jelinek <jakub@redhat.com>
3656 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3657 CIE at .eh_frame start is removed due to no FDEs referencing it.
3659 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3661 * config.bfd (x86_64-*-netbsd*): New target.
3662 * configure.in (x86_64-*-netbsd*): Set COREFILE
3664 * configure: Regenerated.
3666 2002-01-03 Tom Rix <trix@redhat.com>
3668 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3669 for recent bfd_make_section_anyway change.
3671 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
3673 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3674 R_ARM_THM_PC11 reloc.
3676 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3678 * configure.in (LINGUAS): Add ja.
3679 * configure: Regenerate.
3680 * po/ja.po: Import from translation project's web site.
3682 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3684 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3685 messages to ease translation into other languages.
3687 For older changes see ChangeLog-0001
3693 version-control: never