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