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