1 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3 * xtensa-modules.c: Remove comment indicating that this is a
6 2003-04-02 Alan Modra <amodra@bigpond.net.au>
8 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
10 2003-04-01 Bob Wilson <bob.wilson@acm.org>
12 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
13 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
14 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
16 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
18 (cpu-xtensa.lo): New target.
19 (elf32-xtensa.lo): Likewise.
20 (xtensa-isa.lo): Likewise.
21 (xtensa-modules.lo): Likewise.
22 * Makefile.in: Regenerate.
23 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
24 (bfd_archures_list): Add bfd_xtensa_arch.
25 * config.bfd: Handle xtensa-*-*.
26 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
27 * configure: Regenerate.
28 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
29 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
30 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
31 (bfd_elf32_xtensa_le_vec): Likewise.
32 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
33 * cpu-xtensa.c: New file.
34 * elf32-xtensa.c: Likewise.
35 * xtensa-isa.c: Likewise.
36 * xtensa-modules.c: Likewise.
37 * libbfd.h: Regenerate.
38 * bfd-in2.h: Likewise.
40 2003-04-01 Nick Clifton <nickc@redhat.com>
42 * archures.c (bfd_mach_arm_unknown): Define.
43 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
44 bfd_arm_get_mach_from_notes): Prototype.
45 * bfd-in2.h: Regenerate.
46 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
47 bfd_arm_merge_machines.
48 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
49 * coffcode.h (coff_set_arch_mach_hook): Call
50 bfd_arm_get_mach_from_notes.
51 * coffgen.c (coff_real_object_p): Revert previous delta.
52 * cpu_arm.c (arm_check_note): New function. Examine a note in a
54 (bfd_arm_merge_machines): New function: Handle the merging of ARM
55 binaries compiled for different architectures..
56 (bfd_arm_update_notes): New function: Update an ARM note section.
57 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
58 number from an ARM note section.
59 * elf32-arm.h (elf32_arm_object_p): Use
60 bfd_arm_get_mach_from_notes.
61 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
62 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
64 2003-04-01 Ben Elliston <bje@wasabisystems.com>
66 * dwarf2.c (read_attribute_value): Correct typo in comment.
68 2003-04-01 Nick Clifton <nickc@redhat.com>
70 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
72 (decode_line_info): Only free filename if it is not NULL.
73 (add_line_info): Make a copy of the filename when storing it into
76 2003-03-31 Andreas Schwab <schwab@suse.de>
77 Daniel Jacobowitz <drow@mvista.com>
79 * simple.c (bfd_simple_get_relocated_section_contents): Add
80 parameter symbol_table. Optionally use it instead of the symbol
81 table from the bfd. Save and restore output offsets and output
82 sections around bfd_get_relocated_section_contents. Fix a memory
84 (simple_save_output_info, simple_restore_output_info): New
86 * bfd-in2.h: Regenerate.
87 * dwarf2.c (read_abbrevs): Use
88 bfd_simple_get_relocated_section_contents instead of
89 bfd_get_section_contents.
90 (decode_line_info): Likewise.
91 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
93 (find_rela_addend): Remove.
94 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
96 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
99 2003-03-31 David Heine <dlheine@suif.stanford.edu>
101 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
103 * dwarf2.c (concat_filename): Always allocate space for the
105 (decode_line_info): Free the allocated filename returned by
107 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
108 * elf.c (copy_private_bfd_data): Likewise.
109 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
110 * elflink.h (elf_link_sort_relocs): Fix memory leak.
111 * format.c (bfd_check_format_matches): Likewise.
112 * linker.c (bfd_generic_final_link): Likewise.
113 * opncls.c (find_separate_debug_info): Likewise.
114 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
116 2003-03-28 H.J. Lu <hjl@gnu.org>
118 * elflink.h (elf_link_add_object_symbols): Correctly combine
121 2003-03-27 Jakub Jelinek <jakub@redhat.com>
123 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
124 to -1 before recomputing got offsets.
126 2003-03-26 Andreas Schwab <schwab@suse.de>
128 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
129 (elf_m68k_relocate_section): Use it to correctly handle symbols
131 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
132 entries for symbols that are forced to be local.
134 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
136 * elfxx-mips.c (_bfd_mips_relax_section): New function.
137 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
138 * elfn32-mips.c, elf64-mips.c: Use it.
140 2003-03-25 Stan Cox <scox@redhat.com>
141 Nick Clifton <nickc@redhat.com>
143 Contribute support for Intel's iWMMXt chip - an ARM variant:
145 * archures.c: Add bfd_mach_arm_iWMMXt.
146 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
147 * bfd-in2.h: Regenerate.
148 * libbfd.h: Regenerate.
149 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
150 object files to be linked with XScale ones.
151 (coff_arm_final_link_postscript): Update note section.
152 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
153 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
154 after identifying a coff binary.
155 * cpu-arm.c (processors): Add iWMMXt.
156 (arch_inf): Likewise.
157 * elf32-arm.h (arm_object_p): Handle note section.
158 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
159 be linked with XScale ones.
160 (elf32_arm_section_flags): New function: Set flags on note section.
161 (elf32_arm_final_write_processing): Handle note section.
163 2003-03-21 DJ Delorie <dj@redhat.com>
165 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
166 _bfd_elf_rela_local_sym.
168 2003-03-20 H.J. Lu <hjl@gnu.org>
170 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
173 2003-03-20 Nick Clifton <nickc@redhat.com>
175 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
176 $idata5 in case bfd_coff_final_link is not called.
178 2003-03-19 Jakub Jelinek <jakub@redhat.com>
180 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
182 (canon_reloc_count): Define.
183 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
184 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
186 (sparc64_elf_canonicalize_reloc): New routine.
187 (bfd_elf64_canonicalize_reloc): Define.
189 2003-03-18 Jakub Jelinek <jakub@redhat.com>
191 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
192 againt mergeable sections. Take r_addend into account when caching
195 2003-03-18 Richard Henderson <rth@redhat.com>
197 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
198 local symbols that have no dyninfo.
200 2003-03-14 Gene Smith <gene.smith@siemens.com>
202 * ieee.c (ieee_write_expression): Handle the case where symbol is
204 General formatting improvements.
206 2003-03-13 Nick Clifton <nickc@redhat.com>
208 * configure.in (LINGUAS): Add zh_CN.
209 * configure: Regenerate.
210 * po/zh_CN.po: New file.
212 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
214 * aout-cris.c (BYTES_IN_WORD): Don't define.
215 aout-encap.c: Likewise.
216 aout-ns32k.c: Likewise.
217 aout-tic30.c: Likewise.
218 hp300bsd.c: Likewise.
219 i386aout.c: Likewise.
220 i386dynix.c: Likewise.
221 i386linux.c: Likewise.
222 i386lynx.c: Likewise.
223 i386mach3.c: Likewise.
224 m68k4knetbsd.c: Likewise.
225 m68klinux.c: Likewise.
226 m68klynx.c: Likewise.
227 m68knetbsd.c: Likewise.
228 m88kmach3.c: Likewise.
231 sparclinux.c: Likewise.
232 sparclynx.c: Likewise.
233 sparcnetbsd.c: Likewise.
234 vaxbsd.c: Likewise. Fix comment formatting.
236 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
238 * Reverted 2003-03-02's patch.
240 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
242 * elf64-mips.c (mips_elf64_canonicalize_reloc,
243 mips_elf64_get_dynamic_reloc_upper_bound,
244 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
245 (bfd_elf64_get_canonicalize_reloc,
246 bfd_elf64_get_dynamic_reloc_upper_bound,
247 bfd_elf64_canonicalize_dynamic_reloc): Define.
248 (mips_elf64_slurp_reloc_table): Support dynamic.
249 (mips_elf64_slurp_one_reloc_table): Adjust.
251 2003-03-12 Nick Clifton <nickc@redhat.com>
253 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
254 'index' to 'offset' in test for zero value.
256 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
258 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
259 dynamic relocations pointing to local or section symbols, use the
260 NULL symbol instead. Document the choice to not emit an
261 additional R_MIPS_64 relocation.
263 2003-03-11 Alan Modra <amodra@bigpond.net.au>
265 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
266 zero index dynamic tls relocs generated for the GOT. Tidy code.
267 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
268 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
270 2003-03-07 Alan Modra <amodra@bigpond.net.au>
272 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
275 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
276 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
277 ELF_LINK_NON_GOT_REF from weakdef.
278 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
279 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
280 ELF_LINK_NON_GOT_REF from weakdef.
281 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
282 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
283 ELF_LINK_NON_GOT_REF from weakdef.
285 2003-03-06 Jakub Jelinek <jakub@redhat.com>
286 Andrew Haley <aph@redhat.com>
288 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
289 output is relocateable.
291 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
293 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
296 2003-03-06 Alan Modra <amodra@bigpond.net.au>
298 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
300 (ELIMINATE_COPY_RELOCS): Define to zero.
301 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
302 TLSLD relocs. Report reloc types on a number of errors. Optimize
303 LOCAL24PC check for non-local syms. Don't capitalize error messages.
304 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
305 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
306 calculating TLSLD relocs. Report reloc types on a number of errors.
307 Don't capitalize error messages.
309 2003-03-03 H.J. Lu <hjl@gnu.org>
311 * elfxx-ia64.c (USE_BRL): Removed.
314 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
316 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
317 relocation (no special function), and make it non-partial_inplace.
318 (sh_elf_relax_section): When creating a bsr, use a consistent value
319 no matter if the symbol is extern or not; set addend to -4.
320 Don't swap load / non-load instructions for SH4.
321 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
322 rather than if the symbol is external to determine if adjusting the
323 offset makes sense. Adjust the addend too if appropriate.
324 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
327 2003-03-03 Nick Clifton <nickc@redhat.com>
329 * po/da.po: Installed latest translation.
331 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
333 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
334 R_MIPS_PC16 to rightshift 2.
335 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
336 (bfd_elf32_bfd_reloc_type_lookup): Support
337 BFD_RELOC_MIPSEMB_16_PCREL_S2.
338 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
339 R_MIPS_PC16 to rightshift 2.
340 (mips_elf64_howto_table_rela): Likewise.
341 (mips_reloc_map): Map to rightshifted BFD reloc.
342 * elfn32-mips.c: The same as in elf64-mips.c.
343 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
344 (mips_elf_calculate_relocation): Handle rightshifted addends for
346 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
347 MIPS Embedded PIC. Remove superfluous empty COMMENT.
348 * libbfd.h: Regenerate.
349 * bfd-in2.h: Regenerate.
351 2003-02-28 Richard Henderson <rth@redhat.com>
353 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
354 for ltoff22x relaxation.
356 2003-03-01 Alan Modra <amodra@bigpond.net.au>
358 * bfd-in.h (_bfd): Don't define.
359 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
361 * bfd-in2.h: Regenerate.
363 2003-02-27 Richard Henderson <rth@redhat.com>
365 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
366 (elfNN_ia64_check_relocs): Set it.
367 (allocate_global_data_got): Check it.
368 (allocate_local_got): Likewise.
369 (allocate_dynrel_entries): Likewise.
370 (elfNN_ia64_relax_ldxmov): New.
371 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
372 (elfNN_ia64_choose_gp): Split out from ...
373 (elfNN_ia64_final_link): ... here.
375 2003-02-27 Andrew Cagney <cagney@redhat.com>
377 * bfd.c (struct bfd): Rename "struct _bfd".
378 * bfd-in.h: Update copyright.
379 (struct bfd): Rename "struct _bfd".
380 (_bfd): Define for backward compatibility.
381 * bfd-in2.h: Regenerate.
383 2003-02-25 Alan Modra <amodra@bigpond.net.au>
385 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
386 and rel_hdr2 when initially counting input relocs rather than after
387 creating output reloc sections.
388 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
391 * Makefile.am: Run "make dep-am".
392 * Makefile.in: Regenerate.
394 2003-02-24 Kris Warkentin <kewarken@qnx.com>
396 * elf.c (elfcore_read_notes): Add check for QNX style core file.
397 (elfcore_grog_nto_note): New function.
398 (elfcore_grog_nto_gregs): New function.
399 (elfcore_grog_nto_status): New function.
401 2003-02-24 Alan Modra <amodra@bigpond.net.au>
403 * elflink.c (_bfd_elf_create_got_section): Check existing .got
404 section flags before concluding that we've already been called.
405 Don't use register keyword.
406 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
407 (_bfd_elf_create_linker_section): Formatting.
409 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
411 * coff-h8300.c: Fix typo: intial -> initial.
412 * coff-ppc.c: Likewise.
414 2003-02-20 Alan Modra <amodra@bigpond.net.au>
416 * elf32-ppc.c: Formatting.
417 (allocate_dynrelocs): LD and GD relocs against the same sym need
418 separate GOT entries.
419 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
422 2003-02-19 Alan Modra <amodra@bigpond.net.au>
424 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
425 removal. Localize vars. Remove unnecessary dynobj test.
426 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
428 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
430 (elf_i386_relocate_section): Likewise.
431 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
432 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
433 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
434 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
435 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
436 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
437 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
438 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
441 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
442 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
444 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
445 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
446 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
447 and optimize. Use ELIMINATE_COPY_RELOCS.
448 (ppc64_elf_relocate_section): Likewise.
450 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
451 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
452 (ELIMINATE_COPY_RELOCS): Define.
453 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
454 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
455 (MUST_BE_DYN_RELOC): Define.
456 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
457 and optimize. Trim dyn_relocs.
458 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
459 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
460 track of pc_rel dyn relocs.
461 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
462 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
463 allocate_dynrelocs. Don't recalculate "sec".
465 2003-02-18 Alan Modra <amodra@bigpond.net.au>
467 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
468 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
469 on invalid LD relocs.
470 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
471 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
472 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
474 * elf32-ppc.h: New file.
475 * elf32-ppc.c: Include elf32-ppc.h.
476 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
477 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
478 Add "tls_mask" field.
479 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
480 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
481 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
482 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
483 Make use of htab shortcuts throughout file.
484 (ppc_elf_link_hash_newfunc): Init tls_mask field.
485 (ppc_elf_link_hash_table_create): Init new fields.
486 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
487 (ppc_elf_howto_raw): Add tls relocs.
488 (ppc_elf_reloc_type_lookup): Handle them.
489 (ppc_elf_unhandled_reloc): New function.
490 (ppc_elf_create_got): Stash got section pointer in hash table,
491 return status. Make .rela.got too.
492 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
493 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
494 NON_GOT_REF set. Don't allocate space in .plt here..
495 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
496 not allocating plt entries unnecessarily. Allocate got entries here.
497 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
498 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
499 "info" during allocate_dynrelocs hash traversal. Use htab section
500 shortcuts rather than searching for named sections. Get rid of
501 "plt" and "strip" booleans.
502 (update_local_sym_info, bad_shared_reloc): New functions.
503 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
504 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
505 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
506 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
507 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
508 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
509 relocs that might use a plt entry. Set NON_GOT_REF too.
510 Enumerate all do-nothing relocs.
511 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
512 tls relocs and all plt relocs.
513 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
514 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
515 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
517 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
518 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
519 entries and got relocs here. Warn on non-zero got reloc addend.
520 Split out branch taken/not taken reloc code into a separate switch
521 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
522 Split out HA reloc adjustments to separate switch statement. Don't
523 warn on reloc overflow if we've already warned about undefined.
524 Don't rebuild sym name when reporting errors. Report all possible
525 errors from _bfd_final_link_relocate.
526 (bfd_elf32_bfd_final_link): Don't define.
528 2003-02-18 Alan Modra <amodra@bigpond.net.au>
530 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
531 rebuild sym name when reporting errors.
533 2003-02-17 Nick Clifton <nickc@redhat.com>
535 * elflink.h (elf_link_output_extsym): Only check
536 allow_shlib_undefined for shared libraries.
537 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
538 of allow_shlib_undefined.
539 * elf32-cris.c (cris_elf_relocate_section): Likewise.
540 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
541 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
542 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
543 * elf32-s390.c (elf_s390_relocate_section): Likewise.
544 * elf32-sh.c (sh_elf_relocate_section): Likewise.
545 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
546 * elf32-vax.c (elf_vax_relocate_section): Likewise.
547 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
548 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
549 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
550 * elf64-s390.c (elf_s390_relocate_section): Likewise.
551 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
552 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
553 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
554 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
556 2003-02-17 Nick Clifton <nickc@redhat.com>
558 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
559 address field to use in the comparison.
560 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
562 2003-02-14 Bob Wilson <bob.wilson@acm.org>
564 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
565 backends when checking if the generic ELF target should be used.
567 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
568 outside of functions, treat values as absolute addresses.
570 * bfd.c: Change embedded documentation to use consistent indentation
571 and to split up long lines. Change informal style of description
572 for functions lacking real documentation.
573 * coffcode.h: Break up long lines in embedded documentation.
574 * format.c: Likewise.
575 * targets.c: Likewise.
576 * libcoff.h: Regenerate.
577 * bfd-in2.h: Regenerate.
579 2003-02-14 Alan Modra <amodra@bigpond.net.au>
581 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
582 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
583 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
584 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
585 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
586 (group_sections): Don't share a stub section if stubs are for a large
587 section. Adjust comment.
588 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
589 !stubs_always_before_branch.
590 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
591 treat undefined and undefweak specially when processing dyn relocs.
593 2003-02-13 Jakub Jelinek <jakub@redhat.com>
595 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
597 2003-02-13 Nick Clifton <nickc@redhat.com>
599 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
600 in computation of offset to insert into BL instruction.
602 2003-02-11 Uwe Stieber <uwe@wwws.de>
604 * config.bfd: Add support for kaOS as cross build target system.
606 2003-02-11 Alan Modra <amodra@bigpond.net.au>
608 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
610 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
612 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
614 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
615 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
616 (sh_elf_link_hash_newfunc): Remove the initialization of
618 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
619 for which tls_tpoff32 flag is set.
620 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
621 of the symbol includes the entry matched with the input_section
622 and having tls_tpoff32 flag on. When linking statically, set
623 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
624 is defined in this executable.
625 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
627 2003-02-10 Jakub Jelinek <jakub@redhat.com>
629 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
630 even if there is just non-empty .rela.plt.
632 2003-02-10 Nick Clifton <nickc@redhat.com>
634 * archures.c (bfd_mach_arm_ep9312): Define.
635 * bfd-in2.h: Regenerate.
636 * cpu-arm.c (processors[]): Add ep9312.
637 (bfd_arm_arch): Add ep9312.
638 * elf32-arm.h (elf32_arm_merge_private_data): Update error
639 messages and add test for Maverick floating point support.
640 (elf32_arm_print_private_bfd_data): Handle
641 EF_ARM_MAVERICK_FLOAT flag.
642 (elf32_arm_object_p): New function.
643 (elf_backend_object_p): Define.
645 2003-02-10 Alan Modra <amodra@bigpond.net.au>
647 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
648 variables, structure fields or function params to tls_mask or
649 similar to better reflect usage.
650 (struct got_entry): Comment.
651 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
652 (get_tls_mask): Rename from get_tls_type.
654 2003-02-09 Alan Modra <amodra@bigpond.net.au>
656 * elf64-ppc.c (TLS_GD_LD): Don't define..
657 (TLS_GD): ..define this instead and update all uses.
658 (TLS_TPRELGD): Define.
659 (ppc64_elf_link_hash_table_create): Tweak initialization of
660 init_refcount and init_offset.
661 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
662 Mark second slot of GD or LD toc entries.
663 (get_tls_type): Return an int. Distinguish toc GD and LD entries
664 from other tls types.
665 (ppc64_elf_tls_setup): New function, split out from..
666 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
667 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
668 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
669 return value to properly decide whether toc GD and LD entries can
670 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
671 to determine GD or LD rather than looking at TLS_LD flag. Don't
672 attempt to adjust got entry tls_type here..
673 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
674 look for possible merges.
675 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
677 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
678 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
679 Make use of return value from get_tls_type to properly detect GD and
680 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
681 handle tls_get_addr removal when looking at REL24 relocs, do it when
682 looking at the previous reloc. Check reloc after DTPMOD64 to determine
684 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
686 2003-02-08 Alan Modra <amodra@bigpond.net.au>
688 * elf32-hppa.c (group_sections): Don't share a stub section if
689 stubs are for a large section.
691 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
692 stubs if !stubs_always_before_branch.
694 2003-02-07 Nick Clifton <nickc@redhat.com>
696 * elf.c (swap_out_syms): Generate an error message if an
697 equivalent output section cannot be found for a symbol.
699 2003-02-07 Jakub Jelinek <jakub@redhat.com>
701 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
702 local_got_entries is NULL.
704 2003-02-06 Andreas Schwab <schwab@suse.de>
706 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
707 (read_value): Add parameter is_signed, use signed extraction if
709 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
710 encoding to read_value.
712 2003-02-06 Alan Modra <amodra@bigpond.net.au>
714 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
715 plt info when called to transfer weak sym info.
717 2003-02-05 Alan Modra <amodra@bigpond.net.au>
719 * reloc.c: Add PPC and PPC64 TLS relocs.
720 * libbfd.h: Regenerate.
721 * bfd-in2.h: Regenerate.
722 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
723 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
724 against a 32 bit field.
725 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
726 (_ppc64_elf_section_data): Add t_symndx and comments.
727 (ppc64_elf_section_data): Use elf_section_data macro.
728 (ppc64_elf_new_section_hook): American spelling.
729 (struct got_entry, struct plt_entry): New.
730 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
731 (struct ppc_stub_hash_entry): Add "addend" field.
732 (struct ppc_link_hash_entry): Add "tls_type".
733 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
734 TLS_EXPLICIT): Define.
735 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
736 (link_hash_newfunc): Init new fields.
737 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
739 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
740 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
742 (update_local_sym_info, update_plt_info): New functions.
743 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
744 handling to use got.glist rather than got.refcount. Likewise for PLT.
745 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
746 (func_desc_adjust): Adjust for new PLT list.
747 (ppc64_elf_adjust_dynamic_symbol): Likewise.
748 (get_sym_h, get_tls_type): New functions.
749 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
750 (ppc64_elf_tls_optimize): New function.
751 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
753 (ppc64_elf_size_dynamic_sections): Likewise.
754 (ppc_type_of_stub): Adjust for new PLT list.
755 (ppc_build_one_stub): Likewise.
756 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
758 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
759 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
760 init GOT entries that have a reloc. Generate GOT relocs here..
761 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
762 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
764 2003-02-04 Andreas Schwab <schwab@suse.de>
766 * elf32-m68k.c (elf_m68k_hash_entry): Define.
767 (elf_m68k_link_hash_traverse): Remove.
768 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
769 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
771 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
773 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
774 instead of elf_m68k_link_hash_traverse.
775 (elf_m68k_discard_copies): Change first parameter to pointer to
776 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
777 elf_m68k_link_hash_entry is needed.
779 2003-02-04 Alan Modra <amodra@bigpond.net.au>
781 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
782 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
783 "got" union, and declare as gotplt_union. Use gotplt_uinion for
785 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
786 Add "init_offset" field.
787 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
788 (elf_local_got_ents): Declare.
789 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
791 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
792 (_bfd_elf_link_hash_table_init): Set "init_offset".
793 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
795 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
797 * elf.c (bfd_elf_local_sym_name): Split out from..
798 (group_signature): ..here.
799 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
801 2003-02-04 Alan Modra <amodra@bigpond.net.au>
803 * elf-bfd.h (enum elf_link_info_type): Remove.
804 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
805 to struct sec. Remove linkonce_p field.
806 (elf_linkonce_p): Delete.
807 (elf_discarded_section): Update for sec_info_type change.
808 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
809 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
810 (ELF_INFO_TYPE_NONE): Define.
811 (ELF_INFO_TYPE_STABS): Define.
812 (ELF_INFO_TYPE_MERGE): Define.
813 (ELF_INFO_TYPE_EH_FRAME): Define.
814 (ELF_INFO_TYPE_JUST_SYMS): Define.
815 (STD_SECTION): Update struct sec initializer.
816 * ecoff.c (bfd_debug_section): Likewise.
817 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
818 * elflink.h: Likewise.
819 * elf-eh-frame.c: Likewise.
820 * elf64-alpha.c: Likewise.
821 * elfxx-ia64.c: Likewise.
822 * elfxx-mips.c: Likewise.
823 * bfd-in2.h: Regenerate.
825 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
826 referring to used_by_bfd.
827 * elf64-sparc.c (sec_do_relax): Likewise.
828 * elf64-mmix.c (mmix_elf_section_data): Likewise.
829 * elfxx-mips.c (mips_elf_section_data): Likewise.
830 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
831 (ieee_get_section_contents): Likewise.
832 (ieee_new_section_hook): Formatting.
833 (ieee_canonicalize_reloc): Remove commented out code.
834 * mmo.c (mmo_section_data): Define. Use throughout file.
835 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
837 2003-01-31 Graydon Hoare <graydon@redhat.com>
839 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
840 * Makefile.in: Regenerate.
841 * opncls.c (calc_crc32, get_debug_link_info,
842 seperate_debug_file_exists, find_seperate_debug_file): New
844 (bfd_follow_gnu_debuglink): New function. Follow the pointer
845 contained inside a .gnu_debuglink section.
846 * bfd-in2.h: Regenerate.
848 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
850 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
851 entry->abfd when it's NULL.
853 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
855 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
856 _bfd_elf_section_offset returning -2 the same way as -1.
858 * elfxx-mips.c (mips_elf_multi_got): New function.
859 (struct mips_got_entry): Make symndx and gotidx signed. Moved
860 addend into union along with address and link hash entry.
861 (struct mips_got_info): Added bfd2got and next.
862 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
863 (mips_elf_got_section, mips_elf_create_got_section): Use
864 SEC_EXCLUDE bit to tell whether we really need the got
865 section. Take boolean arguments to disregard an excluded
866 section, or to create it as excluded. Adjust all callers.
867 Use mips_elf_got_section all over.
868 (mips_elf_local_got_index, mips_elf_got_page,
869 mips_elf_got16_entry): Take input bfd as argument, and pass it
870 on to mips_elf_create_local_got_entry.
871 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
872 Take input bfd as argument, and manage entries in the
874 (mips_elf_got_offset_from_index): Take input bfd as argument,
875 and use it to adjust the GP offset of the bfd.
876 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
877 unreferenced GOT entries of global symbols to the end.
878 (mips_elf_record_global_got_symbol): Take input bfd as
879 argument. Add entries to the master GOT hash table.
880 (struct mips_elf_bfd2got_hash): New.
881 (struct mips_elf_got_per_bfd_arg): New.
882 (struct mips_elf_set_global_got_offset_arg): New.
883 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
884 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
885 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
886 mips_elf_merge_gots, mips_elf_set_global_got_offset,
887 mips_elf_resolve_final_got_entry,
888 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
889 mips_elf_got_for_ibfd): New functions.
890 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
891 (MIPS_ELF_GOT_MAX_SIZE): New macro.
892 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
893 (mips_elf_got_entry_hash): Take new fields into account. Use
894 mips_elf_hash_bfd_vma.
895 (mips_elf_got_entry_eq): Take new fields into account.
896 (mips_elf_create_got_section): Initialize new fields.
897 (mips_elf_calculate_relocation): Pass input_bfd to functions
898 that now take it. Adjust gp for the input_bfd.
899 (mips_elf_allocate_dynamic_relocation,
900 mips_elf_create_dynamic_relocation,
901 _bfd_mips_elf_create_dynamic_sections): Use...
902 (mips_elf_rel_dyn_section): New function. Borrow code from...
903 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
904 now take it. Create the got section if needed, even if
905 excluded, before recording a global got symbol. Move some
907 (mips_elf_record_local_got_symbol): New fn.
908 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
909 Compute multi-got global entries offsets. Move GOT code to...
910 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
911 if the GOT is too big.
912 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
913 undefweak symbol to zero. Generate dynamic relocations for
914 non-primary GOT entries for global symbols.
915 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
916 case. Generate dynamic relocations for local got entries.
917 Sort dynamic relocations on N64 too, using...
918 (sort_dynamic_relocs_64): New fns.
919 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
920 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
922 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
924 * bfd.c (struct _bfd): Added id field.
925 * opncls.c (_bfd_id_counter): New static variable.
926 (_bfd_new_bfd): Use it.
927 * bfd-in2.h: Rebuilt.
929 2003-01-25 Alan Modra <amodra@bigpond.net.au>
931 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
933 2003-01-25 Jakub Jelinek <jakub@redhat.com>
935 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
936 (elf32_sparc_rev32_howto): New variable.
937 (sparc_reloc_map): Add TLS relocs.
938 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
940 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
942 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
943 struct elf32_sparc_link_hash_table):
945 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
946 elf32_sparc_hash_table): Define.
947 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
948 create_got_section, elf32_sparc_create_dynamic_sections,
949 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
951 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
953 (elf32_sparc_gc_sweep_hook): Likewise.
954 (elf32_sparc_adjust_dynamic_symbol): Likewise.
955 (elf32_sparc_size_dynamic_sections): Likewise.
956 (elf32_sparc_relocate_section): Likewise.
957 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
959 (elf32_sparc_object_p): Allocate backend private object data.
960 (bfd_elf32_bfd_link_hash_table_create,
961 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
962 elf_backend_can_refcount): Define.
963 (elf_backend_create_dynamic_sections): Define to
964 elf32_sparc_create_dynamic_sections.
965 * reloc.c: Add SPARC TLS relocs.
966 * bfd-in2.h, libbfd.h: Rebuilt.
967 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
968 (sparc_reloc_map): Likewise.
970 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
972 * bfd-in2.h: Regenerate.
973 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
974 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
975 (elf_howto_table): Add TLS relocs.
976 (elf_s390_reloc_type_lookup): Likewise.
977 (elf_s390_link_hash_entry): Add tls_type.
978 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
980 (elf_s390_link_hash_table): Add tls_ldm_got.
981 (link_hash_newfunc): Initialize tls_type.
982 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
983 (elf_s390_copy_indirect_symbol): Copy tls_type information.
984 (elf_s390_check_relocs): Support TLS relocs.
985 (elf_s390_gc_sweep_hook): Likewise.
986 (allocate_dynrelocs): Likewise.
987 (elf_s390_size_dynamic_sections): Likewise.
988 (elf_s390_relocate_section): Likewise.
989 (elf_s390_finish_dynamic_symbol): Likewise.
990 (bfd_elf32_mkobject): Define for TLS.
991 * elf64-s390.c: Same changes as for elf32-s390.c.
992 * libbfd.h: Regenerate.
993 * reloc.c: Add s390 TLS relocations.
995 2003-01-24 Charles Lepple clepple.ghz.cc
997 * aclocal.m4: Fix name of --enable-install-libbfd switch.
999 2003-01-23 Nick Clifton <nickc@redhat.com>
1003 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
1005 * archures.c (bfd_mach_sh2e): Added.
1006 * bfd-in2.h: Rebuilt.
1007 * cpu-sh.c (arch_info_struct): Added SH2e.
1008 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1010 2003-01-23 Alan Modra <amodra@bigpond.net.au>
1012 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
1013 dynindx to an int. Rearrange for better packing.
1014 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1015 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1016 * elf32-sh64.h: New. Split out from include/elf/sh.h.
1017 (struct _sh64_elf_section_data): New struct.
1018 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1019 * elf32-sh64-com.c: Include elf32-sh64.h.
1020 * elf32-sh64.c: Likewise.
1021 (sh64_elf_new_section_hook): New function.
1022 (bfd_elf32_new_section_hook): Define.
1023 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1024 (sh64_bfd_elf_copy_private_section_data): Likewise.
1025 (sh64_elf_final_write_processing): Likewise.
1026 * elf32-sparc.c (struct elf32_sparc_section_data): New.
1027 (elf32_sparc_new_section_hook): New function.
1028 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1029 (sec_do_relax): Define.
1030 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1031 (elf32_sparc_relocate_section): Likewise.
1032 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1033 * elf64-mmix.c (struct _mmix_elf_section_data): New.
1034 (mmix_elf_section_data): Define. Use throughout file.
1035 (mmix_elf_new_section_hook): New function.
1036 (bfd_elf64_new_section_hook): Define.
1037 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1038 (ppc64_elf_section_data): Define. Use throughout.
1039 (ppc64_elf_new_section_hook): New function.
1040 (bfd_elf64_new_section_hook): Define.
1041 * elf64-sparc.c (struct sparc64_elf_section_data): New.
1042 (sparc64_elf_new_section_hook): New function.
1043 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1044 (sec_do_relax): Define.
1045 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
1046 (sparc64_elf_relocate_section): Likewise.
1047 (bfd_elf64_new_section_hook): Define.
1048 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
1049 * elfxx-mips.c (struct _mips_elf_section_data): New.
1050 (mips_elf_section_data): Define. Use throughout.
1051 (_bfd_mips_elf_new_section_hook): New function.
1052 (mips_elf_create_got_section): Don't alloc used_by_bfd.
1053 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
1054 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
1055 * Makefile.am: Run "make dep-am".
1056 * Makefile.in: Regenerate.
1058 2003-01-21 Richard Henderson <rth@redhat.com>
1060 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
1061 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
1062 (elf64_alpha_adjust_dynamic_symbol): Set them.
1063 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
1064 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
1065 symbol index when relaxing LDM to TPREL.
1066 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
1067 relocs, even if the target isn't locally defined.
1068 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
1069 (elf64_alpha_relocate_section): Likewise. Force TP-relative
1070 relocs vs symndx 0 to the tp base.
1072 2003-01-21 Fabio Alemagna <falemagn@aros.org>
1074 * config.bfd: Handle i[3456]86-*-aros*.
1076 2003-01-21 Andreas Schwab <schwab@suse.de>
1078 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1079 (struct ppc_elf_link_hash_entry): Define.
1080 (ppc_elf_hash_entry): New function.
1081 (struct ppc_elf_link_hash_table): Define.
1082 (ppc_elf_hash_table): New function.
1083 (ppc_elf_link_hash_newfunc): New function.
1084 (ppc_elf_link_hash_table_create): New function.
1085 (ppc_elf_copy_indirect_symbol): New function.
1086 (allocate_dynrelocs): New function.
1087 (readonly_dynrelocs): New function.
1088 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1089 relocs and determine DT_TEXTREL.
1090 (ppc_elf_check_relocs): Don't do that here, just count the
1092 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1094 (bfd_elf32_bfd_link_hash_table_create): Define.
1095 (elf_backend_copy_indirect_symbol): Define.
1097 2003-01-21 Richard Henderson <rth@redhat.com>
1099 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1100 TPREL also get a reloc if shared. Remove SREL support.
1101 (elf64_alpha_emit_dynrel): New.
1102 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1103 and GOTTPREL relocs to local symbols against the tp base.
1104 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1106 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1107 use count before clobbering r_type.
1108 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1109 ordering would mean dataflow inspection is necessary.
1111 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
1113 * coffcode.h (coff_set_flags): Added get/set arch hooks.
1115 2003-01-20 Fabio Alemagna <falemagn@aros.org>
1117 * elf32-sh.c: Treat elfNN_bed like other macros defined in
1118 elfxx-target.h and #undef it before #define'ing it.
1119 * elf32-i386.c: Likewise.
1120 * elf32-sh64.c: Likewise.
1121 * elf64-alpha.c: Likewise.
1122 * elf64-sh64.c: Likewise.
1124 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1126 * bfd-in2.h: Regenerate.
1127 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1128 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1129 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1130 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1131 R_390_PLTOFF32 and R_390_PLTOFF64.
1132 (elf_s390_reloc_type_lookup): Likewise.
1133 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1134 of GOTPLT references to a function.
1135 (link_hash_newfunc): Initialize gotplt_refcount.
1136 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1137 and creation of the got section out of the main switch. Add support
1138 for the gotoff, gotplt and pltoff relocations.
1139 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1141 (elf_s390_adjust_gotplt): New function.
1142 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1144 (allocate_dynrelocs): Add comment.
1145 (elf_s390_relocate_section): Change r_type to unsigned. Add support
1146 for gotoff, gotplt and pltoff relocations.
1147 * elf64-s390.c: Same changes as for elf32-s390.c.
1148 * libbfd.h: Regenerate.
1149 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1150 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1151 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1152 and BFD_RELOC_390_PLTOFF64.
1154 2003-01-18 Jakub Jelinek <jakub@redhat.com>
1156 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1157 R_IA64_TPREL64[LM]SB against non-global symbol properly.
1159 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1161 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1162 self_dtpmod_done and self_dtpmod_offset.
1163 (allocate_global_data_got): Only use one got entry for all
1164 dtpmod relocs against local symbols.
1165 (allocate_dynrel_entries): Only need .rela.got entry for
1166 dtpmod against global symbol.
1167 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1168 Reserve space in .rela.got for the local dtpmod entry.
1169 (set_got_entry): Initialize the common local dtpmod .got entry.
1170 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1171 and R_IA_64_DTPREL64MSB.
1173 2003-01-16 Alan Modra <amodra@bigpond.net.au>
1175 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1176 (R_PPC_*): Rename all occurrences to R_PPC64_*.
1177 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1178 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1179 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1180 relative relocs, not with absolute ones.
1181 * Makefile.am: Run "make dep-am".
1182 * Makefile.in: Regenerate.
1183 * po/SRC-POTFILES.in: Regenerate.
1185 2003-01-15 Andreas Schwab <schwab@suse.de>
1187 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1188 relocation against a non-allocated readonly section.
1190 2003-01-10 Alan Modra <amodra@bigpond.net.au>
1192 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1193 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
1195 2002-01-08 Klee Dienes <kdienes@apple.com>
1197 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1198 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1199 * Makefile.in: Regenerate.
1201 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
1203 * elfn32-mips.c (prev_reloc_section): New.
1204 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
1205 (SET_RELOC_ADDEND): Parenthesize macro argument.
1207 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
1209 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1210 adjust addil instructions if the symbol has no section.
1212 2003-01-07 DJ Delorie <dj@redhat.com>
1214 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1217 2003-01-07 Andreas Schwab <schwab@suse.de>
1219 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1220 PC relative relocations.
1221 (elf_m68k_discard_copies): Set it here instead.
1223 2002-01-02 Ben Elliston <bje@redhat.com>
1224 Jeff Johnston <jjohnstn@redhat.com>
1226 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1227 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1228 (BFD32_BACKENDS): Add elf32-iq2000.lo.
1229 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1230 (cpu-iq2000.lo): New target.
1231 * Makefile.in: Regenerate.
1232 * config.bfd: Handle iq2000-*-elf.
1233 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1234 (bfd_archures_list): Add bfd_iq2000_arch.
1235 * configure.in: Handle bfd_elf32_iq2000_vec.
1236 * configure: Regenerate.
1237 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
1238 and BFD_RELOC_IQ2000_UHI16.
1239 * targets.c (bfd_elf32_iq2000_vec): Declare.
1240 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1241 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1242 * cpu-iq2000.c: New file.
1243 * elf32-iq2000.c: Likewise.
1244 * libbfd.h: Regenerate.
1245 * bfd-in2.h: Likewise.
1247 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
1249 * elfxx-mips.c: Include libiberty.h.
1250 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1251 (mips_set_isa_flags): New function, split out from...
1252 (_bfd_mips_elf_final_write_processing): ...here. Only call
1253 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1254 (mips_mach_extensions): New array.
1255 (mips_32bit_flags_p): New function.
1256 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1257 Use mips_32bit_flags_p to check if one binary is 32-bit and the
1258 other is 64-bit. When adopting IBFD's architecture, adopt the
1259 bfd_mach as well as the flags.
1261 2003-01-02 Nick Kelsey <nickk@ubicom.com>
1263 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1264 fix internal errors, fix bad code generation, fix incorrect stabs
1265 information, and improve ability to eliminate redundant page
1266 instructions. Added code to ip2k_final_link_relocate to self-verify
1267 the linker relaxation. Fix formatting problems.
1269 2002-12-30 Chris Demetriou <cgd@broadcom.com>
1271 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1272 * archures.c (bfd_mach_mipsisa32r2): New define.
1273 * bfd-in2.h: Regenerate.
1274 * cpu-mips.c (I_mipsisa32r2): New enum value.
1275 (arch_info_struct): Add entry for I_mipsisa32r2.
1276 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1277 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1278 (_bfd_mips_elf_final_write_processing): Add
1279 bfd_mach_mipsisa32r2 case.
1280 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1281 binaries marked as using MIPS32 Release 2.
1283 2002-12-30 Dmitry Diky <diwil@mail.ru>
1285 * Makefile.am: Add msp430 target.
1286 * configure.in: Likewise.
1287 * Makefile.in: Regenerate.
1288 * configure: Regenerate.
1289 * archures.c: Add msp430 architecture vector.
1290 * config.bfd: Likewise.
1291 * reloc.c: Add msp430 relocs.
1292 * targets.c: Add msp320 target.
1293 * cpu-msp430.c: New file: msp430 cpu detection.
1294 * elf32-msp430.c: New file: msp430 reloc processing.
1295 * bfd-in2.h: Regenerate.
1296 * libbfd.h: Regenerate.
1298 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1300 * elf.c (elf_sort_sections): Don't reorder .tbss.
1301 (assign_file_positions_for_segments): Only adjust off/voff
1302 for increased alignment in PT_LOAD or PT_NOTE segment,
1303 but adjust p_filesz for .tbss too. in PT_LOAD consider
1304 .tbss to have zero memory size.
1305 (copy_private_bfd_data) [SECTION_SIZE]: Define.
1306 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
1307 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
1308 into PT_TLS segment. Never put SHF_TLS sections in
1309 segments other than PT_TLS or PT_LOAD.
1311 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
1314 2002-12-23 DJ Delorie <dj@redhat.com>
1316 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
1318 2002-12-23 Alan Modra <amodra@bigpond.net.au>
1320 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
1322 2002-12-23 Nick Clifton <nickc@redhat.com>
1324 * archures.c (bfd_arch_get_compatible): Add third parameter
1325 'accept_unknowns'. Only accept unknown format BFDs if
1326 accept_unknowns is true, or if the format is "binary".
1327 * bfd-in2.h: Regenerate.
1329 2002-12-21 Nick Clifton <nickc@redhat.com>
1331 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
1332 that subtracted 8 from pc relative relocations.
1334 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1336 * coff-h8300.c: Fix comment typos.
1337 * coffcode.h: Likewise.
1338 * cpu-cris.c: Likewise.
1339 * elf32-vax.c: Likewise.
1340 * genlink.h: Likewise.
1341 * linker.c: Likewise.
1343 * tekhex.c: Likewise.
1344 * vms-misc.c: Likewise.
1346 2002-12-20 DJ Delorie <dj@redhat.com>
1348 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
1349 * libbfd.h: Regenerate.
1350 * bfd-in2.h: Regenerate.
1351 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
1352 (xstormy16_reloc_map): Add R_XSTORMY16_12.
1354 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
1356 * doc/bfdint.texi: Fix typos.
1358 2002-12-20 Paul Eggert <eggert@twinsun.com>
1360 Port to POSIX 1003.1-2001.
1361 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
1362 * configure.in (build-warnings): Likewise.
1363 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
1364 * aclocal.m4: Regenerate.
1365 * config.in: Regenerate.
1366 * configure: Regenerate.
1368 2002-12-19 Alan Modra <amodra@bigpond.net.au>
1370 * coff-h8300.c: Include libiberty.h.
1371 (h8300_reloc16_extra_cases): Check the hash table creator before
1372 referencing h8300 specific fields. Stash the hash table pointer
1373 in a local var. Comment typo fixes.
1374 (h8300_bfd_link_add_symbols): Likewise.
1376 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
1378 * bfd-in2.h: Regenerate.
1380 2002-12-18 Alan Modra <amodra@bigpond.net.au>
1382 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
1383 code a little. Comment on dynamic relocs against section symbols.
1385 2002-12-17 Roger Sayle <roger@eyesopen.com>
1387 * configure.host (ia64-*-hpux*): Support 64 bit targets using
1388 the HP compiler's "long long".
1390 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
1392 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
1393 and R_XSTORMY16_HI16) howto entries.
1394 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1395 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
1396 determine the start of the second reloc table.
1398 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
1400 * ecofflink.c: Fix the reading of the debugging information
1401 of Tru64/Alpha binaries that are produced by recent Compaq
1403 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
1405 (lookup_line): Because of the strange information sometimes
1406 generated by Compaq's recent compilers, change how the FDR
1407 table is searched so that PDRs (procedure descriptors) are
1408 correctly found. Note that this change is really more of a hack;
1409 however, I have included extensive documentation as to why
1410 this is the best solution short of an extensive rewrite or
1412 (fdrtab_lookup): Add comments to explain the algorithm.
1414 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1416 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
1417 initializers to match struct declaration.
1419 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1421 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
1422 * elf.c (get_program_header_size): Likewise.
1423 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
1424 (m32r_elf_generic_reloc): Likewise.
1425 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
1426 * elflink.h (elf_bfd_discard_info): Likewise.
1428 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1430 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
1431 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
1432 DT_RELSZ adjustment, not output section. Avoid writing tags when
1433 unchanged. Don't assume linker script is sane, adjust DT_REL too.
1434 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
1435 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
1436 DT_RELASZ adjustment, not output section. Avoid writing tags when
1437 unchanged. Adjust DT_RELA.
1438 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
1439 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
1441 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1443 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
1446 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1448 * elfxx-mips.c (struct mips_got_entry): New.
1449 (struct mips_got_info): Added got_entries field.
1450 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
1451 (mips_elf_local_got_index, mips_elf_got_page,
1452 mips_elf_got16_entry): Re-implement in terms of new...
1453 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
1455 (mips_elf_highest): Warning clean-up.
1456 (mips_elf_create_got_section): Initialize got_entries.
1457 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
1459 (_bfd_mips_elf_size_dynamic_sections): Do not account for
1460 GOT_PAGE entries, since we now reuse GOT16 entries.
1462 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
1464 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
1465 read-only section that lies after .text and before .data to be
1466 written into the output file and included in a_text.
1467 (translate_to_native_sym_flags): If an otherwise unrepresentable
1468 section was merged with .text, convert its symbols to N_TEXT
1470 * libaout.h (aout_section_merge_with_text_p): New macro.
1472 2002-12-08 Alan Modra <amodra@bigpond.net.au>
1474 * bfd-in.h: Comment typo fix. Formatting.
1475 * bfd-in2.h: Regenerate.
1476 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
1477 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
1478 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
1480 2002-12-05 Richard Henderson <rth@redhat.com>
1482 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
1483 Only send PCREL21B though the plt. Fix installed reloc type.
1484 (elfNN_ia64_relocate_section): Give error for dynamic reloc
1485 against PCREL22 or PCREL64I; clean up error messages for
1488 2002-12-04 Kevin Buettner <kevinb@redhat.com>
1490 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
1492 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1494 2002-12-04 David Mosberger <davidm@hpl.hp.com>
1496 * cpu-ia64-opc.c: Add operand constant "ar.csd".
1498 2002-12-04 H.J. Lu <hjl@gnu.org>
1500 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
1501 BFD address when constructing local name.
1503 2002-12-04 Andreas Schwab <schwab@suse.de>
1505 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
1507 (elf_m68k_link_hash_table_create): Initialize it.
1508 (elf_m68k_check_relocs): Handle symbols that are forced to be
1509 local due to visibility changes.
1510 (elf_m68k_adjust_dynamic_symbol): Likewise.
1511 (elf_m68k_size_dynamic_sections): Likewise.
1512 (elf_m68k_discard_copies): Likewise.
1513 (elf_m68k_relocate_section): Likewise.
1515 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1517 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
1519 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1521 * srec.c (srec_write_symbols): Restore '$' prefix to address
1522 accidentally removed in 2002-04-04 change.
1523 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
1525 2002-12-03 Nick Clifton <nickc@redhat.com>
1527 * elf32-ppc.c (apuinfo_list_init): New function.
1528 (apuinfo_list_add): New function: Add a value to the list.
1529 (apuinfo_list_length): New function: Return the number of
1531 (apuinfo_list_element): New function: Return a value on the
1533 (apuinfo_list_finish): New function: Free the resources used
1535 (ppc_elf_begin_write_processing): New function. Scan the
1536 input bfds for apuinfo sections.
1537 (ppc_elf_write_section): New function: Delay the creation of
1538 the contents of an apuinfo section in an output bfd.
1539 (ppc_elf_final_write_processing): New function. Create the
1540 contents of an apuinfo section in an output bfd.
1541 (elf_backend_begin_write_processing): Define.
1542 (elf_backend_final_write_processing): Define.
1543 (elf_backend_write_section): Define.
1545 2002-12-03 Richard Henderson <rth@redhat.com>
1547 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
1549 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1551 Fix PR savannah/1417:
1552 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
1553 branch if it goes to the start of the deleted region.
1555 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1557 * bfd-in2.h (bfd_mach_m6812): Rebuild.
1558 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
1559 bfd_mach_m6812s): Declare.
1561 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
1562 (_bfd_m68hc12_elf_set_private_flags): Call it.
1563 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
1564 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
1565 report microcontroller incompatibilities (HC12 vs HCS12).
1566 (elf_backend_object_p): Update.
1568 2002-11-30 Alan Modra <amodra@bigpond.net.au>
1570 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
1571 (enum bfd_boolean, boolean): Delete.
1572 (bfd_boolean): Typedef to an int.
1573 (FALSE, TRUE): Define.
1574 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
1575 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
1576 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
1577 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
1578 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
1579 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
1580 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
1581 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
1582 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
1583 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
1584 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
1585 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
1586 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
1587 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
1588 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
1589 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
1590 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
1591 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
1592 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
1593 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
1594 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
1595 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
1596 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
1597 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
1598 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
1599 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1600 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1601 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1602 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
1603 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1604 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1605 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1606 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
1607 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
1608 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1609 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
1610 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
1611 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
1612 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
1613 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
1614 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
1615 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
1616 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
1617 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
1618 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
1619 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
1620 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
1621 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
1622 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
1623 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
1624 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
1625 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
1626 of bfd_boolean vars with TRUE/FALSE. Formatting.
1627 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
1629 2002-11-28 Alan Modra <amodra@bigpond.net.au>
1631 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
1632 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
1633 with Elf_Internal_Rela.
1634 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
1635 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
1636 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
1637 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1638 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1639 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1640 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
1641 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1642 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1643 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
1644 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
1645 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
1647 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
1648 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
1649 Remove INLINE keyword.
1650 (elf_swap_reloc_in): Likewise. Also clear r_addend.
1651 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
1653 (elf_write_relocs): Consolidate REL and RELA code.
1654 (elf_slurp_reloc_table_from_section): Simplify REL code.
1655 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
1656 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
1657 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
1659 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
1660 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
1661 (elf_link_output_relocs): Likewise.
1662 (elf_reloc_link_order): Likewise.
1663 (elf_finish_pointer_linker_section): Likewise.
1664 (struct elf_link_sort_rela): Remove union.
1665 (elf_link_sort_cmp1): Update to suit.
1666 (elf_link_sort_cmp2): Here too.
1667 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
1668 over-allocation for int_rels_per_ext_rel != 1 case.
1669 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
1670 * elf32-i386.c: Likewise.
1671 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
1672 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
1673 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
1674 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
1675 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1676 elf64-sparc.c, elf64-x86-64.c: Likewise.
1677 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
1678 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
1679 bfd_elf32_swap_reloc_in.
1681 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
1682 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
1683 (mips_elf64_swap_reloc_in): Zero r_addend.
1684 (mips_elf64_be_swap_reloc_in): Likewise.
1685 (mips_elf64_slurp_one_reloc_table): Simplify.
1687 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
1688 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1689 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1691 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1693 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
1694 unresolved debugging relocs in dynamic applications.
1695 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1697 2002-11-26 Alan Modra <amodra@bigpond.net.au>
1699 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
1700 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
1701 on a relocatable link. Comment typos.
1702 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
1703 in the order they are declared. Clear elf_hash_value too.
1704 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
1705 eh_info and tls_segment.
1706 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
1707 sorted when discarding relocs by turning them into R_*_NONE.
1709 * libbfd.c (warn_deprecated): Comment spelling.
1710 * po/SRC-POTFILES.in: Regenerate.
1712 2002-11-21 Richard Henderson <rth@redhat.com>
1714 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
1715 arch's st_other bits when merging visibilities.
1716 (elf_link_output_extsym): Tidy clearing of visibility field.
1718 2002-11-21 Alan Modra <amodra@bigpond.net.au>
1720 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
1721 (SWAP_OUT_RELOC_OFFSET): Define.
1723 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
1725 * elf.c (_bfd_elf_link_hash_table_init): Make sure
1726 can_refcount is properly extended to the type of
1729 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
1731 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
1732 (_bfd_mips_elf_relocate_section): Use it.
1734 * elfxx-mips.c (MNAME): New macro.
1735 (_bfd_mips_elf_check_relocs): Use it.
1736 (_bfd_mips_elf_discard_info): Likewise.
1737 (_bfd_mips_elf_final_link): Likewise.
1739 2002-11-19 Alan Modra <amodra@bigpond.net.au>
1741 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
1742 rel_hdr.sh_size too.
1744 2002-11-18 Klee Dienes <kdienes@apple.com>
1746 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
1747 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
1748 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
1749 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
1750 Add dependencies for bfdwin.c, bfdio.c.
1751 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
1752 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
1753 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
1754 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
1755 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
1756 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
1757 bfd_get_size (moved from libbfd.c and bfd.c).
1758 * bfdwin.c New file. Contains _bfd_window_internal,
1759 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
1760 libbfd.c and bfd.c).
1761 * po/SRC-POTFILES.in: Regenerate.
1762 * po/bfd.pot: Regenerate.
1763 * libbfd.h: Regenerate.
1764 * bfd-in2.h: Regenerate.
1765 * aclocal.m4: Regenerate.
1766 * Makefile.in: Regenerate.
1767 * configure: Regenerate.
1769 2002-11-18 Klee Dienes <kdienes@apple.com>
1771 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
1773 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
1775 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
1776 jsr after a short jump.
1777 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1779 2002-11-15 Klee Dienes <kdienes@apple.com>
1781 * pef.c (bfd_pef_convert_architecture): Move declaration of
1782 ARCH_POWERPC and ARCH_M68K to the start of the function.
1784 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
1786 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
1788 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
1790 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
1791 For bpo_gregs_section->contents, allocate _raw_size, not
1794 2002-11-13 Klee Dienes <kdienes@apple.com>
1796 * config.bfd: Add entries for powerpc-*-darwin and cousins.
1798 2002-11-13 H.J. Lu <hjl@gnu.org>
1800 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
1802 2002-11-13 Klee Dienes <kdienes@apple.com>
1803 Alan Modra <amodra@bigpond.net.au>
1805 * bfd.c (struct bfd_preserve): New.
1806 (bfd_preserve_save): New function.
1807 (bfd_preserve_restore): Ditto.
1808 (bfd_preserve_finish): Ditto.
1809 * bfd-in2.h: Regenerate.
1810 * mach-o.c: Formatting.
1811 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
1812 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
1813 (bfd_mach_o_core_p): Ditto.
1814 (bfd_mach_o_scan): Pass in mdata.
1815 * mach-o.h (bfd_mach_o_scan): Update prototype.
1816 * pef.c: Formatting.
1817 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
1818 (bfd_pef_xlib_object_p): Ditto.
1819 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
1820 * pef.h (bfd_pef_scan): Update prototype.
1821 * xsym.c: Formatting, K&R fixes.
1822 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
1823 (bfd_sym_scan): New function split out from bfd_sym_object_p.
1824 * xsym.h (bfd_sym_scan): Declare.
1825 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
1826 * elfcore.h (elf_core_file_p): Likewise.
1827 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
1829 2002-11-12 Nick Clifton <nickc@redhat.com>
1831 * po/da.po: Updated Danish translation.
1833 2002-11-12 Alan Modra <amodra@bigpond.net.au>
1835 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
1836 relocatable link too.
1837 (elf_link_input_bfd): When emitting relocs, adjust offsets for
1838 eh_frame and stab sections. Zap deleted relocs.
1839 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
1840 (elf_bfd_discard_info): Run for relocatable link too.
1841 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
1843 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
1844 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
1846 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
1847 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
1848 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
1849 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
1850 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
1851 (struct elf_link_hash_table): Add eh_info.
1852 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
1853 (_bfd_elf_discard_section_eh_frame): Update prototype.
1854 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
1855 (_bfd_elf_write_section_eh_frame): Likewise.
1856 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
1857 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
1858 param. Get "hdr_info" from link hash table.
1859 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
1860 header section from link hash table. Save header section to elf_tdata.
1861 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
1862 header section from link hash table. Don't alloc hdr_info. Clear
1863 hdr_sec instead of setting "strip".
1864 (_bfd_elf_eh_frame_section_offset): Formatting.
1865 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
1866 Get header section from link hash table.
1867 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
1868 Get header section from link hash table.
1869 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
1870 (get_program_header_size): Likewise.
1871 (_bfd_elf_section_offset): Formatting.
1872 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
1873 section pointer in link hash table.
1874 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
1875 and _bfd_elf_write_section_eh_frame calls. Update comment about
1877 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
1878 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
1880 * po/SRC-POTFILES.in: Regenerate.
1882 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
1883 relocs for discarded FDEs. Remove dead code.
1884 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
1885 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
1886 Tidy conditions under which stabs are edited. Formatting.
1887 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1888 from discarded relocs.
1889 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
1890 section adjustments after testing magic values.
1892 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
1894 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
1895 references to large plt symbols.
1897 2002-11-12 Klee Dienes <kdienes@apple.com>
1899 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
1900 looking for an unused section name.
1902 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
1904 * coff-h8300.c: Fix formatting.
1905 * elf32-h8300.c: Likewise.
1906 * reloc16.c: Likewise.
1908 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
1910 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
1911 section when dynamic section unused; _bfd_strip_section_from_output
1914 2002-11-08 Alan Modra <amodra@bigpond.net.au>
1916 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
1919 * dwarf2.c: Revert last change.
1921 2002-11-07 Michal Ludvig <mludvig@suse.cz>
1923 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
1924 _bfd_dwarf2_find_nearest_line): Use
1925 bfd_simple_get_relocated_section_contents() instead of
1926 bfd_get_section_contents().
1927 * reloc.c (bfd_perform_relocation): Add sanity check.
1928 * simple.c (simple_get_relocated_section_contents): If the section
1929 does not have any relocs associated with it, just return the
1930 unadjusted contents.
1932 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
1934 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
1935 case R_CRIS_32_GOT>: Correct test for filling in constant .got
1936 contents, enabling for a non-DSO, for symbols defined in the
1937 program with --export-dynamic.
1939 2002-11-07 Alan Modra <amodra@bigpond.net.au>
1941 * elf64-ppc.c: Comment typo fixes.
1942 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
1944 2002-11-07 Nick Clifton <nickc@redhat.com>
1946 * po/da.po: Updated Danish translation.
1948 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
1950 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
1951 exactly three internal relocs per external reloc. Set reloc_count
1952 to the external reloc count.
1954 2002-11-06 Klee Dienes <kdienes@apple.com>
1956 * coff-stgo32.c (stub_bytes): Mark as const.
1957 Fix comment formatting.
1959 2002-11-06 Klee Dienes <kdienes@apple.com>
1961 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
1963 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
1964 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
1965 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
1966 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
1967 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
1969 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
1970 * Makefile.in: Regenerate.
1971 * doc/Makefile.in: Regenerate.
1972 * bfd-in2.h: Regenerate.
1973 * xsym.c: New file. Contains support for the Apple/Metrowerks
1974 xSYM debugging format.
1976 * pef.c: New file. Contains support for the Apple Code Fragment
1977 Manager Preferred Executable Format
1979 * pef-traceback.h: New file. Contains support for parsing PowerPC
1980 traceback tables as used by PEF executables (and perhaps other
1982 * mach-o.c: New file. Contains support for the Mach-O object file
1984 * mach-o.h: New file.
1985 * mach-o-target.c: New file. Declares the mach-o targets
1986 themselves. Included three times by mach-o.c; each time with a
1987 different set of macros set.
1989 2002-11-06 Graeme Peterson <gp@qnx.com>
1991 * Makefile.am: Remove entries for elf32-qnx.[ch].
1992 * Makefile.in: Regenerate.
1993 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
1994 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
1995 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
1996 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
1997 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
1998 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
1999 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2000 * configure: Regenerate.
2001 * elf32-qnx.c: Remove.
2002 * elf32-qnx.h: Remove.
2003 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2004 is_contained_by_filepos, and copy_private_bfd_data_p.
2005 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2006 is_contained_by_filepos, and copy_private_bfd_data_p.
2007 * elf32-i386.c: Remove QNX extended bfd support.
2008 * elf32-ppc.c: Remove QNX extended bfd support.
2009 * elf32-sh.c: Remove QNX extended bfd support.
2010 * elfarm-nabi.c: Remove QNX extended bfd support.
2011 * targets.c: Remove qnx vectors.
2012 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2013 (elf_backend_is_contained_by_filepos): Remove.
2014 (elf_backend_copy_private_bfd_data_p): Remove.
2015 * po/SRC-POTFILES.in: Regenerate.
2017 2002-11-06 David O'Brien <obrien@FreeBSD.org>
2018 Alan Modra <amodra@bigpond.net.au>
2020 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2021 dynamic relocs against section symbols for the output section vma.
2023 2002-11-05 Alan Modra <amodra@bigpond.net.au>
2025 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2026 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2028 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2029 Alan Modra <amodra@bigpond.net.au>
2031 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2032 vectors in target_selvecs.
2033 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2035 (sh-*-netbsdelf*): Likewise.
2036 * configure.in (assocvecs): New variable. Handle assocvecs like
2038 * configure: Regenerate.
2039 * format.c (bfd_check_format_matches): Store bfd_target pointers
2040 in matching_vector instead of target names. Select first target
2041 from bfd_associated_vector that matches a list of ambiguous targets.
2042 * targets.c (_bfd_associated_vector): New array.
2043 (bfd_associated_vector): New variable.
2044 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
2045 * libbfd-in.h (bfd_associated_vector): Declare.
2046 * libbfd.h: Regenerate.
2048 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
2050 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
2051 non-NULL before dereferencing.
2053 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2055 * vms.c (vms_object_p): Restore the start address when returning
2058 2002-11-04 Alan Modra <amodra@bigpond.net.au>
2059 Hans-Peter Nilsson <hp@axis.com>
2061 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
2062 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
2063 Set up a larger symshndxbuf, and write it out. Free it on
2064 exit rather than freeing symbuf twice. Correct section index
2065 on output section symbol loop.
2066 (elf_link_output_sym): Accumulate symbol extension section
2067 indices, reallocating symshndxbuf rather than writing it out.
2068 (elf_link_flush_output_syms): Don't flush symshndxbuf.
2069 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
2070 Use bfd_zalloc to clear i_shdrp[0] too.
2072 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
2074 * elf32-sh64-com.c (sh64_address_in_cranges): Use
2075 _raw_size of cranges section if _cooked_size not yet set.
2077 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
2079 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2080 for bfd_elf32_swap_symbol_out.
2082 2002-10-31 David O'Brien <obrien@FreeBSD.org>
2084 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2085 signed and unsigned in comparison.
2087 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
2089 * coffcode.h: Remove extraneous '\'.
2091 2002-10-28 H.J. Lu <hjl@gnu.org>
2093 * Makefile.am (targets.lo): Depend on Makefile instead of
2095 (archures.lo): Likewise.
2096 * Makefile.in: Regenerated.
2098 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
2100 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2101 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2104 2002-10-25 Jim Wilson <wilson@redhat.com>
2106 * elf64-sh64.c (sh_elf64_relocate_section): Call
2107 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
2108 of SHF_MERGE section.
2110 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
2112 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2114 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
2116 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2117 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2119 (NAME(aout,final_link)): Cast enum used in assignment.
2120 (aout_link_write_symbols): Cast enums in comparisons, int values to
2121 boolean, enums in assignments to int.
2122 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2123 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
2125 (aout_link_reloc_link_order): Cast enum to int in assignment.
2126 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2128 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2130 * bfd-in2.h (bfd_set_section_vma): Likewise.
2131 * bfd.c (bfd_record_phdr): Cast enums in assignments.
2132 * binary.c (bfd_alloc): Cast enum to long.
2133 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2134 * dwarf2.c (read_abbrevs): Add casts to enum types.
2135 (read_attribute_value): Likewise.
2136 (arange_add): Cast result of bfd_zalloc call.
2137 (comp_unit_contains_address): Return true and false.
2138 (comp_unit_find_nearest_line): Cast return to boolean.
2139 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2140 * gen-aout.c: define macro '_' if not defined.
2141 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2142 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2143 (bfd_write_bigendian_4byte_int): Cast return to boolean.
2144 (bfd_seek): Cast bfd_realloc to bfd_byte *.
2145 (bfd_generic_is_local_label_name): Cast return to boolean.
2146 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2147 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2148 struct bfd_hash_entry *.
2149 (_bfd_generic_link_hash_newfunc): likewise.
2150 (_bfd_generic_final_link): Cast enum to unsigned int.
2151 * merge.c (sec_merge_emit): Cast return to boolean.
2152 (merge_strings): Add casts to const unsigned char *.
2153 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2154 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2155 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2156 struct bfd_hash_entry *.
2157 (bfd_set_section_content): Add cast to PTR in comparison.
2158 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2159 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2160 simple_dummy_unattached_reloc,
2161 bfd_simple_get_relocated_section_contents): Add K&R declarations and
2162 function definitions.
2163 * srec.c (S3Forced): Initialize to false.
2164 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2165 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2166 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
2167 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2168 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2171 2002-10-23 Jakub Jelinek <jakub@redhat.com>
2173 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2174 relocs into shared lib non-allocated reloc sections.
2176 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2178 * dwarf2.c (add_line_info): Ensure that the line_info_table is
2179 sorted even when given an out-of-order line sequence.
2180 (lookup_address_in_line_info_table): When an exact VMA match is
2181 not found, return line information with the closest VMA.
2183 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2185 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
2186 HPUX 11.00 patch PHSS_26559.
2188 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2190 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2191 the options section into a separate section unless IRIX 6
2192 compatibility is enabled.
2194 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2196 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2198 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2199 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
2201 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2202 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2204 2002-10-21 Graeme Peterson <gp@qnx.com>
2206 * targets.c (_bfd_target_vector): Add missing qnx vectors.
2208 2002-10-21 Alan Modra <amodra@bigpond.net.au>
2210 * targets.c (bfd_target_list): Don't return the default target twice.
2212 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
2214 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2215 perror with bfd_perror.
2217 2002-10-19 H.J. Lu <hjl@gnu.org>
2219 * elflink.h (elf_link_add_object_symbols): Correctly handle
2220 DT_RPATH and DT_RUNPATH.
2222 2002-10-19 Mark Kettenis <kettenis@gnu.org>
2224 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2226 2002-10-17 Denis Chertykov <denisc@overta.ru>
2228 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2231 2002-10-17 Alan Modra <amodra@bigpond.net.au>
2233 * elfxx-target.h (USE_REL): Don't define as 1.
2234 * elf32-arm.h (USE_REL): Provide a default define of 0.
2235 Use #if rather than #ifdef when testing USE_REL.
2236 * elf32-m32r.c: Likewise.
2238 * elf32-arc.c (USE_REL): Define as 1.
2239 * elf32-d10v.c (USE_REL): Likewise.
2240 * elf32-m32r.c (USE_REL): Likewise.
2241 * elf32-m68hc11.c (USE_REL): Likewise.
2242 * elf32-m68hc12.c (USE_REL): Likewise.
2243 * elf32-or32.c (USE_REL): Likewise.
2244 * elfarm-nabi.c (USE_REL): Likewise.
2246 2002-10-16 Jakub Jelinek <jakub@redhat.com>
2248 * config.bfd (s390-*-linux*): Add targ64_selvecs.
2249 (s390x-*-linux*): Add targ_selvecs.
2251 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2253 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
2254 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2255 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2256 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
2257 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2258 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2259 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2260 (SOURCE_HFILES): Add elf32-qnx.h.
2261 (BUILD_HFILES): Add bfdver.h.
2263 * Makefile.in: Regenerate.
2264 * configure.in Update bfd vector dependencies.
2265 * configure: Regenerate.
2266 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
2267 * elf32-i386qnx.c: Likewise.
2268 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
2269 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
2270 * elf32-sh-lin.c: Likewise.
2271 * elf32-shqnx.c: Likewise.
2272 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
2273 * elf32-sh64-nbsd.c: Likewise.
2274 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
2275 * elf64-sh64-nbsd.c: Likewise.
2276 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
2277 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2278 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2279 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2280 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2281 (elf_backend_is_contained_by_filepos): Likewise.
2282 (elf_backend_copy_private_bfd_data_p): Likewise.
2283 Globalize and move functions to..
2284 * elf32-qnx.c: ..here. New file.
2285 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
2286 emit target vectors when INCLUDE_SHMEDIA.
2287 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
2289 * elf64-sh64.c: Remove ELF_ARCH test.
2290 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2291 * po/BLD-POTFILES.in: Regenerate.
2292 * po/SRC-POTFILES.in: Regenerate.
2294 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2296 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
2297 loaded with --just-symbols.
2299 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2300 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2301 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2302 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2304 2002-10-15 Richard Henderson <rth@redhat.com>
2306 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
2307 (BFD64_BACKENDS_CFILES): Likewise.
2308 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
2309 * elf64-alpha-fbsd.c: Remove file, move code ...
2310 * elf64-alpha.c: ... here.
2311 * Makefile.in, configure: Rebuild.
2313 2002-10-14 Richard Henderson <rth@redhat.com>
2315 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
2318 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
2320 * elf32-sh.c (elf_sh_link_hash_entry): Replace
2321 datalabel_got_offset with union of datalabel_got
2322 offset and refcount.
2323 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
2324 (allocate_dynrelocs): Delete unnecessary code for
2325 STT_DATALABEL type. Create entry in got for
2326 datalabel version of symbol if datalabel_got.refcount > 0.
2327 (sh_elf_relocate_section): Use datalabel_got union.
2328 (sh_elf_gc_sweep_hook): Pull common code to initialize
2329 h and eh out of switch statement. Declare seen_stt_datalabel.
2330 Initialize it. Decrement datalabel_got.refcount for
2331 got relocs when seen_stt_datalabel is true.
2332 Decrement local_got_refcounts entry for datalabel got relocs
2334 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
2335 (sh_elf_check_relocs): Declare seen_stt_datalabel.
2336 Initialize it. When seen_stt_datalabel is true, increment
2337 datalabel_got refcount rather than got.refcount.
2338 (sh_elf_finish_dynamic_symbol): Create relocs to
2339 initialize got entry for datalabel version of symbol.
2341 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2343 * Makefile.am: Run "make dep-am".
2344 (BFD_H_FILES): Remove version.h.
2345 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
2346 * version.h: ..to here.
2347 * configure.in (bfd_version_date): Remove.
2348 (AC_OUTPUT): Make bfdver.h from version.h.
2349 * bfd.c: #include "bfdver.h".
2350 * vms-hdr.c: Likewise.
2351 * Makefile.in: Regenerate.
2352 * bfd-in2.h: Regenerate.
2353 * configure: Regenerate.
2354 * po/SRC-POTFILES.in: Regenerate.
2356 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2358 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
2359 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
2360 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
2361 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
2362 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
2363 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
2364 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
2365 bfd_mach_ip2022, bfd_mach_ip2022ext,
2366 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
2367 * bfd-in2.h: Regenerate.
2369 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2371 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
2372 endian vector to targ_selvecs.
2374 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
2376 * elfxx-mips.c (mips_elf_calculate_relocation): Take
2377 save_addend argument. Don't apply the 32-bit mask to a
2378 GPREL32 value if it's to be used in another relocation. Don't
2379 use forced-check computation of local_p to decide whether to
2380 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
2381 of the addend of a non-in-place GPREL16 relocation.
2382 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
2383 mips_elf_calculate_relocation().
2385 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2387 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
2388 with symbols in other sections if we relaxed something; the sections
2389 output offsets must be re-computed before.
2391 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2393 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
2394 handling to use Elf_Internal_Sym.
2395 (m68hc11_elf_relax_delete_bytes): Likewise.
2397 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2399 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
2400 sh_elf_object_p, dtpoff_base): New functions.
2401 (sh_elf_howto_table): Add TLS relocs.
2402 (sh_reloc_map): Likewise.
2403 (sh_elf_info_to_howto): Support TLS relocs.
2404 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
2405 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
2407 (sh_elf_obj_tdata): New.
2408 (elf_sh_link_hash_table): Add tls_ldm_got.
2409 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
2410 (allocate_dynrelocs): Support TLS relocs.
2411 (sh_elf_size_dynamic_sections): Likewise.
2412 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
2413 .rela.got section when found already. Return false after printing
2414 error about unresolvable relocation.
2415 (sh_elf_gc_sweep_hook): Support TLS relocs.
2416 (sh_elf_check_relocs): Likewise.
2417 (sh_elf_finish_dynamic_symbol): Likewise.
2418 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
2419 * reloc.c: Add SH TLS relocs.
2420 * bfd-in2.h, libbfd.h: Regenerate.
2422 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2424 * Makefile.in: Regenerated.
2426 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2428 * Makefile.am: Run dep-am.
2429 (BFD_H_DEP): Add simple.c and linker.c.
2430 (BFD32_LIBS): Add simple.lo.
2431 (BFD32_LIBS_CFILES): Add simple.c.
2432 * Makefile.in: Regenerated.
2433 * bfd-in2.h: Regenerated.
2434 * simple.c: New file.
2436 2002-10-11 Alan Modra <amodra@bigpond.net.au>
2438 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
2439 (record_thumb_to_arm_glue): Likewise.
2440 * ecoff.c (ecoff_link_add_externals): Likewise.
2441 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
2442 (record_thumb_to_arm_glue): Likewise.
2443 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2444 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2445 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2446 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2447 * elf64-ppc.c (func_desc_adjust): Likewise.
2448 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2449 (sh64_elf64_create_dynamic_sections): Likewise.
2450 * elflink.c (_bfd_elf_create_got_section): Likewise.
2451 (_bfd_elf_create_dynamic_sections): Likewise.
2452 (_bfd_elf_create_linker_section): Likewise.
2453 * elflink.h (elf_add_default_symbol): Likewise.
2454 (elf_link_create_dynamic_sections): Likewise.
2455 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2456 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
2457 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
2458 (_bfd_mips_elf_add_symbol_hook): Likewise.
2459 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2460 * linker.c (generic_link_add_symbol_list): Likewise.
2461 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2463 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
2465 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
2466 completely removed. Correct local sym adjustment.
2468 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
2470 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2471 Correct mistake in calculation of address of .got.
2472 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
2473 elf_sh64_pic_plt_entry_le): Likewise.
2475 2002-10-09 Richard Shann <richard.shann@superh.com>
2476 Stephen Clarke <stephen.clarke@superh.com>
2478 * Makefile.am: Add entries for elf32-sh64-lin.c and
2479 elf64-sh64-lin.c. Regenerate.
2480 * Makefile.in: Regenerate.
2481 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
2482 to use sh64 vectors rather than sh vectors.
2483 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2484 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2485 * configure: Regenerate.
2486 * elf32-sh64-lin.c: New file.
2487 * elf64-sh64-lin.c: New file.
2488 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2489 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2491 2002-10-08 H.J. Lu <hjl@gnu.org>
2493 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
2494 IE->LE transition for R_386_TLS_IE.
2496 2002-10-08 Alan Modra <amodra@bigpond.net.au>
2498 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
2500 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
2502 * cofflink.c (mark_relocs): Don't mark relocations in excluded
2505 2002-10-07 Alan Modra <amodra@bigpond.net.au>
2507 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
2510 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
2512 2002-10-06 Alan Modra <amodra@bigpond.net.au>
2514 * opncls.c: Formatting.
2515 (_bfd_new_bfd): Use a smaller section hash table.
2517 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
2519 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
2520 of the other two relocations packed with a REL32 to NONE.
2522 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
2524 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
2525 (sh_elf_link_hash_newfunc): Initialize it.
2526 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
2527 to got.refcount for symbols that are forced local or when
2528 we have direct got refs.
2529 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
2530 to correctly adjust got.refcount and plt.refcount.
2531 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
2532 (sh_elf_check_relocs): Increment gotplt_refcount.
2534 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2536 * elf32-i386.c (elf_i386_relocate_section): Fix
2537 movl foo@indntpoff, %eax IE->LE transition.
2539 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2541 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
2542 sequence and its transitions.
2544 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2546 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
2547 to st_value + addend in non-code sections.
2548 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
2549 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2551 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
2552 Ken Raeburn <raeburn@cygnus.com>
2553 Aldy Hernandez <aldyh@redhat.com>
2554 Eric Christopher <echristo@redhat.com>
2555 Richard Sandiford <rsandifo@redhat.com>
2557 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
2558 (bfd_mach_mips5500): New.
2559 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
2560 (arch_info_struct): Add corresponding entries here.
2561 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
2562 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2563 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
2564 bfd_mach_mips5400 and bfd_mach_mips5500.
2565 (_bfd_mips_elf_mach_extends_p): New function.
2566 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
2567 the EF_MIPS_MACH flags.
2568 * bfd-in2.h: Regenerate.
2570 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
2572 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
2575 2002-09-28 Alan Modra <amodra@bigpond.net.au>
2577 * elf.c (map_sections_to_segments): Correct test for start of
2578 writable section in the same page as end of read-only section.
2580 2002-09-27 Matt Thomas <matt@3am-software.com>
2582 * elf32-vax.c (elf_vax_check_relocs): Remove unused
2583 local_got_refcounts usage. Remove allocation of got slot.
2584 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
2585 Remove de-allocation of got slot.
2586 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
2587 traversal for elf_vax_instantiate_got_entries. Allow empty .got
2588 sections to be GC'ed.
2589 (elf_vax_instantiate_got_entries): New function.
2590 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
2591 tests that are now handled by elf_vax_instantiate_got_entries.
2592 Assert GOT entry falls within .got section size. Remove redundant
2593 comparisions. Fix comments.
2595 2002-09-27 Jakub Jelinek <jakub@redhat.com>
2597 * reloc.c: Add x86-64 TLS relocs.
2598 * bfd-in2.h, libbfd.h: Rebuilt.
2599 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
2600 relocs. Add TLS relocs.
2601 (x86_64_reloc_map): Add TLS relocs.
2602 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
2603 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
2604 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
2605 (elf64_x86_64_hash_entry): Define.
2606 (struct elf64_x86_64_obj_tdata): New.
2607 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
2608 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
2609 (link_hash_newfunc): Initialize tls_type.
2610 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
2611 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
2612 (elf64_x86_64_mkobject): New.
2613 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
2614 (elf64_x86_64_tls_transition): New.
2615 (elf64_x86_64_check_relocs): Add r_type variable and use it.
2617 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
2618 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
2619 (elf64_x86_64_size_dynamic_sections): Likewise.
2620 (dtpoff_base, tpoff): New.
2621 (elf64_x86_64_relocate_section): Handle TLS relocs.
2622 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
2624 (bfd_elf64_mkobject): Define.
2626 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
2627 DF_STATIC_TLS if shared.
2629 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2631 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
2632 empty relocation sections.
2634 2002-09-26 Alan Modra <amodra@bigpond.net.au>
2636 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
2637 (ppc64_elf_build_stubs): Build them here instead.
2639 2002-09-24 Jakub Jelinek <jakub@redhat.com>
2641 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
2642 addend into r_addend, not *r_offset.
2643 (elf32_sparc_finish_dynamic_symbol): Likewise.
2644 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
2645 R_SPARC_RELATIVE's r_offset.
2647 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2649 * dwarf2.c (decode_line_info): Update to correctly decode
2650 the (non-standard DWARF2) out-of-order address sequences
2651 generated by the Intel C++ 6.0 compiler for ia64-Linux.
2653 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
2655 * config.bfd: For DJGPP targets, match with any cpu and any machine.
2657 2002-09-23 Alan Modra <amodra@bigpond.net.au>
2659 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
2660 for discarded FDEs. Remove redundant assignment.
2661 * elflink.h (elf_bfd_discard_info): Save edited relocs.
2663 2002-09-22 H.J. Lu <hjl@gnu.org>
2665 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
2666 the relocation count between different .reloc sections.
2668 2002-09-21 Alan Modra <amodra@bigpond.net.au>
2670 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
2671 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
2672 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
2675 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
2676 unsigned. Move "symcount" assignment out of loop.
2677 * Makefile.am: Run "make dep-am".
2678 * Makefile.in: Regenerate.
2679 * configure: Regenerate.
2680 * po/SRC-POTFILES.in: Regnerate.
2682 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2684 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
2685 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
2688 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2690 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
2691 even if generating R_PPC_RELATIVE reloc.
2692 (ppc_elf_relocate_section): Make sure relocation is performed
2693 if skip == -2. Clear memory at r_offset when creating dynamic
2696 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2698 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
2699 BFD_RELOC_386_TLS_GOTIE): Add.
2700 * bfd-in2.h, libbfd.h: Rebuilt.
2701 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
2702 and R_386_TLS_GOTIE.
2703 (elf_i386_reloc_type_lookup): Handle it.
2704 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
2705 char instead of enum, change GOT_* into defines.
2706 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
2707 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2708 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
2709 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
2710 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
2711 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2712 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2713 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2714 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
2715 tls_type is GOT_TLS_IE_BOTH.
2716 (elf_i386_size_dynamic_sections): Likewise.
2717 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2718 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2719 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
2720 all 4 GOT_TLS_* TLS types.
2722 2002-09-19 Nick Clifton <nickc@redhat.com>
2724 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
2725 follow indirect links.
2727 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2729 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
2730 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
2732 (ecoff_swap_sym_in) <iss>: Likewise.
2733 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
2734 ECOFF information: 'ioptMax' refers to the actual *size*
2735 of the optimization symtab, not the number of entries.
2737 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
2739 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
2740 ELF_LINK_HASH_NEEDS_PLT logic.
2742 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
2744 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2745 correct relocation count.
2747 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
2749 * bfd-in.h (bfd_get_dynamic_symcount): Define.
2750 * bfd.c (struct _bfd): Add dynsymcount.
2751 * bfd-in2.h: Regenerated.
2752 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
2754 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2757 2002-09-17 Stan Cox <scox@redhat.com>
2759 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
2760 (mips_elf64_final_gp): Don't make up gp value.
2761 * elfn32-mips.c (mips_elf_final_gp): Likewise.
2762 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
2763 .MIPS.options/.options section.
2765 2002-09-17 David O'Brien <obrien@FreeBSD.org>
2767 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
2768 It is benign for FreeBSD < 4.1. Minor reformatting.
2769 * elf64-alpha-fbsd.c: Likewise.
2771 2002-09-17 Jakub Jelinek <jakub@redhat.com>
2773 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
2776 2002-09-17 Alan Modra <amodra@bigpond.net.au>
2778 * elf64-alpha.c (alpha_elf_size_info): Make static.
2780 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
2782 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
2783 * cpu-tic4x.c: Ditto.
2785 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2787 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
2790 2002-09-16 Bruno Haible <bruno@clisp.org>
2792 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
2793 by a target variant implementation.
2794 * elf64-alpha.c: Likewise.
2795 * elf32-i386-fbsd.c: New file.
2796 * elf64-alpha-fbsd.c: New file.
2797 * targets.c: Support bfd_elf32_i386_freebsd_vec and
2798 bfd_elf64_alpha_freebsd_vec.
2799 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
2800 bfd_elf64_alpha_freebsd_vec.
2801 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
2802 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
2803 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
2804 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
2805 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
2806 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
2807 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
2809 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2811 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
2813 (elf_i386_relocate_section): Return false after printing error about
2814 unresolvable relocation.
2816 2002-09-12 Nick Clifton <nickc@redhat.com>
2818 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
2821 2002-09-11 Jeffrey Law <law@redhat.com>
2823 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
2825 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
2827 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
2828 line_ptr before deciding we've found a symbol.
2830 2002-09-11 Nick Clifton <nickc@redhat.com>
2832 * po/da.po: New Danish translation file.
2833 * configure.in (LINGUAS): Add 'da'.
2834 * configure: Regenerate.
2836 2002-09-10 Michael Snyder <msnyder@redhat.com>
2838 * irix-core.c (do_sections, do_sections64): New functions.
2839 (irix_core_core_file_p): Call new functions do_sections,
2840 do_sections64, depending on corefile (32-bit or 64-bit).
2842 2002-09-09 Richard Henderson <rth@redhat.com>
2844 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
2845 and PCREL21F like PCREL21B.
2847 2002-09-04 Kevin Buettner <kevinb@redhat.com>
2849 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
2852 2002-09-02 Nick Clifton <nickc@redhat.com>
2854 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
2855 names instead of cryptically overloaded bfd_reloc error
2857 (v850_elf_relocate_section): Likewise.
2858 (v850_elf_relax_section): Replace caching of external symbols
2859 with caching of internal symbols obtained from calling
2860 bfd_elf_get_elf_syms().
2861 Fixup problems with freeing cached allocated memory blocks.
2863 2002-09-02 Alan Modra <amodra@bigpond.net.au>
2865 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
2866 (bfd_pj_arch): Use bfd_default_scan.
2867 * cpu-v850.c (scan): Remove.
2868 (N): Use bfd_default_scan.
2869 * cpu-z8k.c (scan_mach): Remove.
2870 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
2871 first. Use bfd_default_scan.
2873 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
2875 (ecoff_get_magic): Likewise.
2876 * elf32-v850.c (v850_elf_object_p): Likewise.
2877 (v850_elf_final_write_processing): Likewise.
2878 * mipsbsd.c (MY(set_arch_mach)): Likewise.
2879 (MY(write_object_contents)): Likewise.
2880 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
2881 * coffcode.h (coff_write_object_contents): Likewise.
2882 (coff_set_arch_mach_hook): Add comment describing machine == 0.
2883 Remove unnecessary "machine" assignments.
2884 (coff_write_relocs): Test for the absolute section sym by testing
2887 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
2888 and bfd_mach_i386_i386_intel_syntax.
2889 * pdp11.c (NAME(aout,machine_type)): Likewise.
2891 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
2893 * bfd-in.h (align_power): Cast constants to bfd_vma type.
2894 * bfd-in2.h (align_power): Likewise.
2896 2002-08-30 Alan Modra <amodra@bigpond.net.au>
2898 * Makefile.am: Run "make dep-am".
2899 * Makefile.in: Regenerate.
2901 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
2902 * cpu-powerpc.c (powerpc_compatible): Likewise.
2903 * cpu-rs6000.c (rs6000_compatible): Likewise.
2905 2002-08-28 Catherine Moore <clm@redhat.com>
2907 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
2908 (v850-elf-reloc): Don't resolve pc relative relocs.
2909 (v850_elf_ignore_reloc): New routine.
2910 (v850_elf_final_link_relocate): Handle new relocs.
2911 (v850_elf_relax_delete_bytes ): New routine.
2912 (v850_elf_relax_section): New routine.
2913 (bfd_elf32_bfd_relax_section): Define.
2914 (HOWTO): New entries for new relocs.
2915 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
2916 (BFD_RELOC_V850_LONGJUMP): New reloc.
2917 (BFD_RELOC_V850_ALIGN): New reloc.
2918 * archures.c: Remove redundant v850ea architecture.
2919 * cpu-v850.c: Remove redundant v850ea support.
2920 * libbfd.h: Regenerate.
2921 * bfd-in2.h: Regenerated.
2923 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
2925 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
2926 * configure.in: Add tic4x_coff vector files.
2927 * configure: Regenerate.
2928 * Makefile.am: Add tic4x target.
2929 * Makefile.in: Regenerate.
2931 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2933 * archures.c: Add the BFD arch type tic4x.
2934 * bfd-in.h: Add BFD_IN_MEMORY flag.
2935 * coff-tic4x.c: New file.
2936 * coffswap.h (coff_swap_sym_out): Add preadjuster.
2937 * cpu-tic4x.c: New file.
2938 * targets.c: Added tic4x- in list of xvecs.
2939 * ticoff.h: New file.
2940 * bfd-in2.h: Regenerate.
2942 2002-08-27 Adam Nemet <anemet@lnxw.com>
2944 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
2945 bit of DT_INIT and DT_FINI for Thumb functions.
2947 2002-08-26 Alan Modra <amodra@bigpond.net.au>
2949 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
2951 2002-08-26 Alan Modra <amodra@bigpond.net.au>
2953 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
2955 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2957 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
2958 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
2960 (struct elf_sh_pcrel_relocs_copied): Removed.
2961 (struct elf_sh_dyn_relocs): New.
2962 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
2963 field with dyn_relocs.
2964 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
2965 sections and sym_sec.
2966 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
2967 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
2968 (sh_elf_create_dynamic_sections): Use create_got_section instead
2969 of _bfd_elf_create_got_section.
2970 (sh_elf_check_relocs): Likewise.
2971 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
2973 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
2974 sh_elf_relocate_section, sh_elf_check_relocs,
2975 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
2977 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
2978 dynamic relocations and avoiding the copy relocation when we
2979 didn't find any dynamic relocations in the section which has
2980 contents or is read-only.
2981 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2982 (sh_elf_size_dynamic_sections): Don't reset the size of
2983 .rela.got section even if dynamic_sections_created flag is off.
2984 Don't use sh_elf_discard_copies. Scan all input bfd and use
2985 allocate_dynrelocs. Call readonly_dynrelocs to determine
2986 whether we need DT_TEXTREL.
2987 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
2988 whether the symbol was never referred to.
2989 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
2990 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
2991 (sh_elf_check_relocs): Call create_got_section if the short-cut
2992 to .got is null. Increment reference counters only instead of
2993 allocating space on dynamic sections here. Don't conditionalize
2994 uninitialized got.offset value when marking the symbol as a
2995 global offset table entry. Keep relocations for symbols satisfied
2996 by a dynamic library to avoid copy relocations for the symbol.
2997 Set dynobj field of an elf hash table if needed.
2998 (sh_elf_finish_dynamic_sections): Handle null section pointer
3000 (elf_backend_copy_indirect_symbol): Defined.
3001 (elf_backend_can_refcount): Defined.
3003 2002-08-23 Nick Clifton <nickc@redhat.com>
3005 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3006 previous change. Add comment explaining why.
3008 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3010 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3011 contents of .got.plt[2] to tr0, not address of .got.plt.
3012 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3013 patching absolute plt entry. For shmedia plt entry, set bottom bit
3014 of branch to plt0 as this is a branch to an shmedia instruction.
3015 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3016 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3017 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3019 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3020 patching absolute plt entry. For shmedia plt entry, branch to
3021 plt0 is now ptrel, so use relative offset. Set bottom bit of
3022 branch target as it is a branch to an shmedia instruction.
3024 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
3025 Richard Shann <richard.shann@superh.com>
3027 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3028 value if .init is an SHmedia function. Similarly for DT_FINI.
3029 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3031 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3033 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
3035 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3037 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3039 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
3040 byte read when reading the return address register column.
3042 2002-08-22 Nick Clifton <nickc@redhat.com>
3044 * config.bfd: Add powepc64-*-*bsd* target.
3046 2002-08-22 Graeme Peterson <gp@qnx.com>
3048 * Makefile.am: Add entries for elf32-shqnx.c
3049 * Makefile.in: Regenerate.
3050 * config.bfd: Add support sh-*-nto* target.
3051 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
3052 * configure: Regenerate.
3053 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
3054 * elf32-sh.c: Do not include elf32-target.h if
3055 ELF32_SH_C_INCLUDED is defined.
3056 * elf32-shqnx.c: New file: Support for QNX.
3057 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
3059 2002-08-22 Nick Clifton <nickc@redhat.com>
3061 * po/tr.po: Updated Turkish translation.
3063 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
3064 symbols are not read.
3066 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3068 * elf32-m68hc11.c: Formatting fixes.
3069 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3070 * elf32-m68hc12.c: Formatting fixes.
3071 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3073 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3075 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3077 (pmac_xcoff_vec): Likewise.
3078 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3079 (aix5coff64_vec): Likewise.
3081 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3083 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3084 param to elf_backend_copy_indirect_symbol.
3085 (_bfd_elf_link_hash_copy_indirect): Likewise.
3086 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3087 calls to copy_indirect_symbol.
3088 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3089 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3090 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3091 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3092 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3093 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3094 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3095 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3096 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3097 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
3098 test refcounts for "used" values.
3100 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
3102 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3103 argument declaration.
3105 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
3107 * archures.c (bfd_mach_ppc_e500): Added.
3108 * bfd-in2.h: Rebuilt.
3109 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3111 2002-08-19 Alan Modra <amodra@bigpond.net.au>
3113 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3115 2002-08-17 Andrew Cagney <ac131313@redhat.com>
3117 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
3120 2002-08-17 Stan Cox <scox@redhat.com>
3122 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3123 IRIX 6 segment layout for NEWABI.
3125 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
3127 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3128 symbols when looking for section referred to by a relocation.
3129 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
3131 2002-08-15 Alan Modra <amodra@bigpond.net.au>
3133 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3135 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
3137 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3138 missing check for whether the symbol is referenced by DSO before
3139 unexporting it as an unneeded dynamic symbol.
3141 2002-08-14 H.J. Lu <hjl@gnu.org>
3143 * libbfd.h: Regenerate.
3145 2002-08-14 H.J. Lu <hjl@gnu.org>
3147 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3149 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
3151 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3153 (m68hc11_direct_relax): New to define table of relaxable instructions.
3154 (find_relaxable_insn): New, find a relaxable insn.
3155 (compare_reloc): New to compare two relocs.
3156 (m68hc11_elf_relax_section): New, relax text sections.
3157 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3158 (elf32_m68hc11_check_relocs): New function for GC support.
3159 (elf32_m68hc11_relocate_section): New function for GC support.
3160 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3161 (elf_backend_check_relocs): Likewise.
3162 (elf_backend_relocate_section): Likewise.
3164 2002-08-13 H.J. Lu <hjl@gnu.org>
3166 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3167 definitions in shared objects when checking symbol with
3170 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3172 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3173 (elf32_m68hc11_gc_sweep_hook): Likewise.
3174 (elf_backend_gc_mark_hook): Define for GC section support.
3175 (elf_backend_gc_sweep_hook): Likewise.
3176 (elf_backend_can_gc_sections): Likewise.
3178 * elf32-m68hc12.c: Likewise.
3180 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3182 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3183 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3184 (_bfd_m68hc11_elf_set_private_flags): New function.
3185 Use them to set/check/print ELF flags specific to 68HC11.
3187 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3188 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3189 (_bfd_m68hc12_elf_set_private_flags): New function.
3190 Use them to set/check/print ELF flags specific to 68HC12.
3192 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3194 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3195 fix masks for PC-rel relocs.
3196 (m68hc11_elf_ignore_reloc): New function.
3198 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3199 68HC12 banked addressing relocs.
3200 (m68hc12_phys_addr): New to compute physical address of banked memory.
3201 (m68hc12_phys_page): Likewise for page.
3202 (m68hc12_addr_is_banked): New to see if address is in banked area.
3203 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3205 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3207 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3208 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3209 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3210 * bfd-in2.h: Regenerate.
3212 2002-08-12 H.J. Lu <hjl@gnu.org>
3214 * elflink.h (elf_add_default_symbol): Preserve section across
3217 2002-08-09 Graeme Peterson <gp@qnx.com>
3219 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
3220 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3221 * Makefile.in: Regenerate.
3222 * config.bfd: Add support for powerpc{le}-*-nto targets.
3223 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3224 * configure: Regenerate.
3225 * elf32-i386qnx.c: Moved backend functions into a QNX specific
3226 common file "elf32-qnx.h", and now include that file.
3227 * elf32-qnx.h: New file: QNX specific common elf backend.
3228 * elf32-ppc.c: Do not include elf32-target.h if
3229 ELF32_PPC_C_INCLUDED is defined.
3230 * elf32-ppcqnx.c: New file: Support for QNX.
3231 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3232 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3234 2002-08-09 Nick Clifton <nickc@redhat.com>
3236 * po/sv.po: Updated Swedish translation.
3238 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3240 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3241 g->global_gotsym is NULL.
3243 2002-08-08 H.J. Lu <hjl@gnu.org>
3245 * elflink.h (elf_add_default_symbol): Don't warn if a definition
3246 overrides an indirect versioned symbol.
3248 2002-08-08 Jakub Jelinek <jakub@redhat.com>
3250 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3251 for R_386_TLS_TPOFF32 relocs against symndx 0.
3253 2002-08-07 H.J. Lu <hjl@gnu.org>
3255 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3256 with undefined version if needed.
3257 (elf_link_assign_sym_version): Match a default symbol with a
3258 version without definition. No need to hide the default
3259 definition separately.
3261 2002-08-08 Alan Modra <amodra@bigpond.net.au>
3263 * elflink.h (elf_link_output_extsym): Don't output symbols from
3264 SEC_EXCLUDE sections.
3266 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3268 2002-08-07 Alan Modra <amodra@bigpond.net.au>
3270 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3273 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3275 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3278 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3280 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3282 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3284 * elf32-mips.c (mips_reloc_map): Fix typo.
3286 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3288 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3290 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3292 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3294 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3296 * libxcoff.h: Use PARAMS on function declarations.
3297 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
3298 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3300 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
3302 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
3304 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3306 * coff-rs6000.c: Formatting fixes.
3307 (xcoff_calculate_relocation): Use PARAMS in declaration.
3308 (xcoff_complain_overflow): Likewise.
3309 (xcoff_ppc_relocate_section): Use old-style function pointer call.
3310 (bfd_xcoff_backend_data): Remove useless comments.
3311 (rs6000coff_vec): Likewise.
3312 (bfd_pmac_xcoff_backend_data): Likewise.
3313 (pmac_xcoff_vec): Likewise.
3315 * coff64-rs6000.c: Formatting fixes.
3316 (xcoff64_calculate_relocation): Use PARAMS in declaration.
3317 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
3318 (bfd_xcoff_backend_data): Remove useless comments.
3319 (rs6000coff64_vec): Likewise.
3320 (bfd_xcoff_aix5_backend_data): Likewise.
3321 (aix5coff64_vec): Likewise.
3323 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3325 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
3326 mask entries. Use complain_overflow_dont for R_REF.
3327 (xcoff_reloc_type_ba): Revert last change.
3328 (xcoff_reloc_type_br): Likewise.
3329 (xcoff_reloc_type_crel): Likewise.
3330 (xcoff_ppc_relocate_section): Likewise.
3331 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
3332 (xcoff64_ppc_relocate_section): Likewise.
3333 (xcoff64_howto_table): Revert some of last change to mask entries.
3334 Use complain_overflow_dont for R_REF.
3336 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
3337 relocs with bitsize == 16 have size = 1.
3338 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
3339 (xcoff_reloc_type_br): Likewise.
3340 (xcoff_reloc_type_crel): Likewise.
3341 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3342 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
3343 dst_mask adjustment.
3344 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3345 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
3346 bitsize == 16 have size = 1.
3348 2002-08-01 Denis Chertykov <denisc@overta.ru>
3350 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
3351 (struct misc): New field isymbuf. All free_* fields removed.
3352 (symbol_value): Pass in internal syms. No need to swap syms in.
3353 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
3354 possibly cached info.
3355 (tidyup_after_error): Removed.
3356 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
3357 misc. Use new field.
3358 (adjust_all_relocations): Use internal syms. No need to swap syms
3360 (add_page_insn): Don't use removed fields of struct misc.
3362 2002-08-01 Nick Clifton <nickc@redhat.com>
3364 * elf32-arm.h: Revert previous delta.
3366 2002-08-01 Nick Clifton <nickc@redhat.com>
3368 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
3369 * configure: Regenerate.
3371 2002-07-31 H.J. Lu <hjl@gnu.org>
3373 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
3376 2002-07-31 H.J. Lu <hjl@gnu.org>
3378 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
3381 2002-07-31 Jakub Jelinek <jakub@redhat.com>
3383 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
3384 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
3386 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3388 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
3389 There is no 8 byte relocation type for this architecture.
3390 (do_ns32k_reloc): Use bfd_vma instead of native types.
3391 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
3393 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
3394 rely on generic code to do that.
3395 * aout-ns32k.c (howto_table): Add appropriate overflow detection
3396 to all table entries.
3397 (_bfd_ns32k_relocate_contents): put_data returns void.
3398 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
3399 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
3402 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3404 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
3405 archive object is target dependant.
3407 2002-07-31 Adam Nemet <anemet@lnxw.com>
3409 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
3410 (THUMB_PLT_ENTRY_SIZE): New macro.
3411 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
3412 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
3414 (elf32_arm_plt_entry): Likewise.
3415 (elf_backend_plt_header_size): Likewise.
3416 (elf32_thumb_plt0_entry): New global.
3417 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
3419 (elf32_thumb_plt_entry): New global.
3420 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
3421 Thumb entries. Set the bottom bit of the corresponding GOT entry
3422 for a Thumb PLT entry.
3423 (struct elf32_arm_plt_entry_info): New structure.
3424 (struct elf32_arm_link_hash_entry, plt_info): New member of this
3426 (elf32_arm_link_hash_newfunc): Initialize new member.
3427 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
3428 relocations against the PLT.
3429 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
3430 first_rel_type if this is the first time we encounter the symbol.
3431 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
3432 Determine if relocation needs a PLT entry. Set first_rel_type if
3433 this is the first time we encounter the symbol
3434 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
3436 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
3437 (elf32_arm_create_dynamic_sections): New function. Create the
3439 (elf_backend_create_dynamic_sections): Call it.
3441 2002-07-31 Nick Clifton <nickc@redhat.com>
3443 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
3444 'alternative' in order to avoid shadowing global symbol of the
3446 * bfd-in2.h: Regenerate.
3447 * libbfd.h: Regenerate.
3448 * libcoff.h: Regenerate.
3450 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3452 * Makefile.am: Add n32 ABI support.
3453 * Makefile.in: Regenerate.
3454 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
3455 bit vectors for mips*-*-linux targets as optional.
3456 * configure.in: Add n32 ABI vectors.
3457 * configure: Regenerate.
3458 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
3459 * elfn32-mips.c: New file, n32 ABI support.
3460 * targets.c: Add n32 ABI vectors.
3462 2002-07-30 Graeme Peterson <gp@qnx.com>
3464 * elfarmqnx-nabi.c: New file: Support for QNX.
3465 * config.bfd: Add support for arm-*-nto target.
3466 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
3467 * configure: Regenerate.
3468 * Makefile.am: Add entries for elfarmqnx-nabi.c.
3469 * Makefile.in: Regenerate.
3470 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
3471 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
3472 * elfarm-nabi.c: Do not include elf32-arm.h if
3473 ELFARM_NABI_C_INCLUDED is defined.
3474 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
3476 2002-07-30 Nick Clifton <nickc@redhat.com>
3478 * po/sv.po: Updated Swedish translation.
3480 2002-07-30 Jakub Jelinek <jakub@redhat.com>
3482 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
3484 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3486 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
3487 * archive.c (bfd_generic_archive_p): Likewise.
3488 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
3489 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
3490 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3491 (xcoff64_archive_p): Likewise.
3492 (xcoff64_openr_next_archived_file): Likewise.
3493 (xcoff64_archive_p): Clean up tdata properly on error.
3494 * coffgen.c (coff_real_object_p): Likewise.
3495 (coff_object_p): Release filehdr and opthdr.
3496 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
3497 * ieee.c (ieee_archive_p): Likewise.
3498 * ihex.c (ihex_object_p): Likewise.
3499 (ihex_mkobject): Always allocate tdata.
3500 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
3501 * srec.c (srec_mkobject): Always allocate tdata.
3502 (srec_object_p): Clean up tdata properly on error.
3503 (symbolsrec_object_p): Likewise.
3504 * versados.c (versados_object_p): Likewise.
3505 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
3506 and bfd_realloc instead of realloc.
3507 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
3508 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
3509 place of bfd_malloc, simplifying error freeing. Free hash table too.
3510 (vms_object_p): Clean up tdata on error.
3511 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
3512 (vms_close_and_cleanup): Adjust for bfd_alloc use.
3514 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3516 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
3518 2002-07-26 Chris Demetriou <cgd@broadcom.com>
3520 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
3521 flags into resulting BFD.
3523 2002-07-26 Alan Modra <amodra@bigpond.net.au>
3525 From John Reiser <jreiser@BitWagon.com>
3526 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
3527 tls_ldm_got.refcount.
3529 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3531 * elf64-mips.c: Update TODO comment.
3532 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
3533 mips_elf64_gprel16_reloca): Remove prototypes.
3534 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
3535 (UNUSED_RELOC): Replace by EMPTY_RELOC.
3536 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
3537 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
3539 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
3540 R_MIPS_GOT16. Remove wrong comments.
3541 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
3542 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
3544 (mips_elf64_hi16_reloc): Fix formatting.
3545 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
3546 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
3547 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
3548 (mips_elf64_gprel16_reloc): Make static. Add check for
3550 (mips_elf64_gprel16_reloca): Remove.
3551 (mips_elf64_literal_reloc): New function.
3552 (mips_elf64_gprel32_reloc): Fix formatting.
3553 (mips_elf64_shift6_reloc): Fix comment. Make static.
3554 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
3556 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
3558 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
3559 specific relocations.
3560 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
3561 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
3562 (ELF_MAXPAGESIZE): Add comment.
3564 2002-07-25 Nick Clifton <nickc@redhat.com>
3566 * po/sv.po: Updated Swedish translation.
3567 * po/es.po: Updated Spanish translation.
3568 * po/fr.po: Updated French translation.
3570 2002-07-25 Alan Modra <amodra@bigpond.net.au>
3572 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
3573 as elf_link_record_local_dynamic_symbol.
3574 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
3575 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
3576 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
3577 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
3578 attempt is made to record a symbol in a discarded section, and
3579 return `2' in that case.
3581 2002-07-24 Nick Clifton <nickc@redhat.com>
3583 * po/sv.po: Updated Swedish translation.
3584 * po/es.po: Updated Spanish translation.
3586 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3588 * po/SRC-POTFILES.in: Regenerate.
3590 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
3591 immediately. Remove code handling relocatable linking.
3592 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3593 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3594 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
3595 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3596 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3597 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3598 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3599 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3600 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3601 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3602 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3603 * elf32-avr.c (elf_backend_rela_normal): Define.
3604 * elf32-cris.c: Likewise.
3605 * elf32-fr30.c: Likewise.
3606 * elf32-frv.c: Likewise.
3607 * elf32-h8300.c: Likewise.
3608 * elf32-hppa.c: Likewise.
3609 * elf32-ip2k.c: Likewise.
3610 * elf32-sparc.c: Likewise.
3611 * elf32-v850.c: Likewise.
3612 * elf32-vax.c: Likewise.
3613 * elf64-hppa.c: Likewise.
3614 * elf64-sparc.c: Likewise.
3615 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
3616 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3617 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3618 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3619 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3620 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3621 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3622 * elf-m10200.c (USE_RELA): Don't define.
3623 * elf-m10300.c: Likewise.
3624 * elfarm-oabi.c: Likewise.
3625 * elf32-i370.c: Likewise.
3626 * elf32-ip2k.c: Likewise.
3627 * elf32-m68k.c: Likewise.
3628 * elf32-mcore.c: Likewise.
3629 * elf32-ppc.c: Likewise.
3630 * elf32-s390.c: Likewise.
3631 * elf32-vax.c: Likewise.
3632 * elf64-ppc.c: Likewise.
3633 * elf64-s390.c: Likewise.
3634 * elf64-x86-64.c: Likewise.
3635 * elfxx-ia64.c: Likewise.
3636 * elf32-avr.c (USE_REL): Don't undef.
3637 * elf32-ip2k.c: Likewise.
3639 2002-07-23 Nick Clifton <nickc@redhat.com>
3641 * elf-bfd.h (struct elf_backend_data): Add new bitfield
3642 'want_p_paddr_set_to_zero'.
3643 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
3645 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
3646 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
3648 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
3650 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
3651 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
3652 show the Copyright string.
3653 Minor formatting tidy ups.
3655 2002-07-23 Nick Clifton <nickc@redhat.com>
3657 * po/fr.po: Updated French translation.
3658 * po/sv.po: Updated Swedish translation.
3660 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3662 * elflink.h (elf_link_input_bfd): Don't change internal symbols
3663 when outputting relocs.
3665 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
3667 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
3668 DT_PLTGOT into the dynamic section if there is a PLT.
3670 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3672 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
3674 (_bfd_mips_elf_write_section): Likewise.
3675 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
3676 (_bfd_mips_elf_write_section): Likewise.
3677 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
3678 (elf32_mips_write_section): Likewise.
3679 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
3680 (_bfd_mips_elf_write_section): Likewise.
3682 2002-07-19 Alan Modra <amodra@bigpond.net.au>
3684 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
3685 PT_IA_64_UNWIND segments for a given section.
3687 2002-07-17 H.J. Lu <hjl@gnu.org>
3689 * Makefile.am: Fix a typo.
3690 * Makefile.in: Regenerate.
3692 2002-07-15 Denis Chertykov <denisc@overta.ru>
3693 Frank Ch. Eigler <fche@redhat.com>
3694 Ben Elliston <bje@redhat.com>
3695 Alan Lehotsky <alehotsky@cygnus.com>
3696 John Healy <jhealy@redhat.com>
3697 Graham Stott <grahams@redhat.com>
3698 Jeff Johnston <jjohnstn@redhat.com>
3700 * Makefile.am: Add support for ip2k.
3701 * Makefile.in: Regenerate.
3702 * doc/Makefile.in: Regenerate.
3703 * archures.c: Add support for ip2k.
3704 * config.bfd: Add support for ip2k.
3705 * configure.in: Add support for ip2k.
3706 * configure: Regenerate.
3707 * reloc.c: Add support for ip2k.
3708 * targets.c: Add support for ip2k.
3709 * bfd-in2.h: Regenerate.
3710 * libbfd.h: Regenerate.
3711 * cpu-ip2k.c: New file.
3712 * elf32-ip2k.c: New file.
3714 2002-07-17 Ian Rickards <irickard@arm.com>
3716 * dwarf2.c (concat_filename): If we can't establish the directory
3717 just return the filename.
3719 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
3721 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
3723 2002-07-16 Alan Modra <amodra@bigpond.net.au>
3725 * elflink.h: Formatting fixes, tidy prototypes.
3726 (elf_link_assign_sym_version): Move common code out of loop.
3728 2002-07-16 Alan Modra <amodra@bigpond.net.au>
3730 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
3731 reloc section size is zero. Correct reloc output location.
3733 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
3735 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
3736 the final type for the e_fsel selector when generating PA2.0W code.
3737 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
3740 2002-07-14 H.J. Lu <hjl@gnu.org>
3742 * elflink.h (elf_link_assign_sym_version): Hide the default
3743 definition if there is a hidden versioned definition.
3745 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
3747 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
3748 dynamic reference test in assertion when initializing GOT with
3749 static contents. Just assert that there are either no dynamic
3750 sections, the symbol is defined in the regular objects or that the
3751 symbol is undef weak. Tweak comment.
3752 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
3753 only if the symbol isn't defined in the program and isn't undef
3755 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
3756 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
3757 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
3758 (elf_cris_discard_excess_program_dynamics): Don't consider
3759 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
3761 2002-07-11 Alan Modra <amodra@bigpond.net.au>
3763 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
3764 unresolved debugging relocs in dynamic applications.
3765 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3766 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3767 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3768 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3769 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3770 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3772 2002-07-10 Alan Modra <amodra@bigpond.net.au>
3774 * elf64-ppc.c (ONES): Define.
3775 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
3776 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
3777 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
3779 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
3780 (ppc64_elf_set_private_flags): Delete.
3781 (ppc64_elf_section_from_shdr): Delete.
3782 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
3783 (ppc64_elf_fake_sections): Delete.
3784 (bfd_elf64_bfd_set_private_flags): Don't define.
3785 (bfd_elf64_get_symbol_info): Likewise.
3786 (elf_backend_section_from_shdr): Likewise.
3787 (elf_backend_fake_sections): Likewise.
3789 2002-07-10 Marco Walther <Marco.Walther@sun.com>
3791 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
3792 when not already set.
3793 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
3794 (elf_backend_fake_sections): Define.
3796 2002-07-10 Alan Modra <amodra@bigpond.net.au>
3798 * merge.c (_bfd_merge_section): Remove redundant output_section check.
3800 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
3802 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
3804 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
3805 NULL sym_hashes to just before use.
3806 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
3807 symbol with non-default visibility.
3808 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
3809 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3811 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
3812 symbol with non-default visibility.
3813 (cris_elf_check_relocs): At tests for local symbol before
3814 increasing h->plt.refcount, also check for non-default
3815 visibility. Ditto when checking for local symbol to eliminate
3816 pc-relative runtime relocs.
3818 2002-07-08 Alan Modra <amodra@bigpond.net.au>
3820 * elf.c: Formatting.
3821 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
3822 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
3823 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
3826 2002-07-07 Mark Mitchell <mark@codesourcery.com>
3827 Alan Modra <amodra@bigpond.net.au>
3829 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
3830 account the impact of relocation count overflow when computing
3832 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
3833 or not to apply the PE COFF reloc overflow handling. Fix a
3834 fencepost error in deciding whether or not to use that technique.
3836 2002-07-07 Alan Modra <amodra@bigpond.net.au>
3838 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
3839 change type of locsyms.
3840 (bfd_elf_get_elf_syms): Declare.
3841 * elf.c (bfd_elf_get_elf_syms): New function.
3842 (group_signature): Use bfd_elf_get_elf_syms.
3843 (bfd_section_from_r_symndx): Likewise.
3844 * elfcode.h (elf_slurp_symbol_table): Likewise.
3845 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3846 (elf_link_add_object_symbols): Likewise. Reorganise to increase
3847 locality of various data structures. Properly free internal relocs.
3848 (elf_bfd_final_link): Properly free internal relocs.
3849 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
3850 (elf_link_input_bfd): Likewise.
3851 (elf_gc_mark): Likewise. Properly free internal relocs.
3852 (elf_gc_sweep): Properly free internal relocs.
3853 (elf_reloc_symbol_deleted_p): No need to swap syms in.
3854 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
3856 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
3857 Properly free possibly cached info.
3858 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
3859 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
3860 symbol swapping code.
3861 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
3862 Properly free possibly cached info.
3863 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
3864 (mn10300_elf_relax_delete_bytes): Likewise.
3865 (mn10300_elf_symbol_address_p): Likewise.
3866 (mn10300_elf_get_relocated_section_contents): Likewise.
3867 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
3868 (elf32_h8_relax_delete_bytes): Likewise.
3869 (elf32_h8_symbol_address_p): Likewise.
3870 (elf32_h8_get_relocated_section_contents): Likewise.
3871 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
3872 (m32r_elf_relax_delete_bytes): Likewise.
3873 (m32r_elf_get_relocated_section_contents): Likewise.
3874 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
3875 elf_section_data to determine whether cached.
3876 (sh_elf_relax_section): As above for elf-m10200.c.
3877 (sh_elf_relax_delete_bytes): Likewise.
3878 (sh_elf_get_relocated_section_contents): Likewise.
3879 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
3880 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
3881 reading of local syms.
3882 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3883 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
3884 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
3885 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
3887 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
3888 free internal relocs and section contents. Don't read symbols.
3889 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
3890 (elf32_hppa_size_stubs): Don't free local syms.
3891 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
3892 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
3893 possibly cached info.
3894 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3895 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
3896 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
3898 (get_local_syms): Delete function.
3899 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
3901 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
3903 2002-07-05 Jim Wilson <wilson@redhat.com>
3905 * syms.c (decode_section_type): New.
3906 (bfd_decode_symclass): Call decode_section_type.
3908 2002-07-04 Jakub Jelinek <jakub@redhat.com>
3910 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
3911 section content start.
3912 Reported by Michael Schumacher <mike@hightec-rt.com>.
3914 2002-07-04 Alan Modra <amodra@bigpond.net.au>
3916 * section.c (_bfd_strip_section_from_output): Remove unnecessary
3917 link order code. Don't actually remove the output section here;
3918 Just set a flag for the linker to do so.
3919 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
3920 sections when setting up output section dynsyms.
3922 2002-07-04 Alan Modra <amodra@bigpond.net.au>
3924 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
3926 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
3929 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
3931 * elf64-s390.c (create_got_section): Set .got section alignment to
3933 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
3935 2002-07-02 Alan Modra <amodra@bigpond.net.au>
3937 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
3939 2002-07-01 Matt Thomas <matt@3am-software.com>
3941 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
3944 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3946 * elfxx-mips.c (ABI_64_P): Fix comment.
3947 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
3948 new section names for N64 ABI.
3949 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
3950 (mips_elf_calculate_relocation): Code formatting.
3951 (mips_elf_create_dynamic_relocation): Likewise.
3952 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
3953 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
3954 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
3956 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
3958 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
3959 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
3962 2002-07-01 Andreas Schwab <schwab@suse.de>
3964 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
3965 R_X86_64_64 to R_X86_64_RELATIVE.
3967 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
3969 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
3970 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
3972 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
3974 * configure.in (vaxbsd_vec): Add.
3975 * targets.c (vaxbsd_vec): Add.
3976 * Makefile.in: Rebuild.
3977 * configure: Rebuild.
3978 * po/SRC-POTFILES.in: Rebuild.
3980 2002-07-01 Alan Modra <amodra@bigpond.net.au>
3982 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
3983 examining to gc_mark_hook, rather than the bfd.
3984 (elf_gc_sections): Adjust.
3985 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
3986 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
3987 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
3988 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
3989 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
3990 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
3991 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
3992 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
3993 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
3994 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
3995 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
3996 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
3997 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
3998 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
3999 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4000 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4001 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4002 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4003 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4004 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4005 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4006 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4007 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4008 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4009 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4010 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4011 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4012 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
4013 redundant local sym tests.
4014 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4015 (link_hash_newfunc): Init is_entry.
4016 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4017 (ppc64_elf_link_hash_table_create): Init all_local_syms.
4018 (create_linkage_sections): Use bfd_make_section_anyway rather than
4020 (ppc64_elf_mark_entry_syms): New function.
4021 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
4022 up opd entry to function section map.
4023 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4024 relocs that reference the opd section.
4025 (edit_opd): New function.
4026 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4027 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4028 (get_local_syms): Do so here. Exit if we already have local syms.
4029 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
4030 read local syms on non-ELF input.
4031 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4032 than duplicating it's function here. Adjust free of internal
4034 (ppc64_elf_relocate_section): Adjust local syms in opd section.
4035 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4036 * elf32-hppa.c (elf32_hppa_size_stubs): Call
4037 _bfd_elf32_link_read_relocs rather than duplicating it's function
4038 here. Adjust free of internal relocs to suit.
4040 2002-07-01 Andreas Jaeger <aj@suse.de>
4042 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
4043 are not allowed in shared libs code, enforce -fPIC.
4045 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
4047 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
4048 trailing zero-sequences when there's previous left-over data.
4050 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
4052 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
4053 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
4054 and opd_rel_sec in order for starting rela section. Check _raw_size.
4055 (elf_backend_reloc_type_class): Define.
4057 2002-06-27 Kevin Buettner <kevinb@redhat.com>
4059 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
4062 2002-06-27 Alan Modra <amodra@bigpond.net.au>
4064 * cpu-powerpc.c: Comment on ordering of arch_info.
4065 * elf32-ppc.c (ppc_elf_object_p): New function.
4066 (elf_backend_object_p): Define.
4067 * elf64-ppc.c (ppc64_elf_object_p): New function.
4068 (elf_backend_object_p): Define.
4070 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
4072 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4073 * configure: Regenerate.
4075 2002-06-25 Jason Eckhardt <jle@rice.edu>
4077 * dwarf2.c (decode_line_info): Check unit->addr_size
4078 to read in the proper number of prologue bytes.
4080 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
4082 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4083 aix5coff64_vec if 64-bit bfd support has been enabled.
4084 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4087 * targets.c (_bfd_target_vector[]): Only include
4088 aix5coff64_vec if 64-bit bfd support has been enabled.
4090 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4092 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4093 * elf32-hppa.c (hppa_add_stub): Likewise.
4094 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4095 * elflink.h (elf_add_default_symbol): Fix comment typo.
4096 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4097 (elf_link_add_object_symbols): Likewise.
4098 (elf_link_assign_sym_version): Likewise.
4099 * hash.c (bfd_hash_lookup): Likewise.
4100 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4101 * section.c (bfd_get_unique_section_name): Likewise.
4102 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4103 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4104 (assign_section_numbers): Likewise.
4105 (_bfd_elfcore_make_pseudosection): Likewise.
4106 (elfcore_grok_lwpstatus): Likewise.
4107 (elfcore_grok_win32pstatus): Likewise.
4108 (elfcore_write_note): Constify input params. Use PTR instead of
4109 void *. Include terminating NUL in namesz. Correct padding.
4110 Support NULL "name" param. Use memcpy instead of strcpy.
4111 (elfcore_write_prpsinfo): Constify input params.
4112 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
4113 (elfcore_write_lwpstatus): Likewise.
4114 (elfcore_write_pstatus): Likewise.
4115 (elfcore_write_prfpreg): Likewise.
4116 (elfcore_write_prxfpreg): Likewise.
4117 * elf-bfd.h (elfcore_write_note): Update declaration.
4118 (elfcore_write_prpsinfo): Likewise.
4119 (elfcore_write_prstatus): Likewise.
4120 (elfcore_write_pstatus): Likewise.
4121 (elfcore_write_prfpreg): Likewise.
4122 (elfcore_write_prxfpreg): Likewise.
4123 (elfcore_write_lwpstatus): Likewise.
4125 2002-06-25 Jason Eckhardt <jle@rice.edu>
4127 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4128 symbols of type stProc and stStaticProc.
4130 2002-06-25 Nick Clifton <nickc@redhat.com>
4132 * ecoff.c: VArious formatting fixes.
4134 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4136 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4138 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4140 * aout-adobe.c: Don't compare against "true" or "false.
4141 * aout-target.h: Likewise.
4142 * aoutx.h: Likewise.
4143 * archive.c: Likewise.
4145 * cache.c: Likewise.
4146 * coff-a29k.c: Likewise.
4147 * coff-alpha.c: Likewise.
4148 * coff-i386.c: Likewise.
4149 * coff-mips.c: Likewise.
4150 * coff-or32.c: Likewise.
4151 * coff64-rs6000.c: Likewise.
4152 * coffcode.h: Likewise.
4153 * coffgen.c: Likewise.
4154 * cpu-ns32k.c: Likewise.
4155 * ecoff.c: Likewise.
4156 * ecofflink.c: Likewise.
4158 * elf32-arm.h: Likewise.
4159 * elf32-cris.c: Likewise.
4160 * elf32-d30v.c: Likewise.
4161 * elf32-i386.c: Likewise.
4162 * elf32-mcore.c: Likewise.
4163 * elf32-ppc.c: Likewise.
4164 * elf32-sh.c: Likewise.
4165 * elf32-sh64.c: Likewise.
4166 * elf32-v850.c: Likewise.
4167 * elf64-alpha.c: Likewise.
4168 * elf64-sh64.c: Likewise.
4169 * elfcode.h: Likewise.
4170 * elfcore.h: Likewise.
4171 * elflink.h: Likewise.
4172 * elfxx-mips.c: Likewise.
4173 * i386os9k.c: Likewise.
4175 * libbfd.c: Likewise.
4176 * linker.c: Likewise.
4178 * nlm32-alpha.c: Likewise.
4179 * nlm32-i386.c: Likewise.
4180 * nlm32-ppc.c: Likewise.
4181 * nlm32-sparc.c: Likewise.
4182 * nlmcode.h: Likewise.
4183 * oasys.c: Likewise.
4184 * pdp11.c: Likewise.
4185 * peicode.h: Likewise.
4186 * reloc.c: Likewise.
4189 * tekhex.c: Likewise.
4191 * xcofflink.c: Likewise.
4192 * elf64-sparc.c: Edit comment to not use "== false".
4194 * aoutf1.h: Don't use "? true : false".
4195 * ecoff.c: Likewise.
4196 * format.c: Likewise.
4198 * linker.c: Likewise.
4200 * oasys.c: Likewise.
4202 2002-06-23 H.J. Lu <hjl@gnu.org>
4204 * elflink.h (elf_link_add_archive_symbols): For the default
4205 version, check references with only one `@' first.
4207 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
4209 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4211 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
4213 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4214 (elf64_hppa_size_dynamic_sections): Revise to use
4215 elf64_hppa_mark_milli_and_exported_functions.
4216 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4217 symbols out of dynamic symbol table.
4219 2002-06-23 Alan Modra <amodra@bigpond.net.au>
4221 * Makefile.in: Regenerate.
4222 * libbfd.h: Regenerate.
4223 * bfd-in2.h: Regenerate.
4224 * configure: Regenerate.
4225 * po/SRC-POTFILES.in: Regenerate.
4227 * elflink.h: Comment typo fixes.
4229 2002-06-23 H.J. Lu <hjl@gnu.org>
4231 * elf-bfd.h (elf_link_loaded_list): New structure.
4232 (elf_link_hash_table): Add "loaded".
4233 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4234 * elflink.h (elf_link_check_versioned_symbol): New function.
4235 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4237 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
4239 * elflink.h (size_dynamic_sections): If the target does not
4240 support an ELF style hash table, return true, indicating that
4241 nothing needed to be done, rather than false, indicating that the
4242 section's size could not be computed.
4244 2002-06-18 Dave Brolley <brolley@redhat.com>
4246 From Catherine Moore, Michael Meissner, Dave Brolley:
4247 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4248 * targets.c: Support bfd_elf32_frv_vec.
4249 * reloc.c: Add FRV relocs.
4250 * configure.in: Add support for bfd-elf32-frv-vec.
4251 * config.bfd (targ_cpu): Add support for frv-*-elf.
4252 * archures.c: Add frv arch and machines.
4253 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4254 (ALL_MACHINES_CFILES): Add cpu-frv.c.
4255 (BFD32_BACKENDS): Add elf32-frv.lo.
4256 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4257 (cpu-frv.lo): New target.
4258 (elf32-frv.lo): New target.
4259 * cpu-frv.c: New file.
4260 * elf32-frv.c: New file.
4262 2002-06-18 Jakub Jelinek <jakub@redhat.com>
4264 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4266 Only read the first section header if e_shoff is non-zero.
4267 Don't consider e_shstrndx if there are no sections.
4269 2002-06-17 Tom Rix <trix@redhat.com>
4271 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
4272 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
4273 complain_overflow_bitfield.
4275 2002-06-17 Alan Modra <amodra@bigpond.net.au>
4277 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4278 (bfd_fdopenr): Likewise.
4279 (bfd_openstreamr): Likewise.
4280 (bfd_openw): Likewise.
4282 * targets.c: Sort target vecs.
4283 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4284 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4285 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4286 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4287 * configure.in: Sort target vecs. Add m88kmach3_vec.
4288 * configure: Regenerate.
4290 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
4292 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4293 bpo_reloc_no to break sort order ties, not address of items.
4295 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4297 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
4298 Skip excluded sections in determing __gp value.
4299 (elf_hppa_final_link_relocate): Use the symbol's address in
4300 R_PARISC_FPTR64 relocations that don't need an opd entry.
4301 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
4302 (elf64_hppa_finalize_dynreloc): Likewise.
4303 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
4304 (elf64_hppa_finish_dynamic_symbol): Break up assert.
4306 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
4308 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4309 alignment for .bss, .data and .text sections so that sse and sse2
4311 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4313 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
4315 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
4318 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4320 * elflink.h (elf_bfd_final_link): Improve error handling for missing
4323 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
4324 for a symbol that has no output section.
4325 (allocate_dynrel_entries): Correct comment.
4326 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
4328 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
4329 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
4330 with no section. Remove unnecessary parentheses.
4332 2002-06-11 Tom Rix <trix@redhat.com>
4334 * coffcode.h (coff_compute_section_file_positions): Add data
4335 section to AIX loader alignment check.
4337 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
4338 alignment to 4 bytes.
4339 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
4340 power accessor macro.
4341 (do_shared_object_padding): Remove invalid assertion.
4343 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
4345 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
4346 for removed output sections.
4348 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
4350 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
4352 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
4354 2002-06-08 H.J. Lu <hjl@gnu.org>
4356 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
4357 work around a long long bug in gcc 2.96 on mips.
4359 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
4361 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
4362 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
4363 Regenerate dependency lists.
4364 * Makefile.in: Regenerate.
4365 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
4366 vax1knetbsd_vec to targ_selvecs.
4367 * configure.in: Add vax1knetbsd_vec.
4368 * configure: Regenerate.
4369 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
4370 * vax1knetbsd.c: New file.
4371 * vaxnetbsd.c: Update copyright years.
4372 (TARGET_PAGE_SIZE): Set to 0x1000.
4373 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
4375 2002-06-08 Matt Thomas <matt@3am-software.com>
4377 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
4379 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4381 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
4383 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4385 * Makefile.am: Run "make dep-am".
4386 * Makefile.in: Regenerate.
4388 * armnetbsd.c: Replace CONST with const.
4389 * corefile.c: Likewise.
4390 * elf32-dlx.c: Likewise.
4391 * elf64-mips.c: Likewise.
4393 * ns32knetbsd.c: Likewise.
4395 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
4396 table is elf64-sparc.
4398 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4400 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
4401 Fix RELA addends to get not shifted in the result. Don't do special
4402 handling of R_MIPS_64 for NewABI.
4404 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4406 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4407 (NAME(aout,slurp_reloc_table)): Likewise.
4408 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
4409 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
4410 (xcoff_write_archive_contents_big): Likewise.
4411 (xcoff_generate_rtinit): Likewise.
4412 (xcoff_generate_rtinit): Likewise, and check error return.
4413 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4414 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
4415 (coff_get_normalized_symtab): Likewise.
4416 (coff_make_empty_symbol): Likewise.
4417 (bfd_coff_set_symbol_class): Likewise.
4418 * cofflink.c (coff_link_add_symbols): Likewise.
4419 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
4420 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
4421 (bfd_ecoff_write_accumulated_debug): Likewise.
4422 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
4423 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
4424 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
4425 * ieee.c (do_with_relocs): Use bfd_zalloc.
4426 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
4427 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4428 (NAME(aout,slurp_reloc_table)): Likewise.
4429 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
4430 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
4431 * som.c (som_build_and_write_symbol_table): Likewise.
4432 (som_slurp_string_table): Likewise.
4433 (som_slurp_symbol_table): Likewise.
4434 (som_bfd_ar_write_symbol_stuff): Likewise.
4435 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
4436 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
4437 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
4438 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
4439 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
4441 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4443 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4445 (elf_group_name): Update.
4446 (elf_group_id): Define.
4447 (bfd_elf_set_group_contents): Declare.
4448 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
4449 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
4450 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
4451 that sym for the signature.
4452 (_bfd_elf_compute_section_file_positions): Don't call
4453 set_group_contents for "ld -r" case.
4454 (swap_out_syms): Use bfd_zalloc.
4455 * elflink.h (elf_link_add_archive_symbols): Likewise.
4456 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4457 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
4459 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4461 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
4462 relocs in opd for non-shared too.
4464 2002-06-06 Jeffrey Law <law@redhat.com>
4466 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
4469 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
4471 * merge.c: Include libiberty.h.
4472 * elf-strtab.c: Include libiberty.h.
4474 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
4476 * peXXigen.c (pe_print_idata): Remove unused variable.
4478 2002-06-06 David Heine <dlheine@tensilica.com>
4480 * elf.c (assign_file_positions_for_segments): Remove unallocated
4481 sections from the section to segment mapping for PT_LOAD segments.
4482 Update comment about empty loadable segments.
4484 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
4486 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
4487 is within the .stabstr section.
4489 2002-06-06 Alan Modra <amodra@bigpond.net.au>
4491 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
4492 are "const PTR", not "const PTR *".
4493 (bfd_elf32_swap_symbol_in): Likewise.
4494 (bfd_elf64_swap_symbol_in): Likewise.
4495 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
4496 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4497 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4498 (elf_link_add_object_symbols): Likewise.
4499 (elf_link_record_local_dynamic_symbol): Likewise.
4500 (elf_link_input_bfd): Likewise.
4501 (elf_gc_mark): Likewise.
4502 (elf_reloc_symbol_deleted_p): Likewise.
4503 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4504 (mn10200_elf_relax_delete_bytes): Likewise.
4505 (mn10200_elf_symbol_address_p): Likewise.
4506 (mn10200_elf_get_relocated_section_contents): Likewise.
4507 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4508 (mn10300_elf_relax_section): Likewise.
4509 (mn10300_elf_relax_delete_bytes): Likewise.
4510 (mn10300_elf_symbol_address_p): Likewise.
4511 (mn10300_elf_get_relocated_section_contents): Likewise.
4512 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4513 (elf32_h8_relax_delete_bytes): Likewise.
4514 (elf32_h8_symbol_address_p): Likewise.
4515 (elf32_h8_get_relocated_section_contents): Likewise.
4516 * elf32-hppa.c (get_local_syms): Likewise.
4517 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4518 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4519 * elf32-sh.c (sh_elf_relax_section): Likewise.
4520 (sh_elf_relax_delete_bytes): Likewise.
4521 (sh_elf_get_relocated_section_contents): Likewise.
4522 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4523 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4524 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4525 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4526 * elf64-ppc.c (get_local_syms): Likewise.
4527 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4528 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4530 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
4532 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
4534 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4536 * elf.c (group_signature): Swap in the whole symbol, and handle
4537 extracting section symbol names.
4538 (setup_group): Add comment.
4539 (set_group_contents): When called from objcopy or ld, arrange for
4540 section contents to be written. Write group member output section
4541 indices to allow objcopy to reorganize sections.
4542 (_bfd_elf_copy_private_section_data): Copy group info.
4544 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
4545 (bfd_elf32_swap_symbol_in): Update prototype.
4546 (bfd_elf64_swap_symbol_in): Likewise.
4547 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
4548 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4549 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4550 (elf_link_add_object_symbols): Likewise.
4551 (elf_link_record_local_dynamic_symbol): Likewise.
4552 (elf_link_input_bfd): Likewise.
4553 (elf_gc_mark): Likewise.
4554 (elf_reloc_symbol_deleted_p): Likewise.
4555 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4556 (mn10200_elf_relax_delete_bytes): Likewise.
4557 (mn10200_elf_symbol_address_p): Likewise.
4558 (mn10200_elf_get_relocated_section_contents): Likewise.
4559 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4560 (mn10300_elf_relax_section): Likewise.
4561 (mn10300_elf_relax_delete_bytes): Likewise.
4562 (mn10300_elf_symbol_address_p): Likewise.
4563 (mn10300_elf_get_relocated_section_contents): Likewise.
4564 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4565 (elf32_h8_relax_delete_bytes): Likewise.
4566 (elf32_h8_symbol_address_p): Likewise.
4567 (elf32_h8_get_relocated_section_contents): Likewise.
4568 * elf32-hppa.c (get_local_syms): Likewise.
4569 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4570 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4571 * elf32-sh.c (sh_elf_relax_section): Likewise.
4572 (sh_elf_relax_delete_bytes): Likewise.
4573 (sh_elf_get_relocated_section_contents): Likewise.
4574 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4575 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4576 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4577 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4578 * elf64-ppc.c (get_local_syms): Likewise.
4579 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4580 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4581 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
4582 * elf64-alpha.c (alpha_elf_size_info): Likewise.
4583 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4584 * elf64-mips.c (mips_elf64_size_info): Likewise.
4585 * elf64-s390.c (s390_elf64_size_info): Likewise.
4586 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4588 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4590 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
4591 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
4592 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
4593 _bfd_mips_elf_ignore_discarded_relocs.
4594 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
4596 2002-06-05 H.J. Lu <hjl@gnu.org>
4598 * elfxx-mips.c (mips_elf_calculate_relocation): Call
4599 _bfd_elf_rel_local_sym for STT_SECTION relocations against
4600 the SEC_MERGE section.
4602 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4604 * coff-alpha.c: Update copyright date.
4605 * coff-mips.c: Likewise.
4606 * xcoff-target.h: Likewise.
4608 * bfd-in.h: Remove "taken from the source" comment.
4609 * libbfd-in.h: Likewise.
4610 * libcoff-in.h: Likewise.
4611 * bfd-in2.h: Regenerate.
4612 * libbfd.h: Regenerate.
4613 * libcoff.h: Regenerate.
4615 * elf.c (bfd_elf_discard_group): Return true.
4616 * elf-bfd.h (bfd_elf_discard_group): Declare.
4617 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
4618 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
4619 * bfd.c (bfd_discard_group): Define.
4620 * targets.c (struct bfd_target): Add _bfd_discard_group.
4621 (BFD_JUMP_TABLE_LINK): Here too.
4622 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
4623 * aout-adobe.c (aout_32_bfd_discard_group): Define.
4624 * aout-target.h (MY_bfd_discard_group): Define.
4625 * aout-tic30.c (MY_bfd_discard_group): Define.
4626 * binary.c (binary_bfd_discard_group): Define.
4627 * bout.c (b_out_bfd_discard_group): Define.
4628 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
4629 * coffcode.h (coff_bfd_discard_group): Define.
4630 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
4631 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
4632 * i386msdos.c (msdos_bfd_discard_group): Define.
4633 * i386os9k.c (os9k_bfd_discard_group): Define.
4634 * ieee.c (ieee_bfd_discard_group): Define.
4635 * ihex.c (ihex_bfd_discard_group): Define.
4636 * mmo.c (mmo_bfd_discard_group): Define.
4637 * nlm-target.h (nlm_bfd_discard_group): Define.
4638 * oasys.c (oasys_bfd_discard_group): Define.
4639 * ppcboot.c (ppcboot_bfd_discard_group): Define.
4640 * som.c (som_bfd_discard_group): Define.
4641 * srec.c (srec_bfd_discard_group): Define.
4642 * tekhex.c (tekhex_bfd_discard_group): Define.
4643 * versados.c (versados_bfd_discard_group): Define.
4644 * vms.c (vms_bfd_discard_group): Define.
4645 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
4646 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
4647 (aix5coff64_vec): Likewise.
4648 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
4650 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4652 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
4653 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
4654 (elf32-sh64-com.lo): New dependency list.
4655 * Makefile.in: Regenerate.
4656 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
4657 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
4659 * configure: Regenerate.
4660 * elf32-sh64.c (sh64_address_in_cranges)
4661 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
4662 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
4663 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
4664 * elf32-sh64-com.c: ...here. New file.
4666 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4668 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
4669 ATTRIBUTE_UNUSED on used params.
4670 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
4671 before calling bfd_section_from_elf_index on local syms.
4672 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4674 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4676 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
4677 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
4678 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
4679 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
4680 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
4681 * Makefile.in: Regenerate.
4682 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
4683 (sh64-*-netbsd*): New targets.
4684 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
4685 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
4686 * configure: Regenerate.
4687 * elf32-sh64-nbsd.c: New file.
4688 * elf64-sh64-nbsd.c: New file.
4689 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
4690 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
4691 bfd_elf64_sh64lnbsd_vec.
4693 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4695 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
4696 (bfd_section_from_shdr): Likewise. Set section name of group
4697 sections from signature.
4698 (group_signature): Split out from setup_group. Ensure symbol table
4700 (bfd_elf_discard_group): New function.
4701 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
4702 .gnu.linkonce* sections if they are members of a group.
4703 (set_group_contents): Set GRP_COMDAT flag.
4704 * section.c (bfd_discard_group): New function.
4705 * bfd-in.h (bfd_elf_discard_group): Declare.
4706 * bfd-in2.h: Regenerate.
4707 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
4708 (elf_linkonce_p): Define.
4710 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4712 * elf.c (bfd_section_from_shdr): Make "name" const.
4713 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
4714 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
4715 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
4716 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
4717 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
4718 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
4719 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
4720 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
4721 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
4722 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
4723 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
4725 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4727 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
4730 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
4732 * elf32-arc.c: Fix formatting.
4733 * elf32-arm.h: Likewise.
4734 * elf32-cris.c: Likewise.
4735 * elf32-dlx.c: Likewise.
4736 * elf32-hppa.c: Likewise.
4737 * elf32-i386.c: Likewise.
4738 * elf32-i386qnx.c: Likewise.
4739 * elf32-or32.c: Likewise.
4740 * elf32-s390.c: Likewise.
4741 * elf32-sh64.c: Likewise.
4742 * elf32-vax.c: Likewise.
4743 * elf32-xstormy16.c: Likewise.
4744 * elf64-alpha.c: Likewise.
4745 * elf64-mmix.c: Likewise.
4746 * elf64-ppc.c: Likewise.
4747 * elf64-s390.c: Likewise.
4748 * elf64-sh64.c: Likewise.
4749 * elf64-x86-64.c: Likewise.
4751 2002-06-02 Richard Henderson <rth@redhat.com>
4753 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
4754 null when there are no got entries for a symbol.
4755 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
4756 uninitialized variable warning.
4758 2002-06-01 Richard Henderson <rth@redhat.com>
4760 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
4761 undefined symbols here.
4762 (elf64_alpha_relax_section): Do it here. Also test for not
4763 defined in the current module.
4764 (elf64_alpha_relocate_section_r): Split out of ...
4765 (elf64_alpha_relocate_section): ... here. Don't dereference
4766 NULL when looking up local got entries.
4768 2002-06-01 Richard Henderson <rth@redhat.com>
4770 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
4771 symbols from JSR relaxation.
4772 (elf64_alpha_size_plt_section_1): New.
4773 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
4774 (elf64_alpha_size_rela_got_1): ... here.
4775 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
4776 (elf64_alpha_size_rela_got_section): ... here.
4777 (elf64_alpha_size_plt_section): New.
4778 (elf64_alpha_relax_section): Call them.
4779 (elf64_alpha_size_got_sections): Remove output_bfd arg.
4780 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
4782 2002-06-01 Richard Henderson <rth@redhat.com>
4784 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
4785 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
4786 in shared libraries. Fix DTPRELHI and TPRELHI value.
4787 (INSN_ADDQ, INSN_RDUNIQ): New.
4788 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
4789 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
4790 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
4791 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
4792 Handle GOTDTPREL and GOTTPREL relocations.
4793 (elf64_alpha_relax_gprelhilo): New.
4794 (elf64_alpha_relax_tls_get_addr): New.
4795 (elf64_alpha_relax_find_tls_segment): New.
4796 (elf64_alpha_relax_section): Handle TLS relocations.
4797 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
4798 (elf64_alpha_check_relocs): Set it.
4800 2002-06-01 Richard Henderson <rth@redhat.com>
4802 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
4804 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
4805 check; don't suppress dynamic relocs for non-allocated sections.
4807 * elf64-alpha.c: Remove dead code.
4809 2002-05-31 Alan Modra <amodra@bigpond.net.au>
4811 * bfd-in2.h: Regenerate.
4812 * libbfd.h: Regenerate.
4813 * po/SRC-POTFILES.in: Regenerate.
4815 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
4818 2002-05-31 Graeme Peterson <gp@qnx.com>
4820 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
4821 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
4823 * Makefile.in: Regenerate.
4824 * config.bfd: Add i[3456]86-*-nto-qnx* support.
4825 * configure.in: Add bfd_elf32_i386qnx_vec support.
4826 * configure: Regenerate.
4827 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
4828 is_contained_by_filepos, and copy_private_bfd_data_p.
4829 * elf.c (assign_file_positions_for_segments): Call backend
4830 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
4831 (IS_CONTAINED_BY_FILEPOS): Define.
4832 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
4833 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
4834 Fix non-K&R call to _bfd_error_handler.
4835 (_bfd_elf_copy_private_section_data): Use backend
4836 copy_private_bfd_data_p.
4837 * elf32-i386.c: Don't include elfxx-target.h when
4838 ELF32_I386_C_INCLUDED is defined.
4839 * elf32-i386qnx.c: New QNX elf backend file.
4840 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
4841 elf_backend_is_contained_by_filepos, and
4842 elf_backend_do_copy_private_bfd_data.
4843 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
4845 2002-05-31 Alan Modra <amodra@bigpond.net.au>
4847 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
4848 Move other similar defines to start of file.
4850 2002-05-30 Tom Rix <trix@redhat.com>
4852 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
4853 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
4855 2002-05-30 Richard Henderson <rth@redhat.com>
4857 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
4858 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
4859 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
4860 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
4861 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
4862 (struct alpha_elf_obj_tdata): Rename total_got_entries and
4863 n_local_got_entries to total_got_size and local_got_size.
4864 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
4865 (alpha_got_entry_size): New.
4866 (elf64_alpha_relax_with_lituse): Use it.
4867 (elf64_alpha_relax_without_lituse): Likewise.
4868 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
4869 (get_got_entry): New.
4870 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
4871 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
4872 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
4873 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
4874 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
4875 (elf64_alpha_calc_got_offsets): Likewise.
4876 (alpha_dynamic_entries_for_reloc): New.
4877 (elf64_alpha_calc_dynrel_sizes): Use it.
4878 (elf64_alpha_size_dynamic_sections): Likewise.
4879 (elf64_alpha_relocate_section): Handle TLS relocations.
4880 * reloc.c: Add Alpha TLS relocations.
4881 * bfd-in2.h, libbfd.h: Rebuild.
4883 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4885 * peXXigen.c (pe_print_idata): Remove double printed
4886 import table lines; add Bound-To comment.
4888 2002-05-29 Matt Thomas <matt@3am-software.com>
4890 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
4891 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
4892 (elf32-vax.lo): New rule.
4893 * Makefile.in: Regenerate.
4894 * configure.in (bfd_elf32_vax_vec)
4895 (vaxnetbsd_vec): New vectors.
4896 * configure: Regenerate.
4897 * config.bfd (vax-*-netbsdelf*)
4899 (vax-*-netbsd*): New targets.
4900 * elf32-vax.c: New file.
4901 * reloc.c: Add VAX relocations.
4902 * bfd-in2.h: Regenerate.
4903 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
4905 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
4907 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
4908 and bfd_elf32_bigarm_vec to targ_selvecs.
4910 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4912 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
4913 with auto-imported symbols.
4915 2002-05-29 Adam Nemet <anemet@lnxw.com>
4917 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
4918 sections only record bfd.
4919 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
4920 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
4921 * bfd-in2.h: Regenerate.
4923 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
4925 * syms.c (_bfd_stab_section_find_nearest_line): Move
4926 declaration and initialisation of saw_line and saw_func out of
4929 2002-05-29 Alan Modra <amodra@bigpond.net.au>
4931 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
4932 (bfd_elf64_get_symbol_info): Define.
4933 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
4935 2002-05-29 Andrey Volkov <avolkov@transas.com>
4937 * cpu-h8300.c: Make default h8300 machine first in machine list.
4939 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
4941 * config.bfd: Added DLX configuraton.
4942 * Makefile.am: Added DLX configuraton.
4943 * configure.in: Added DLX configuraton.
4944 * archures.c: Add DLX architecure.
4945 * reloc.c: Add DLX relocs.
4946 * targets.c: Added DLX target vector.
4947 * configure: Regenerate.
4948 * Makefile.in: Regenreate.
4949 * bfd-in2.h: Regenreate.
4950 * elf32-dlx.c: New file: Support DLX target.
4951 * cpu-dlx.c: New file: Support DLX target.
4953 2002-05-25 Alan Modra <amodra@bigpond.net.au>
4955 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
4957 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
4958 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
4959 strings to point inside function code sym string.
4960 (func_desc_adjust): Likewise.
4961 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
4963 2002-05-24 Michal Ludvig <mludvig@suse.cz>
4965 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
4966 (elf64_x86_64_grok_psinfo): Added.
4968 2002-05-24 TAMURA Kent <kent@netbsd.org>
4970 * config.bfd: Add a target for i386-netbsdpe.
4972 2002-05-24 Alan Modra <amodra@bigpond.net.au>
4974 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
4975 and is_func_descriptor.
4976 (func_desc_adjust): Hide function code sym in shared libs unless
4977 there is a matching exported function descriptor sym.
4979 2002-05-23 Jakub Jelinek <jakub@redhat.com>
4981 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
4982 for symbols from SHF_TLS section.
4983 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
4984 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
4985 (map_sections_to_segments): Build PT_TLS segment if necessary.
4986 (assign_file_positions_for_segments): Likewise.
4987 (get_program_header_size): Account for PT_TLS segment.
4988 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
4989 SEC_THREAD_LOCAL sections to STT_TLS.
4990 * reloc.c: Add 386 and IA-64 TLS relocs.
4991 * section.c (SEC_THREAD_LOCAL): Define.
4992 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
4994 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
4995 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
4997 (struct elf_final_link_info): Add first_tls_sec.
4998 (elf_bfd_final_link): Set first_tls_sec.
4999 Compute elf_hash_table (info)->tls_segment.
5000 (elf_link_output_extsym): Handle STT_TLS symbols.
5001 (elf_link_input_bfd): Likewise.
5002 * syms.c (BSF_THREAD_LOCAL): Define.
5003 * bfd-in2.h: Rebuilt.
5004 * libbfd.h: Rebuilt.
5005 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5006 elf_i386_mkobject, elf_i386_object_p): New functions.
5007 (elf_howto_table): Add TLS relocs.
5008 (elf_i386_reloc_type_lookup): Support TLS relocs.
5009 (elf_i386_info_to_howto_rel): Likewise.
5010 (struct elf_i386_link_hash_entry): Add tls_type.
5011 (struct elf_i386_obj_tdata): New.
5012 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5014 (struct elf_i386_link_hash_table): Add tls_ldm_got.
5015 (link_hash_newfunc): Clear tls_type.
5016 (elf_i386_check_relocs): Support TLS relocs.
5017 (elf_i386_gc_sweep_hook): Likewise.
5018 (allocate_dynrelocs): Likewise.
5019 (elf_i386_size_dynamic_sections): Likewise.
5020 (elf_i386_relocate_section): Likewise.
5021 (elf_i386_finish_dynamic_symbol): Likewise.
5022 (bfd_elf32_mkobject, elf_backend_object_p): Define.
5023 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5024 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5025 want_tprel, want_dtpmod, want_dtprel.
5026 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5027 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5028 R_IA64_LTOFF_TPREL22.
5029 (elf_code_to_howto_index): Add TLS relocs.
5030 (elfNN_ia64_check_relocs): Support TLS relocs.
5031 (allocate_global_data_got): Account for TLS .got data.
5032 (allocate_dynrel_entries): Account for TLS dynamic relocations.
5033 (elfNN_ia64_install_value): Supprt TLS relocs.
5034 (set_got_entry): Support TLS relocs.
5035 (elfNN_ia64_relocate_section): Likewise.
5037 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
5039 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5040 BLX reloc round the relocation up rather than down.
5041 * coff-arm.c (coff_arm_relocate_section): Likewise.
5043 2002-05-21 H.J. Lu (hjl@gnu.org)
5045 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
5048 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5050 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
5051 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
5053 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5055 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
5057 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
5059 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5061 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
5064 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5066 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
5068 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
5069 return with false on error.
5070 (elf_link_input_bfd): Check reloc_emitter return value.
5072 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
5074 * config.bfd (armeb-*-netbsdelf*): New target.
5076 2002-05-20 Alan Modra <amodra@bigpond.net.au>
5078 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5079 at the plt call stub.
5081 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5083 * cpu-mips.c (mips_compatible): Don't try to check machine
5086 2002-05-18 Tom Rix <trix@redhat.com>
5088 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
5090 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5092 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5093 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5094 we've already warned about an undefined symbol. Report more
5095 detail on reloc errors.
5097 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5099 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5100 * configure.in: Invoke AM_INSTALL_LIBBFD.
5101 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
5102 (install_libbfd): .. New target.
5103 (uninstall_libbfd): Likewise.
5104 (install-bfdlibLTLIBRARIES): Likewise.
5105 (uninstall-bfdlibLTLIBRARIES): Likewise.
5107 (bfdincludedir): New.
5108 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5109 * aclocal.m4: Regenerate.
5110 * configure: Regenerate.
5111 * Makefile.in: Regenerate.
5113 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
5115 * hash.c (bfd_hash_lookup): Remove computation of len from inside
5118 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
5120 * config.bfd: Add targets for sh64-linux (little endian and
5123 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
5125 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5126 is located in the same section as the import table. Instead
5127 check, and if necessary load the section containing the thunk.
5129 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
5131 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
5133 (xcoff64_core_file_matches_executable_p): Replace bfd_read
5136 2002-05-15 Alan Modra <amodra@bigpond.net.au>
5138 * aix5ppc-core.c: Warning fixes.
5139 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5140 * aout-target.h (MY_bfd_link_just_syms): Define.
5141 * aout-tic30.c (MY_bfd_link_just_syms): Define.
5142 * bfd.c (bfd_link_just_syms): Define.
5143 * binary.c (binary_bfd_link_just_syms): Define.
5144 * bout.c (b_out_bfd_link_just_syms): Define.
5145 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5146 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5147 * coffcode.h (coff_bfd_link_just_syms): Define.
5148 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5149 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5150 (_bfd_elf_link_just_syms): Declare.
5151 * elf.c (_bfd_elf_link_just_syms): New function.
5152 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5153 sections haven't already been discarded by the linker.
5154 * elflink.h (elf_link_add_object_symbols): Likewise for stab
5155 sections and SEC_MERGE sections.
5156 (elf_bfd_discard_info): Similarly here.
5157 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5158 * i386msdos.c (msdos_bfd_link_just_syms): Define.
5159 * i386os9k.c (os9k_bfd_link_just_syms): Define.
5160 * ieee.c (ieee_bfd_link_just_syms): Define.
5161 * ihex.c (ihex_bfd_link_just_syms): Define.
5162 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5163 (_bfd_generic_link_just_syms): Declare.
5164 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5165 * linker.c (_bfd_generic_link_just_syms): New function.
5166 * mmo.c (mmo_bfd_link_just_syms): Define.
5167 * nlm-target.h (nlm_bfd_link_just_syms): Define.
5168 * oasys.c (oasys_bfd_link_just_syms): Define.
5169 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5170 * som.c (som_bfd_link_just_syms): Define.
5171 * srec.c (srec_bfd_link_just_syms): Define.
5172 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5173 (BFD_JUMP_TABLE_LINK): And here.
5174 * tekhex.c (tekhex_bfd_link_just_syms): Define.
5175 * versados.c (versados_bfd_link_just_syms): Define.
5176 * vms.c (vms_bfd_link_just_syms): Define.
5177 * libbfd.h: Regenerate.
5178 * bfd-in2.h: Regenerate.
5180 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5182 * elf32-mips.c: Remove superfluous definitions copied from
5184 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5185 SGIish vectors to check the special case.
5186 (mips_elf_hi16_reloc): Fix comment.
5187 (mips_elf_got16_reloc): Likewise.
5188 (_bfd_mips_elf32_gprel16_reloc): Likewise.
5189 (elf_reloc_map): Code cleanup.
5190 (mips_reloc_map): Add comment.
5191 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5192 (mips_elf32_rtype_to_howto): Likewise.
5193 (mips_elf32_discard_info): Likewise.
5194 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5195 lead to IRIX compatibility now.
5197 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5199 * elfxx-mips.c: Call it IRIX, not Irix in comments.
5201 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
5203 * config.bfd (shle-*-netbsdelf*): Add target which includes
5206 2002-05-13 David Edelsohn <edelsohn@gnu.org>
5208 * configure.in: Revert 2002-04-07. Instead, auto-configure
5210 * configure: Regenerate.
5211 * config.in: Regenerate.
5212 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5215 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5217 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5219 * configure: Regenerate.
5221 2002-05-13 Alan Modra <amodra@bigpond.net.au>
5223 * Makefile.am (install-data-local): Install headers to
5224 $(exec_prefix)/include.
5225 * Makefile.in: Regenerate.
5227 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5228 Daniel Jacobowitz <drow@mvista.com>
5230 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
5233 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5235 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5236 hppa*-*-openbsd*): New targets.
5237 * configure.in (alpha*-*-openbsd*): Set COREFILE.
5238 * configure: Regenerate.
5240 2002-05-10 Tom Rix <trix@redhat.com>
5242 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
5243 xcoff64_ppc_relocate_section.
5244 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5245 * libxcoff.h: Common xcoff_reloc_type function declaration.
5247 2002-05-10 Alan Modra <amodra@bigpond.net.au>
5249 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
5250 added in 2002-05-09 commit.
5252 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5253 don't look for stubs on all undefined syms.
5255 2002-05-09 Alan Modra <amodra@bigpond.net.au>
5257 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5258 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5261 * elf32-i386.c (elf_howto_table): Comments.
5262 (elf_i386_relocate_section): Handle more relocs for relocatable
5263 linking and against SEC_MERGE sections.
5265 2002-05-08 Alan Modra <amodra@bigpond.net.au>
5267 * elf32-ppc.c (ppc_elf_create_got): New function.
5268 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
5269 _bfd_elf_create_dynamic_sections. Correct .plt flags.
5270 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5271 _bfd_elf_create_got_section.
5273 2002-05-07 Alan Modra <amodra@bigpond.net.au>
5275 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5276 * elfxx-target.h (elf_backend_rela_normal): Define.
5277 (elfNN_bed): Init rela_normal.
5278 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5279 for section symbols here if rela_normal. Simplify abs section test.
5280 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5281 return immediately. Remove code handling relocatable linking.
5282 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5283 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5284 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5285 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5286 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5287 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5288 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5289 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5290 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5291 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5292 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5293 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5294 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5295 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5296 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
5297 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5298 * elf-m10200.c (elf_backend_rela_normal): Define.
5299 * elf-m10300.c (elf_backend_rela_normal): Define.
5300 * elf32-fr30.c (elf_backend_rela_normal): Define.
5301 * elf32-i370.c (elf_backend_rela_normal): Define.
5302 * elf32-i860.c (elf_backend_rela_normal): Define.
5303 * elf32-m68k.c (elf_backend_rela_normal): Define.
5304 * elf32-mcore.c (elf_backend_rela_normal): Define.
5305 * elf32-openrisc.c (elf_backend_rela_normal): Define.
5306 * elf32-ppc.c (elf_backend_rela_normal): Define.
5307 * elf32-s390.c (elf_backend_rela_normal): Define.
5308 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
5309 * elf64-ppc.c (elf_backend_rela_normal): Define.
5310 * elf64-s390.c (elf_backend_rela_normal): Define.
5311 * elf64-x86-64.c (elf_backend_rela_normal): Define.
5312 * elfxx-ia64.c (elf_backend_rela_normal): Define.
5313 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
5314 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
5316 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
5318 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
5319 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
5321 2002-05-06 Alan Modra <amodra@bigpond.net.au>
5323 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
5324 when not relocatable. Fix reloc_emitter call for K&R.
5326 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5328 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
5329 reloading local sym addend mistakenly removed in 2002-05-01 change.
5331 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
5332 (read_abbrevs): Change "offset" param to bfd_vma.
5333 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
5334 Change "abbrev_offset" to bfd_vma.
5335 (read_indirect_string): Use correct conversion chars in error
5336 message format string, cast bfd_vma's to unsigned long.
5337 (read_abbrevs): Likewise.
5338 (read_attribute_value): Likewise.
5339 (decode_line_info): Likewise.
5340 (scan_unit_for_functions): Likewise.
5341 (parse_comp_unit): Likewise.
5343 2002-05-04 Tom Rix <trix@redhat.com>
5345 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
5346 (coff_swap_reloc_out): Same.
5347 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
5348 (xcoff_swap_reloc_out): Same.
5349 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
5350 case some 16 bit relocs. Add reloc value to output.
5351 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
5352 R_RBR. Improve names.
5353 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
5354 (bfd_xcoff_backend_data): Update with new reloc swap names.
5355 (bfd_pmac_xcoff_backend_data) : Same.
5356 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
5357 (xcoff64_swap_reloc_out): Same.
5358 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
5359 R_POS. Add reloc value to output.
5360 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
5361 bit R_RBR. Improve names, masks.
5362 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
5363 (bfd_xcoff_backend_data): Update with new reloc swap names.
5364 (bfd_xcoff_aix5_backend_data) : Same.
5366 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5368 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
5369 bfd_count top_index, input_list, all_local_syms.
5370 (elf32_hppa_setup_section_lists): New function, split from
5371 elf32_hppa_size_stubs.
5372 (elf32_hppa_next_input_section): Likewise.
5373 (group_sections): Likewise.
5374 (get_local_syms): Likewise.
5375 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
5376 stubs on undefined syms too.
5377 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
5378 Only access htab elf fields when we have an elf hash table.
5379 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
5380 (elf32_hppa_next_input_section): Declare.
5382 2002-05-04 Bob Byrnes <byrnes@curl.com>
5384 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
5387 2002-05-03 H.J. Lu (hjl@gnu.org)
5389 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
5390 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
5391 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
5392 to hide a global symbol.
5393 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
5394 forced_local to true.
5396 2002-05-02 Richard Henderson <rth@redhat.com>
5398 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
5399 vs SHN_UNDEF to zero.
5401 2002-05-02 Alan Modra <amodra@bigpond.net.au>
5403 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
5405 <R_PPC64_SECTOFF_DS>: Likewise.
5406 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5408 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
5409 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5412 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
5413 (ppc64_elf_ha_reloc): New function.
5414 (ppc64_elf_brtaken_reloc): New function.
5415 (ppc64_elf_sectoff_reloc): New function.
5416 (ppc64_elf_sectoff_ha_reloc): New function.
5417 (ppc64_elf_toc_reloc): New function.
5418 (ppc64_elf_toc_ha_reloc): New function.
5419 (ppc64_elf_toc64_reloc): New function.
5420 (ppc64_elf_unhandled_reloc): New function.
5421 (ppc64_elf_howto_raw): Use the above.
5422 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
5423 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
5424 <R_PPC64_SECTOFF_DS>: Likewise.
5425 (IS_ABSOLUTE_RELOC): Update.
5426 (struct ppc_link_hash_table): Add have_undefweak.
5427 (ppc64_elf_link_hash_table_create): Init.
5428 (func_desc_adjust): Set have_undefweak.
5429 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
5430 add the .sfpr blr when have_undefweak.
5431 (ppc64_elf_setup_section_lists): Check hash table flavour.
5432 (ppc64_elf_next_input_section): Move output_section->owner test to
5434 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
5435 and relocatable test. Return TOCstart and don't set elf_gp.
5436 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
5437 offset calculation. Add assert on weak sym branch tweaks.
5438 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
5439 (ppc64_elf_toc): Declare.
5440 (ppc64_elf_next_input_section): Update.
5442 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5444 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
5447 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5449 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
5450 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
5451 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
5452 call branches. Correct undefined weak destination.
5453 (ppc64_elf_func_desc_adjust): Always create at least one blr in
5454 .sfpr, and correct case where either only savef* or restf* is
5457 Long branch stubs, multiple stub sections.
5458 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
5459 (ppc64_elf_next_input_section): Declare.
5460 * elf64-ppc.c: Move linker-only prototypes.
5461 (STUB_SUFFIX): Define.
5462 (enum ppc_stub_type): New.
5463 (struct ppc_stub_hash_entry): New.
5464 (struct ppc_branch_hash_entry): New.
5465 (struct ppc_link_hash_entry): Add stub_cache, oh.
5466 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
5467 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
5468 Rename plt_overflow to stub_error.
5469 (ppc_stub_hash_lookup): Define.
5470 (ppc_branch_hash_lookup): Define.
5471 (stub_hash_newfunc): New function.
5472 (branch_hash_newfunc): New function.
5473 (link_hash_newfunc): Init new fields.
5474 (ppc64_elf_link_hash_table_create): Likewise.
5475 (ppc64_elf_link_hash_table_free): New function.
5476 (ppc_stub_name): New function.
5477 (ppc_get_stub_entry): New function.
5478 (ppc_add_stub): New function.
5479 (create_linkage_sections): Use bfd_make_section_anyway. Create
5480 .branch_lt and .rela.branch_lt sections. Don't create .stub.
5481 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
5482 and set up for plt call stubs. Link func and func desc syms.
5483 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
5484 (func_desc_adjust): Avoid hash lookup when func desc sym available
5485 via shortcut, and set links when processing.
5486 (ppc64_elf_hide_symbol): Likewise.
5487 (allocate_dynrelocs): Don't allocate stub section here.
5488 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
5490 (ppc_type_of_stub): New function.
5491 (build_one_stub): Delete.
5492 (ppc_build_one_stub): New function.
5493 (ppc_size_one_stub): New function.
5494 (ppc64_elf_setup_section_lists): New function.
5495 (ppc64_elf_next_input_section): New function.
5496 (group_sections): New function.
5497 (get_local_syms): New function.
5498 (ppc64_elf_size_stubs): Rewrite.
5499 (ppc64_elf_build_stubs): Rewrite.
5500 (ppc64_elf_relocate_section): Look up stub entry for REL24
5501 relocs. Don't propagate REL14* to dynamic objects. Look for long
5502 branch stubs if REL14* or REL24 relocs won't reach.
5503 (bfd_elf64_bfd_link_hash_table_free): Define.
5505 2002-04-30 Mark Mitchell <mark@codesourcery.com>
5507 * config.bfd: Add support for powerpc-*-windiss.
5509 2002-04-30 Tom Rix <trix@redhat.com>
5511 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
5512 symbol names into the hash table.
5514 2002-04-28 Tom Rix <trix@redhat.com>
5516 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
5517 calulating relocations.
5518 (xcoff_complain_overflow) : Function table for relocation errors.
5519 (xcoff_ppc_relocate_section): Use relocation and complain function
5521 (xcoff_complain_overflow_unsigned_func): New complain function.
5522 (xcoff_complain_overflow_signed_func): Same.
5523 (xcoff_complain_overflow_bitfield_func): Same.
5524 (xcoff_complain_overflow_dont_func): Same.
5525 (xcoff_reloc_type_crel): New recot function.
5526 (xcoff_reloc_type_br): Same.
5527 (xcoff_reloc_type_ba): Same.
5528 (xcoff_reloc_type_toc): Same.
5529 (xcoff_reloc_type_rel): Same.
5530 (xcoff_reloc_type_neg): Same.
5531 (xcoff_reloc_type_pos): Same.
5532 (xcoff_reloc_type_fail): Same.
5533 (xcoff_reloc_type_noop): Same.
5534 * libxcoff.h : Declare common parts for xcoff64.
5535 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
5536 and complain function tables.
5538 2002-04-28 Alan Modra <amodra@bigpond.net.au>
5540 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
5541 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
5543 2002-04-26 Alan Modra <amodra@bigpond.net.au>
5545 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
5546 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
5548 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
5549 same as the output before calling elf_link_input_bfd.
5551 * coffcode.h (coff_compute_section_file_positions): Set
5552 section_tail after shuffling section list.
5554 2002-04-24 Christian Groessler <chris@groessler.org>
5556 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
5557 addresses are 23bit with a special layout, not plain 32bit
5558 values. Prevent relocation of immediate values.
5560 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
5562 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
5563 MIPS-16 ASE flags are set, print something to indicate that.
5565 2002-04-23 Alan Modra <amodra@bigpond.net.au>
5567 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
5568 under which a plt call stub is used.
5569 (final_link_relocate): Similarly.
5570 (allocate_plt_static): Clear h-plabel except when plt entry is
5571 exclusively used for a plabel.
5572 (allocate_dynrelocs): Use the above to simplify plt sizing.
5573 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
5574 (elf32_hppa_link_hash_table_create): Init.
5576 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
5577 (elf32_hppa_check_relocs): Set has_22bit_branch.
5579 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
5580 (final_link_relocate): Likewise.
5582 2002-04-22 Jakub Jelinek <jakub@redhat.com>
5584 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
5585 search table if some FDE is DW_EH_PE_aligned encoded either.
5586 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
5588 2002-04-22 Richard Smith <richard@ex-parrot.com>
5589 Jakub Jelinek <jakub@redhat.com>
5591 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
5592 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
5593 encoded personality.
5594 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
5595 for CIE/FDE removal.
5597 2002-04-20 Tom Rix <trix@redhat.com>
5599 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
5601 2002-04-20 Alan Modra <amodra@bigpond.net.au>
5603 * archures.c (bfd_lookup_arch): Move the list order comment..
5604 (struct bfd_arch_info): ..to where it belongs.
5605 * bfd-in2.h: Regenerate.
5607 * archures.c (bfd_lookup_arch): Add comment on list order.
5608 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
5609 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
5610 is always at head of list.
5612 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5614 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
5615 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
5616 definition of these functions for ARM_WINCE builds as they are
5618 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
5619 for ARM_WINCE builds.
5621 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5623 * coff-arm.c (bfd_arm_process_before_allocation):
5625 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
5627 * cpu-sh.c (scan_mach): Delete.
5628 (arch_info_struct): Replace scan_mach with bfd_default_scan.
5629 (bfd_sh_arch): Likewise.
5631 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
5633 * ihex.c (ihex_write_object_contents): Fix check for records
5634 crossing 64K boundaries.
5636 2002-04-16 Alan Modra <amodra@bigpond.net.au>
5638 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
5639 type rather than just assuming entries are ELF.
5640 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5641 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5642 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
5643 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
5644 rather than elf_link_hash_entry.
5646 2002-04-15 Richard Henderson <rth@redhat.com>
5648 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
5651 2002-04-15 Michael Snyder <msnyder@redhat.com>
5653 * opncls.c (bfd_close): Write contents if writeable.
5654 Minor formatting tidy-ups.
5656 2002-04-15 Alan Modra <amodra@bigpond.net.au>
5658 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
5660 2002-04-12 Michael Snyder <msnyder@redhat.com>
5662 * bfd-in.h (bfd_get_section_lma): New access macro.
5663 Minor white-space fix-up.
5665 2002-04-12 Alan Modra <amodra@bigpond.net.au>
5667 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
5670 2002-04-09 DJ Delorie <dj@redhat.com>
5672 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
5674 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
5676 * coffcode.h (coff_read_word): New.
5677 (coff_compute_checksum): New.
5678 (coff_apply_checksum): New.
5679 (coff_write_object_contents): Call coff_apply_checksum () to
5680 apply checksum to PE image.
5682 2002-04-08 Randolph Chung <tausq@debian.org>
5684 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
5685 (elf32_hppa_final_link): Split out sorting logic to..
5686 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
5687 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
5689 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5691 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
5693 * configure: Re-generate.
5695 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5697 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
5698 is greater or equal to 4.3.3.
5699 * configure: Regenerate.
5702 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
5704 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
5705 R_CRIS_32_PCREL>: Fix typo in name.
5706 (cris_elf_check_relocs): Always create .rela.got here when
5707 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
5708 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
5709 assume it's created.
5711 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
5713 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
5714 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
5716 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
5717 * bfd.c (bfd_link_hash_table_free): Define.
5718 * binary.c (binary_bfd_link_hash_table_free): Define.
5719 * bout.c (b_out_bfd_link_hash_table_free): Define.
5720 * coff-rs6000.c (rs6000coff_vec): Include
5721 _bfd_generic_link_hash_table_free.
5722 (pmac_xcoff_vec): Likewise.
5723 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5724 (aix5coff64_vec): Likewise.
5725 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
5726 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
5727 (bfd_elf32_bfd_link_hash_table_free): Define.
5728 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
5729 (bfd_elf32_bfd_link_hash_table_free): Define.
5730 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
5732 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
5733 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
5734 * ieee.c (ieee_bfd_link_hash_table_free): Define.
5735 * ihex.c (ihex_bfd_link_hash_table_free): Define.
5736 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
5737 (_bfd_generic_link_hash_table_free): Add prototype.
5738 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
5739 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
5740 * linker.c (_bfd_generic_link_hash_table_free): New function.
5741 * mmo.c (mmo_bfd_link_hash_table_free): Define.
5742 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
5743 * oasys.c (oasys_bfd_link_hash_table_free): Define.
5744 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
5745 * som.c (som_bfd_link_hash_table_free): Define.
5746 * srec.c (srec_bfd_link_hash_table_free): Define.
5747 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
5748 * versados.c (versados_bfd_link_hash_table_free): Define.
5749 * vms.c (vms_bfd_link_hash_table_free): New function.
5750 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
5752 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
5753 instead of bfd_alloc.
5754 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
5755 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
5756 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
5757 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
5758 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
5759 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
5760 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
5761 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
5762 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
5763 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
5764 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
5765 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
5766 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
5767 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
5768 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
5769 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
5770 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
5771 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
5772 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
5773 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
5774 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
5775 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
5776 * m68klinux.c (linux_link_hash_table_create): Likewise.
5777 * sparclinux.c (linux_link_hash_table_create): Likewise.
5778 * sunos.c (sunos_link_hash_table_create): Likewise.
5779 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
5781 * targets.c: Add _bfd_link_hash_table_free to xvec.
5783 * bfd-in2.h: Regenerate.
5784 * libbfd.h: Regenerate.
5785 * libcoff.h: Regenerate.
5787 2002-04-04 Alan Modra <amodra@bigpond.net.au>
5789 * dep-in.sed: Cope with absolute paths.
5790 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
5792 * Makefile.in: Regenerate.
5793 * coff-arm.c: Fix copyright date.
5794 * cpu-h8300.c: Likewise.
5795 * cpu-i370.c: Likewise.
5796 * cpu-s390.c: Likewise.
5797 * cpu-mips.c: Likewise.
5798 * po/SRC-POTFILES.in: Regenerate.
5800 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5802 * Makefile.am: Add elfxx-mips.c to the known backends.
5803 (elf32-mips.lo): remove dependency to coff/external.h.
5804 * Makefile.in: Regenerate.
5805 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
5806 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
5808 * configure: Regenerate.
5809 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
5810 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
5811 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
5812 MIPS specific backend functions.
5813 * elf32-mips.c: Moved most code to elfxx-mips.c.
5814 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
5816 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
5817 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
5818 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
5819 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
5820 interface to allow selection of the right REL or RELA howto table.
5821 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
5822 static. Let it refuse n32 objects.
5823 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
5824 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
5825 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
5826 (elf32_mips_ignore_discarded_relocs): Rename from
5827 _bfd_elf32_mips_ignore_discarded_relocs.
5828 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
5829 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
5830 (elf_mips_howto_table_rela): Remove.
5831 * elf64-mips.c: Moved most code to elfxx-mips.c.
5832 (bfd_elf64_bfd_reloc_type_lookup): Make static.
5833 (mips_elf64_rtype_to_howto): New function.
5834 (mips_elf64_object_p): Likewise.
5835 (elf64_mips_irix_compat): Likewise.
5836 * elfxx-mips.c: New file containing common code merged together from
5837 elf32-mips.c and elf64-mips.c.
5838 * elfxx-mips.h: New file containing MIPS specific prototypes from
5840 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
5841 elf_backend_mips_rtype_to_howto.
5843 2002-04-04 Alan Modra <amodra@bigpond.net.au>
5845 * srec.c (MAXCHUNK, Chunk): Revise comments.
5846 (srec_write_record): Correct buffer size.
5847 (srec_write_header): Do without intermediate buffer.
5848 (srec_write_section): Validate Chunk.
5849 (srec_write_terminator): Pass NULL instead of dummy buffer.
5850 (srec_write_symbols): Pass file and symbol names directly to
5851 bfd_bwrite so sprintf won't overflow buffer.
5853 2002-04-03 Jakub Jelinek <jakub@redhat.com>
5855 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
5856 PC relative relocs against hidden symbols.
5857 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5859 2002-04-03 Alan Modra <amodra@bigpond.net.au>
5861 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
5862 LMAs, loop over segments until p_vaddr and p_memsz specify an
5863 extent enclosing the section.
5865 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
5867 * ihex.c (ihex_write_object_contents): Do not allow records to
5868 cross a 64K boundary - wrap if necessary.
5870 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
5872 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
5873 which caused the returned LWP ID to always be 0.
5875 2002-04-01 Richard Henderson <rth@redhat.com>
5877 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5878 (elf32_sparc_relocate_section): Use it to figure out when to
5879 initialize .got entries.
5880 * elf64-sparc.c: Similarly.
5882 2002-03-28 Alan Modra <amodra@bigpond.net.au>
5884 * linker.c (link_action): Ignore duplicate warning syms.
5885 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
5886 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
5887 (elf_adjust_dynamic_symbol): Likewise.
5888 (elf_export_symbol): Likewise.
5889 (elf_link_find_version_dependencies): Likewise.
5890 (elf_link_assign_sym_version): Likewise.
5891 (elf_link_sec_merge_syms): Likewise.
5892 (elf_link_output_extsym): Likewise.
5893 (elf_gc_sweep_symbol): Likewise.
5894 (elf_gc_propagate_vtable_entries_used): Likewise.
5895 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5896 (elf_gc_allocate_got_offsets): Likewise.
5897 (elf_collect_hash_codes): Likewise.
5898 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
5899 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
5900 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5901 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
5902 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
5903 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
5904 (elf_cris_discard_excess_dso_dynamics): Likewise.
5905 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
5906 (mark_PIC_calls): Likewise.
5907 (allocate_plt_static): Likewise.
5908 (allocate_dynrelocs): Likewise.
5909 (readonly_dynrelocs): Likewise.
5910 * elf32-i386.c (allocate_dynrelocs): Likewise.
5911 (readonly_dynrelocs): Likewise.
5912 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
5913 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
5914 * elf32-mips.c (mips_elf_output_extsym): Likewise.
5915 (mips_elf_sort_hash_table_f): Likewise.
5916 (mips_elf_check_mips16_stubs): Likewise.
5917 * elf32-s390.c (allocate_dynrelocs): Likewise.
5918 (readonly_dynrelocs): Likewise.
5919 * elf32-sh.c (sh_elf_discard_copies): Likewise.
5920 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
5921 (xstormy16_relax_plt_realloc): Likewise.
5922 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
5923 (elf64_alpha_output_extsym): Likewise.
5924 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
5925 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
5926 (mips_elf64_check_mips16_stubs): Likewise.
5927 (mips_elf64_output_extsym): Likewise.
5928 * elf64-ppc.c (func_desc_adjust): Likewise.
5929 (allocate_dynrelocs): Likewise.
5930 (readonly_dynrelocs): Likewise.
5931 * elf64-s390.c (allocate_dynrelocs): Likewise.
5932 (readonly_dynrelocs): Likewise.
5933 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
5934 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
5935 (readonly_dynrelocs): Likewise.
5936 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
5937 * aoutx.h (aout_link_write_other_symbol): Likewise.
5938 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
5939 (_bfd_coff_write_global_sym): Likewise.
5940 * i386linux.c (linux_tally_symbols): Likewise.
5941 * m68klinux.c (linux_tally_symbols): Likewise.
5942 * sparclinux.c (linux_tally_symbols): Likewise.
5943 * pdp11.c (aout_link_write_other_symbol): Likewise.
5944 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
5945 * xcofflink.c (xcoff_build_ldsyms): Likewise.
5946 (xcoff_write_global_symbol): Likewise.
5948 * cofflink.c (_bfd_coff_final_link): Formatting.
5949 * cpu-mips.c (mips_compatible): Make static, prototype.
5950 * elf32-i386.c (elf_i386_check_relocs): Formatting.
5951 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
5952 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
5953 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
5954 (mips_elf64_final_link): Likewise.
5955 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
5958 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
5960 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
5961 (SWAP_OUT_RELOC_OFFSET): Define.
5963 2002-03-27 Gregory Steuck <greg@nest.cx>
5965 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
5966 terminating NULL if empty symbol table.
5967 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
5969 2002-03-26 H.J. Lu (hjl@gnu.org)
5971 * elflink.h (elf_link_input_bfd): Revert the last change since
5972 the gcc exception handling isn't fixed yet.
5974 2002-03-26 H.J. Lu (hjl@gnu.org)
5976 * elflink.h (elf_link_input_bfd): Complain about relocations
5977 against local symbols in discarded sections.
5979 2002-03-26 Alan Modra <amodra@bigpond.net.au>
5981 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
5983 2002-03-23 Alan Modra <amodra@bigpond.net.au>
5985 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
5986 section file offset for !SEC_LOAD sections.
5988 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
5990 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
5991 <case R_ARM_GOT>): Handle relocations to Thumb functions.
5993 2002-03-21 Alan Modra <amodra@bigpond.net.au>
5995 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
5997 * archive.c: Update copyright date.
5998 * bfd-in2.h: Regenerate.
5999 * libbfd.h: Regenerate.
6000 * Makefile.am: Run "make dep-am"
6001 * Makefile.in: Regenerate.
6002 * po/SRC-POTFILES.in: Regenerate.
6004 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
6006 * dwarf2.c (struct funcinfo): Move up.
6007 (lookup_address_in_function_table): New argument function_ptr.
6009 (lookup_address_in_line_table): New argument function. If function
6010 is non-NULL, use it to handle ``addr'' before the first line note of
6012 (comp_unit_find_nearest_line): Update and swap calls to
6013 lookup_address_in_function_table and lookup_address_in_line_table.
6014 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6015 N_SLINE encountered if we see an N_FUN before any N_SLINE.
6017 2002-03-20 Tom Rix <trix@redhat.com>
6019 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
6020 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
6021 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
6023 2002-03-19 Tom Rix <trix@redhat.com>
6025 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
6026 dynamic objects in archives.
6028 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
6030 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6031 STT_NOTYPE symbols to STT_OBJECT.
6033 2002-03-18 Jan Hubicka <jh@suse.cz>
6035 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6037 2002-03-18 Tom Rix <trix@redhat.com>
6039 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6040 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6041 * coff-rs6000 (do_pad) : New function for archive padding.
6042 (do_copy) : New function for object file copying in archives.
6043 (do_shared_object_padding) : New function for padding shared
6044 objects to their text section alignment in archives.
6045 (bfd_xcoff_ar_achive_set_magic) : Stub.
6046 (xcoff_write_armap_big) : Use do_copy and do_pad.
6047 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
6049 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
6050 bfd_xcoff_magic_number.
6051 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
6053 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
6054 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
6055 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
6056 * rs6000-core.c : Update copyright date.
6057 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
6059 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
6060 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
6061 (coff_set_flags) : Use bfd_xcoff_magic_number.
6062 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
6063 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
6064 * Makefile.am : Same.
6065 * config.bfd : Same.
6067 * configure : Regnerate.
6068 * Makefile.in : Same.
6071 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
6073 * po/fr.po: Updated version.
6075 2002-03-18 Alan Modra <amodra@bigpond.net.au>
6077 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6078 * libbfd.h: Regenerate.
6079 * archive.c (coff_write_armap): Pass on failures from
6080 bfd_write_bigendian_4byte_int.
6082 2002-03-14 H.J. Lu <hjl@gnu.org>
6084 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6085 error to bfd_error_nonrepresentable_section for reinit_array
6088 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6090 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6091 OR it in rather than replacing previously selected flags.
6093 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6094 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6096 2002-03-14 Alan Modra <amodra@bigpond.net.au>
6098 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
6100 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
6101 ensure reloc size matches before calling elf_link_input_bfd.
6102 Add an assert to check reloc size when counting output relocs.
6104 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6106 * mmo.c (mmo_get_loc): Return NULL rather than false.
6108 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
6110 * po/fr.po: Updated version.
6112 2002-03-13 Alan Modra <amodra@bigpond.net.au>
6114 * archures.c (bfd_default_compatible): Test bits_per_word.
6115 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
6116 bfd_default_compatible.
6117 * cpu-i370.c (i370_compatible): Likewise.
6118 * cpu-sparc.c (sparc_compatible): Likewise.
6119 * cpu-h8300.c (compatible): Test in->arch == out->arch.
6121 * elflink.h: Formatting fixes.
6122 (elf_link_output_extsym): Merge undefined and undef weak cases.
6124 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6125 when word size of input matches output word size.
6127 2002-03-12 Andreas Jaeger <aj@suse.de>
6129 * cpu-i386.c (i386_compatible): New. Use it instead of
6130 bfd_default_compatible.
6132 2002-03-07 H.J. Lu (hjl@gnu.org)
6134 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6135 as the type for bfd_reloc_val.
6137 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
6139 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6140 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6141 (elf_hppa_final_link_relocate): Correct relocations for indirect
6142 references to local data through the DLT. Fix .opd creation for
6143 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6144 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
6145 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6146 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6147 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6148 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6149 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6151 2002-03-05 Jakub Jelinek <jakub@redhat.com>
6153 * merge.c (_bfd_merge_sections): Don't segfault if there
6154 is nothing to merge due to GC.
6156 2002-03-05 Alan Modra <amodra@bigpond.net.au>
6158 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6159 symbols that have been forced local.
6161 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6162 to output forced local syms for non-shared link.
6163 (elf_link_output_extsym): Tweak condition for calling backend
6164 adjust_dynamic_symbol so that previous behaviour is kept.
6165 Whitespace changes throughout file.
6167 2002-03-04 H.J. Lu <hjl@gnu.org>
6169 * elf.c (bfd_section_from_shdr): Handle special sections,
6170 .init_array, .fini_array and .preinit_array.
6171 (elf_fake_sections): Likewise.
6173 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6174 DT entry only if the section is in output for .init_array,
6175 .fini_array and .preinit_array. Complain about .preinit_array
6177 (elf_bfd_final_link): Warn zero size for .init_array,
6178 .fini_array and .preinit_array sections.
6180 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6181 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6182 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6185 2002-03-04 Alan Modra <amodra@bigpond.net.au>
6187 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6188 * configure: Regenerate.
6190 2002-03-02 Tom Rix <trix@redhat.com>
6192 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6194 * coff-rs6000.c (xcoff_howto_table): Same.
6196 2002-03-01 David Mosberger <davidm@hpl.hp.com>
6198 * elflink.h (size_dynamic_sections): If section named
6199 ".preinit_array" exists, create DT_PREINIT_ARRAY and
6200 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
6201 ".init_array" and ".fini_array".
6202 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6203 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6206 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
6208 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6211 2002-02-25 Alan Modra <amodra@bigpond.net.au>
6213 * elf64-hppa.h: Update copyright date.
6215 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6216 (ppc64_elf_relocate_section): Don't generate power4 style branch
6217 hints for *_BRTAKEN and *_BRNTAKEN relocs.
6219 2002-02-22 Jakub Jelinek <jakub@redhat.com>
6221 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6223 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6225 2002-02-21 Andreas Jaeger <aj@suse.de>
6227 * elf64-x86-64.c: Major rework that introduces all recent changes
6228 to the x86-64 backend. Get a closer match to elf32-i386.
6229 (struct elf64_x86_64_dyn_relocs): Rename from
6230 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
6232 (struct elf64_x86_64_link_hash_table): Add short cuts to some
6234 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6235 remove casts, initialize new hash members.
6236 (create_got_section): New.
6237 (elf64_x86_64_create_dynamic_sections): New.
6238 (elf64_x86_64_copy_indirect_symbol): New.
6239 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6240 relocs, .got or .relgot here but do it in allocate_dynrelocs.
6241 Reference count possible .plt and .got entries. Don't test input
6242 section SEC_READONLY here to try to avoid copy relocs, and keep
6243 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
6244 DF_TEXTREL here. Delay setting of variables until needed. Cache
6245 pointer to "sreloc" section in elf_section_data. Tweak condition
6246 under which .got created. Report files with bad relocation
6248 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6249 Reference count possible .plt entries. Don't deallocate .got and
6251 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
6252 do copy reloc processing for weakdefs. Remove redundant casts and
6253 aborts. Delay setting of vars until needed. Move creation of
6254 dynamic symbols and allocation of .plt and .rela.plt to
6255 allocate_dynrelocs. Replace BFD_ASSERT with abort.
6256 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6257 (allocate_dynrelocs): New.
6258 (readonly_dynrelocs): New.
6259 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6260 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
6261 Zero out the dynamic allocated content space.
6262 (elf64_x86_64_discard_copies): Removed.
6263 (elf64_x86_64_relocate_section): Make use of dynamic section
6264 short-cuts. Localise vars, and delay setting. Better error
6265 reporting, replace BFD_ASSERT with abort. Check
6266 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6267 regular object file and tread the weak definition as the normal
6268 one. Don't discard relocs for undefweak or undefined symbols and
6269 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6271 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6272 symbols that have been forced local. Use same test to decide if
6273 we can use a relative reloc for got as relocate_section. Expand
6274 SHN_UNDEF comment. Move expressions out of function calls.
6275 Replace BFD_ASSERT with abort.
6276 (bfd_elf64_bfd_final_link): Removed.
6277 (elf_backend_copy_indirect_symbol): Define.
6279 2002-02-20 Tom Rix <trix@redhat.com>
6281 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6282 (_bfd_xcoff_reloc_type_lookup): Use it.
6283 * coff64-rs6000.c (xcoff64_howto_table): Same.
6284 (xcoff64_reloc_type_lookup): Same.
6286 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
6288 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
6291 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
6293 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6294 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6295 * bfd-in2.h: Regenerate.
6296 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
6297 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
6299 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
6300 (elf_s390_reloc_type_lookup): Likewise.
6301 (elf_s390_check_relocs): Likewise.
6302 (elf_s390_gc_sweep_hook): Likewise.
6303 (elf_s390_relocate_section): Likewise.
6304 (elf_s390_object_p): Use renamed architecture define.
6305 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
6307 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
6309 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
6311 2002-02-19 Jakub Jelinek <jakub@redhat.com>
6313 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
6314 absptr -> pcrel optimization for shared libs.
6315 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
6316 library cannot be converted to pcrel.
6317 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
6319 * elf32-i386.c (elf_i386_relocate_section): If
6320 _bfd_elf_section_offset returned -2, skip, but make sure the
6321 relocation is installed.
6322 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
6323 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6324 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6325 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6326 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6327 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6328 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6329 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6330 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6331 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6332 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6333 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6334 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6335 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6336 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
6337 _bfd_elf_section_offset returning -2 the same way as -1.
6338 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
6339 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
6341 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
6343 2002-02-18 Tom Rix <trix@redhat.com>
6345 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
6346 (bfd_xcoff_size_dynamic_sections): Same.
6347 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6348 (bfd_xcoff_size_dynamic_sections): Same.
6349 * coff-rs6000.c (xcoff_generate_rtinit): Same.
6350 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
6351 * libxcoff.h (struct xcoff_backend_data_rec): Same.
6352 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
6353 * bfd-in2.h: Regenerate.
6355 2002-02-18 Alan Modra <amodra@bigpond.net.au>
6357 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
6358 (struct ppc_link_hash_table): Add sfpr.
6359 (ppc64_elf_link_hash_table_create): Init it.
6360 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
6362 (create_linkage_sections): ..here. Make .sfpr too.
6363 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
6365 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
6366 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
6367 ._restf* functions, and create as needed.
6368 (func_desc_adjust): Only force_local for shared libs.
6370 2002-02-18 David O'Brien <obrien@FreeBSD.org>
6372 * configure.in: Bump version number post 2.12 branching.
6373 * configure: Regenerate.
6375 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
6377 * mmo.c: Correct and improve comments.
6378 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
6379 zero-pad. Use input to fill up non-empty bfd buffer.
6380 (mmo_flush_chunk): New function.
6381 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
6382 changed. Don't emit location specifier if VMA is same as
6383 *LAST_VMAP after omitting leading zero contents. Call
6384 mmo_flush_chunk before emitting location specifier.
6385 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
6386 with mmo_write_loc_chunk calls.
6387 (mmo_internal_write_section): Call mmo_flush_chunk after
6389 (mmo_write_symbols_and_terminator): Move :Main to first position
6390 in symbol array. Add faked one if it does not exist if there are
6391 other symbols. Don't add it if there are no symbols at all. Move
6392 out test for value of :Main from symbol loop. Rename table
6393 fakemain to maintable and variable mainsym to fakemain.
6395 2002-02-15 Richard Henderson <rth@redhat.com>
6397 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
6398 section with no got matches any got. Simplify error generaion.
6400 2002-02-15 Alan Modra <amodra@bigpond.net.au>
6402 Support arbitrary length fill patterns.
6403 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
6404 (_bfd_default_link_order): Remove bfd_fill_link_order code.
6405 Call default_data_link_order.
6406 (default_fill_link_order): Delete.
6407 (default_data_link_order): New function.
6408 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
6409 of bfd_fill_link_order with bfd_data_link_order.
6410 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
6411 * elf64-mips.c (mips_elf64_final_link): Likewise.
6413 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
6414 Correct value returned in "end" for "0x<non-hex>".
6416 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
6418 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
6419 (scan): Test against 'mach' field in info structure.
6421 2002-02-14 Alan Modra <amodra@bigpond.net.au>
6423 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
6425 2002-02-14 Matt Fredette <fredette@netbsd.org>
6427 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
6430 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
6432 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
6433 non-zero physical addresses when adjusting the LMAs of new
6436 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6438 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
6439 from _bfd_elf_hppa_gen_reloc_type.
6440 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
6441 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
6442 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
6443 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
6445 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
6447 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
6448 loading its contents if there's nothing to do in it.
6450 2002-02-12 Alan Modra <amodra@bigpond.net.au>
6452 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
6455 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
6456 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
6457 (ppc64_elf_finish_dynamic_sections): Set values for them.
6459 2002-02-11 Michael Snyder <msnyder@redhat.com>
6461 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
6462 * elf.c (elfcore_grok_pstatus): Add prototype.
6463 (elfcore_grok_lwpstatus): Add prototype.
6464 (elfcore_write_lwpstatus): New function.
6465 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
6467 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
6469 * elf32-sh.c: Added missing prototypes.
6470 * elf32-sh64.c: Likewise.
6471 (sh_elf_align_loads): Mark unused args as such.
6472 * elf64-sh64.c: Added missing prototypes.
6473 (struct elf_sh64_link_hash_entry): Fix typo.
6474 (sh_elf64_relocate_section): Fix info argument passed to
6475 _bfd_elf_section_offset.
6477 2002-02-11 Alan Modra <amodra@bigpond.net.au>
6479 * Makefile.am: "make dep-am".
6480 * Makefile.in: Regenerate.
6481 * aclocal.m4: Regenerate.
6482 * config.in: Regenerate.
6483 * configure: Regenerate.
6485 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
6487 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
6489 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
6491 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
6492 cast warnings for the common case.
6494 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
6496 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
6498 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
6501 2002-02-09 Richard Henderson <rth@redhat.com>
6503 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
6504 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
6505 (elf64_alpha_relocate_section): Likewise.
6506 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
6507 * bfd-in2.h, libbfd.h: Rebuild.
6509 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
6511 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
6512 that base-plus-offset reloc accounting is consistent.
6513 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
6514 up to date for undefined symbols.
6516 2002-02-08 Eric Christopher <echristo@redhat.com>
6518 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6520 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
6521 sections for the O32 ABI.
6523 2002-02-08 Chris Demetriou <cgd@broadcom.com>
6525 * elf32-arm.h: Fix formatting of _("...").
6526 * elf32-d10v.c: Likewise.
6527 * elf32-m68k.c: Likewise.
6528 * elf32-mips.c: Likewise.
6530 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
6532 * coff-or32.c: Fix compile time warning messages.
6534 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
6536 Contribute sh64-elf.
6537 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
6538 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
6539 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
6540 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
6541 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
6542 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
6543 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
6544 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
6545 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
6546 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
6548 * libbfd.h, bfd-in2.h: Rebuilt.
6549 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
6550 (sh_reloc_map): Map them.
6551 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6552 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
6553 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
6554 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6555 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
6556 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
6557 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
6558 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
6559 datalabel_got_offset.
6560 (sh_elf_link_hash_newfunc): Initialize it.
6561 (sh_elf_relocate_section): Augment the scope of
6562 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
6563 GOT and GOTOFF handling to new SHmedia relocation types. Support
6565 (sh_elf_check_relocs): Likewise.
6566 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
6567 PLT entries using movi_shori_putval. Support GOT_BIAS.
6568 (sh_elf_finish_dynamic_sections): Likewise.
6569 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
6570 relocation, it's now done by the caller.
6572 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
6573 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
6574 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
6575 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
6576 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
6577 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
6578 sh64_elf64_hash_table): New.
6579 (sh_elf64_howto_table): Introduce new relocs.
6580 (sh_elf64_info_to_howto): Accept new PIC relocs.
6581 (sh_elf64_relocate_section): Augment the scope of
6582 seen_stt_datalabel. Support new PIC relocs.
6583 (sh_elf64_check_relocs): Support new PIC relocs.
6584 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
6585 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
6586 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
6587 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
6588 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
6589 movi_shori_putval, movi_3shori_putval,
6590 sh64_elf64_create_dynamic_sections,
6591 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
6592 sh64_elf64_size_dynamic_sections,
6593 sh64_elf64_finish_dynamic_symbol,
6594 sh64_elf64_finish_dynamic_sections): New.
6595 (elf_backend_create_dynamic-sections,
6596 bfd_elf64_bfd_link_hash_table_create,
6597 elf_backend_adjust_dynamic_symbol,
6598 elf_backend_size_dynamic_sections,
6599 elf_backend_finish_dynamic_symbol,
6600 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6601 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6602 elf_backend_got_header_size, elf_backend_plt_header_size):
6604 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
6605 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
6606 match official numbers and names; moved unmaching ones to the
6608 * elf32-sh64.c, elf64-sh64.c: Likewise.
6609 2001-03-12 DJ Delorie <dj@redhat.com>
6610 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
6612 2001-03-12 DJ Delorie <dj@redhat.com>
6613 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
6615 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
6616 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
6617 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
6618 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
6619 .cranges section with SEC_SORT_ENTRIES set.
6620 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
6621 incoming sorted .cranges section.
6622 (sh64_bfd_elf_copy_private_section_data): New.
6623 (sh64_elf_final_write_processing): Only sort .cranges and modify
6624 start address if called by linker.
6625 2001-01-08 Ben Elliston <bje@redhat.com>
6626 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
6627 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
6628 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
6629 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6630 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
6631 line. Add comments before all entries.
6632 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
6634 (sh_elf64_reloc): Correct head comment.
6635 (sh_elf64_relocate_section): Correct spacing.
6636 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
6637 instead call reloc_dangerous callback.
6638 <case R_SH_SHMEDIA_CODE>: New case.
6639 (sh_elf64_gc_mark_hook): Correct spacing.
6640 (sh_elf64_check_relocs): Ditto.
6641 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
6643 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
6645 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
6646 clarify describing comment. Add comments before all entries.
6647 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
6648 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
6649 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6650 Sort .cranges section in final link. Prepare to set bit 0 on
6652 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
6653 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
6654 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
6656 (sh64_backend_section_from_shdr): New, to recognize
6657 SHT_SH5_CR_SORTED on incoming .cranges section.
6658 (elf_backend_section_from_shdr): Define.
6659 (sh64_elf_final_write_processing): Sort outgoing .cranges
6660 section. (New, temporarily disabled:) Set bit 0 on entry address
6661 according to ISA type.
6662 (sh64_find_section_for_address): New.
6663 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
6664 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
6665 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
6666 bfd_malloc, not xmalloc.
6667 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
6669 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
6670 temporarily disabled) setting bit 0 on entry address.
6671 (elf_backend_final_write_processing): Define.
6672 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
6673 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
6674 be a proper relocation for PTA and PTB rather than a marker.
6675 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
6676 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
6677 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
6678 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
6679 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
6681 * elf64-sh64.c: Ditto.
6682 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
6683 * elf32-sh64.c: Include opcodes/sh64-opc.h
6684 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
6685 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
6686 parameters. No unused parameters. Caller changed.
6687 <case R_SH_PT_16>: New case.
6688 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
6689 * Makefile.in: Regenerate.
6690 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
6691 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
6693 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6694 (sh64_elf_merge_private_data): Ditto.
6695 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
6696 to access stored section flags.
6697 (sh64_elf_final_write_processing): Return immediately unless
6698 called by linker. Use sh64_elf_section_data (cranges) to get size
6699 of linker-generated cranges entries.
6700 (sh64_elf_copy_private_data): Add missing "return true".
6701 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6702 (sh_elf64_merge_private_data): Ditto.
6703 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
6704 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
6705 elf64-sh64.c:sh64_elf_fake_sections.
6706 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
6707 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
6708 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
6709 (sh64_elf_final_write_processing): New.
6710 (elf_backend_final_write_processing): Define.
6711 (sh64_elf_fake_sections): Get header flags from tdata field.
6712 (sh64_elf_copy_private_data): Do not call
6713 sh64_elf_copy_private_data_internal, just copy e_flags field.
6714 (sh64_elf_merge_private_data): Do not call
6715 sh64_elf_copy_private_data_internal.
6716 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
6717 Remove EF_SH64_ABI64, let ELF size make difference.
6718 Remove SH64-specific BFD section flag.
6719 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
6720 containing SHmedia through elf_section_data (asect)->tdata
6721 non-zero, not using a BFD section flag.
6722 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
6723 (sh64_elf_merge_private_data): Similar.
6724 (elf_backend_section_flags): Don't define.
6725 (sh64_elf_backend_section_flags): Delete.
6726 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
6728 (sh_elf64_merge_private_data): Similar.
6729 * section.c (Section flags definitions): Don't define
6731 (bfd-in2.h): Regenerate.
6732 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
6733 Make DataLabel references work with partial linking.
6734 * elf32-sh64.c: Fix formatting.
6735 (sh64_elf_link_output_symbol_hook): New.
6736 (elf_backend_link_output_symbol_hook): Define to
6737 sh64_elf_link_output_symbol_hook.
6738 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
6739 undefined if partial linking. Adjust sanity check.
6740 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
6741 (elf_backend_link_output_symbol_hook): Define to
6742 sh64_elf64_link_output_symbol_hook.
6743 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
6744 undefined if partial linking. Adjust sanity check.
6745 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
6746 Implement semantics for inter-file DataLabel references.
6747 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
6748 (sh64_elf64_add_symbol_hook): New.
6749 (sh_elf64_relocate_section): If passing an indirect symbol with
6750 st_type STT_DATALABEL on the way to a symbol with st_other
6751 STO_SH5_ISA32, do not bitor 1 to the relocation.
6752 (elf_backend_add_symbol_hook): Define to
6753 sh64_elf64_add_symbol_hook.
6754 * elf64-sh32.c: Tweak comments.
6755 (DATALABEL_SUFFIX): Define.
6756 (sh64_elf_add_symbol_hook): New.
6757 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
6758 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
6759 symbol with st_type STT_DATALABEL on the way to a symbol with
6760 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
6761 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
6762 Pass through STT_DATALABEL.
6763 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
6764 (elf_backend_get_symbol_type): Define.
6765 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
6766 (elf_backend_get_symbol_type): Define.
6767 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
6768 * elf32-sh64.c: Tweak comments.
6769 (sh64_elf_copy_private_data_internal): Add prototype.
6770 (bfd_elf32_bfd_set_private_flags): Define.
6771 (sh64_elf_copy_private_data_internal): Compare machine name, not
6772 textual BFD target name, to check whether to copy section flag
6774 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
6775 Tweak section-contents-type-mismatch message.
6776 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
6777 Validize reloc-types.
6778 * elf64-sh64.c: New file.
6779 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
6780 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
6781 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
6782 Regenerate dependencies.
6783 * Makefile.in: Regenerate.
6784 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
6785 bfd_elf64_sh64l_vec.
6786 * configure.in: Handle bfd_elf64_sh64_vec and
6787 bfd_elf64_sh64l_vec.
6788 * configure: Regenerate.
6789 * po/POTFILES.in: Regenerate.
6790 * po/bfd.pot: Regenerate.
6791 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
6792 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
6793 anything else but EF_SH64 and EF_SH64_ABI64.
6794 (sh64_elf_merge_private_data): Emit error for anything else but
6795 EF_SH64 and EF_SH64_ABI64.
6796 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
6798 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
6799 bfd_elf32_sh64l_vec as a temporary measure.
6800 * configure: Regenerate.
6801 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
6802 * cpu-sh.c (arch_info_struct): Include sh5 item
6804 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
6805 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
6806 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
6807 * elf32-sh64.c: Tweak comments.
6808 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
6809 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
6810 (sh64_elf_copy_private_data_internal): Wrap long line.
6811 (sh64_elf_merge_private_data): Rewrite to allow objects from
6812 SH64 subsets to be linked together.
6813 (INCLUDE_SHMEDIA): Define.
6814 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
6815 Parenthesize plus-expression inside or-expression.
6816 <global symbol>: Ditto.
6817 (sh_elf_set_mach_from_flags): Remove code refusing
6818 deleted EF_SH64_32BIT_ABI flag.
6819 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
6820 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
6821 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
6822 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
6823 (sh_elf_relocate_section) <local symbol>: Or 1 in
6824 calculation of relocation if sym->st_other & STO_SH5_ISA32.
6825 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
6826 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
6828 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
6829 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
6830 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
6831 Regenerate dependencies.
6832 * Makefile.in: Regenerate.
6833 * archures.c: Add bfd_mach_sh5.
6834 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
6835 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
6836 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
6837 * configure: Regenerate.
6838 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
6839 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
6840 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
6841 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
6842 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
6843 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
6844 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
6845 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
6846 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
6847 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
6849 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
6851 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
6852 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
6853 shmedia_prepare_reloc, goto final_link_relocate if it returns
6854 non-zero, else fail as before.
6855 (sh_elf_set_mach_from_flags): Provide function only if not defined
6856 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
6857 (sh_elf_set_private_flags): Provide function only if not defined
6859 (sh_elf_copy_private_data): Similar.
6860 (sh_elf_merge_private_data): Similar.
6861 * section.c (SEC_SH_ISA_SHMEDIA): New.
6862 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
6863 * elf32-sh64.c: New file.
6864 * libbfd.h: Regenerate.
6865 * bfd-in2.h: Regenerate.
6866 * po/POTFILES.in: Regenerate.
6867 * po/bfd.pot: Regenerate.
6868 * bfd-in2.h: Regenerate.
6869 * libbfd.h: Regenerate.
6871 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
6873 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
6874 been included, not drag it in.
6875 * bfd-in2.h: Regenerate.
6877 2002-02-06 H.J. Lu (hjl@gnu.org)
6879 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
6880 the mach and ISA fields if necessary.
6882 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
6884 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
6885 ARM architecture when an F_ARM_5 flag is detected, since we cannot
6886 be sure exactly which architecture this represents.
6888 2002-02-05 Nick Clifton <nickc@redhat.com>
6890 * po/tr.po: Updated translation.
6892 2002-02-05 Alan Modra <amodra@bigpond.net.au>
6894 From Jimi X <jimix@watson.ibm.com>
6895 * archures (bfd_mach_ppc64): Define.
6896 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
6897 (bfd_powerpc_arch): Define.
6898 * bfd-in2.h: Regenerate.
6899 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
6900 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
6901 (bfd_powerpc_archs): Add default powerpc64 arch.
6903 2002-02-05 Alan Modra <amodra@bigpond.net.au>
6905 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
6906 against section syms in readonly sections. Don't do the global
6907 sym check if we find one.
6908 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
6909 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
6910 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6911 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
6912 (elf_s390_grok_prstatus): Add missing prototype.
6914 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
6916 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
6917 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
6918 Call bfd_get_section_by_name only once. Initialize
6919 bpodata->n_bpo_relocs_this_section.
6920 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
6922 (bpo_reloc_request_sort_fn): Don't use difference of values as
6925 2002-02-02 David O'Brien <obrien@FreeBSD>
6927 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
6928 version 4.5 and later the same as 5-CURRENT.
6929 * configure: Re-generate.
6931 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
6933 * config.bfd (hppa*-*-netbsd*): New target.
6935 2002-01-31 Philipp Thomas <pthomas@suse.de>
6937 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
6938 to front of message. Unify messages with elf32-arm.h. Use
6939 commas where neccessary.
6940 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
6941 ERROR in messages. Unify messages with coff-arm.c. Correct
6942 VFP/FPA error message.
6943 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
6944 APCS-32 for translation.
6946 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
6948 Perform on-demand global register allocation from
6949 R_MMIX_BASE_PLUS_OFFSET relocs.
6950 * elf64-mmix.c (struct bpo_reloc_section_info, struct
6951 bpo_reloc_request, struct bpo_greg_section_info): New.
6952 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
6953 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
6954 _bfd_mmix_check_all_relocs,
6955 _bfd_mmix_prepare_linker_allocated_gregs,
6956 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
6957 (elf_mmix_howto_table): Correct src_mask for most relocs.
6958 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
6960 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
6961 case. Fix typo in comment. New label do_mmix_reloc.
6962 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
6963 store first object file with a base-plus-offset reloc. Call
6964 mmix_elf_check_common_relocs for the part common with mmo.
6965 (mmix_elf_final_link): Write out linker-allocated register
6967 (elf_backend_gc_sweep_hook): Define.
6968 (bfd_elf64_bfd_relax_section): Define.
6970 * mmo.c: Don't include <ctype.h>
6971 (mmo_init): Correct init-once logic.
6973 2002-02-01 Tom Rix <trix@redhat.com>
6975 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
6977 2002-02-01 Alan Modra <amodra@bigpond.net.au>
6979 * Makefile.am: Run "make dep-am"
6980 * Makefile.in: Regenerate.
6982 2002-01-31 David O'Brien <obrien@FreeBSD>
6984 * configure.in: Recognize the differences in core files from FreeBSD
6985 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
6987 * configure: Regenerate.
6989 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
6991 * coff-or32.c: New file.
6992 * cpu-or32.c: New file.
6993 * elf32-or32.c: New file.
6994 * archures.c: Add support for or32.
6995 * targets.c: Add support for or32.
6996 * bfd-in2.h: Regenerate.
6997 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
6998 coff_write_object_contents): Add support for or32.
6999 * config.bfd: Add target.
7000 * configure.in: Add support for or32.
7001 * configure: Regenerate.
7002 * Makefile.am: Add support for or32.
7003 * Makefile.in: Regenerate.
7004 * po/SRC-POTFILES.in: Add or32 files.
7005 * po/bfd.pot: Regenerate.
7007 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
7008 Don Lindsay <lindsayd@cisco.com>
7010 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7011 false' with a return of a bfd_reloc_ error code.
7013 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
7015 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7016 unexport unreferenced symbols when --export-dynamic. Call
7017 _bfd_elf_strtab_delref when unexporting.
7019 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
7021 * bfd-in.h: Include <stdbool.h> if it is available.
7022 * bfd-in2.h: Regenerated.
7024 2002-01-31 Alan Modra <amodra@bigpond.net.au>
7026 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7029 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7031 * archures.c: Tidy up formatting of embedded comments.
7032 * bfd.c: Tidy up formatting of embedded comments.
7033 * bfd-in.h: Fix formatting of comments.
7034 * reloc.c: Tidy up formatting of ordinary & embedded comments.
7035 * section.c: Tidy up formatting of embedded comments.
7036 * syms.c: Tidy up formatting of embedded comments.
7037 * targets.c: Tidy up formatting of embedded comments.
7039 * bfd-in2.h: Regenerate.
7041 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7043 * vms-tir.c (cmd_name): New function.
7044 (tir_cmd_name): New function.
7045 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
7046 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
7049 * peXXigen.c (pe_print_idata): Rearrange message to aid in
7051 (pe_print_pdata): Rearrange message to aid in translation.
7053 * libbfd.c (warn_deprecated): Rearrange error message to aid in
7056 * ihex.c (ihex_write_object_contents): Fix spelling typo.
7058 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
7060 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
7061 message to aid in translation.
7063 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
7064 to aid in translation.
7066 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
7068 2002-01-30 Philipp Thomas <pthomas@suse.de>
7070 * coff-arm.c, elf32-elf.h: Unify messages.
7072 2002-01-30 Nick Clifton <nickc@redhat.com>
7074 * po/sv.po: Updated translation.
7076 2002-01-30 Philipp Thomas <pthomas@suse.de>
7078 * dwarf2.c (read_abbrev): Use full section name in error message.
7079 (decode_line_info): Likewise.
7081 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7084 2002-01-30 Alan Modra <amodra@bigpond.net.au>
7086 * elf64-ppc.c (func_desc_adjust): Only provide missing function
7087 descriptor symbols for undefined function code syms. Clear
7088 ELF_LINK_NON_ELF so that they can stay weak.
7090 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7091 Mitch Lichtenberg <mpl@broadcom.com>
7093 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7094 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7095 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7097 * bfd-in2.h: Regenerate.
7099 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7101 * elf32-mips.c: Add additional comments about HI16 relocation
7103 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7104 pc-relative relocations. (Reverts change made on 2001-10-31.)
7105 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7106 for pc-relative relocations.
7107 (mips_elf_calculate_relocation): Add a comment about a kludge
7108 in the R_MIPS_GNU_REL_HI16 handling.
7109 (_bfd_mips_elf_relocate_section): Implement that kludge;
7110 adjust pc-relative HI16 relocation for difference in HI16 and
7111 LO16 addresses, since it can't easily be done in
7112 mips_elf_calculate_relocation.
7114 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
7116 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7117 relocations with PC32 relocations for undefined or weak symbols.
7118 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7119 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7121 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
7123 * elfcore.h (elf_core_file_p): Improve comment for last change.
7125 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
7127 * configure: Regenerated.
7129 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
7131 * elfcore.h (elf_core_file_p): Set the machine architecture
7132 before processing the program headers.
7134 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
7136 * configure.in <64-bit configuration>: If using gcc, check and
7137 emit error for egcs-1.1.2.
7138 * configure: Regenerate.
7140 2002-01-26 Egor Duda <deo@logos-m.ru>
7142 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7143 as possible to avoid stack corruption.
7145 2002-01-26 Richard Henderson <rth@redhat.com>
7147 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7148 for non-allocated sections.
7150 2002-01-25 Mark Kettenis <kettenis@gnu.org>
7152 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7153 prstat.pr_reg even if it is a struct.
7155 2002-01-25 Steve Ellcey <sje@cup.hp.com>
7157 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
7159 2002-01-25 Philipp Thomas <pthomas@suse.de>
7161 * coffgen.c (coff_print_symbol): Don't mark info message
7164 2002-01-25 Nick Clifton <nickc@redhat.com>
7166 * po/fr.po: Updated translation.
7167 * po/es.po: Updated translation.
7169 2002-01-25 Philipp Thomas <pthomas@suse.de>
7171 * coff-alpha.c (alpha_relocate_section): Unify warning message
7172 for GP relative relocations without GP defined.
7173 * coff-mips.c (mips_relocate_section): Likewise.
7175 2002-01-25 Alan Modra <amodra@bigpond.net.au>
7177 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7178 unsigned overflow when new_offset < old_offset.
7180 2002-01-24 Philipp Thomas <pthomas@suse.de>
7182 * bfd.c (_bfd_abort): Fix typo.
7184 2002-01-23 Richard Henderson <rth@redhat.com>
7186 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7187 plt entries for undefweak symbols.
7189 2002-01-23 Steve Ellcey <sje@cup.hp.com>
7191 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
7192 (bfd_elf64_ia64_hpux_big_vec): Ditto.
7193 (bfd_elf32_h8300_vec): Ditto.
7195 2002-01-23 Alan Modra <amodra@bigpond.net.au>
7197 * elf64-ppc.c: Remove stale part of ABI comment.
7198 (NO_OPD_RELOCS): Define.
7199 (ppc64_elf_check_relocs): Use it.
7200 (ppc64_elf_relocate_section): Here too.
7201 (build_one_stub): Don't point function syms at the stub. Instead,
7203 (ppc64_elf_relocate_section): Check whether REL24 relocs should
7204 really go to the stub. Make all dynamic relocs in opd against
7206 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7209 2002-01-22 Richard Henderson <rth@redhat.com>
7211 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7213 2002-01-22 Alan Modra <amodra@bigpond.net.au>
7215 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7216 TOC_BASE_OFF adjustment.
7218 * Makefile.am: Run "make dep-am".
7219 * Makefile.in: Regenerate.
7220 * po/SRC-POTFILES.in: Regenerate.
7222 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
7224 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7227 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
7229 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7230 Check for and emit error if sgot is NULL at this point.
7232 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
7234 * config.bfd (ia64*-*-netbsd*): New target.
7236 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7238 * som.c (som_write_space_strings): Comment typo fix.
7240 2002-01-21 Alan Modra <amodra@bigpond.net.au>
7242 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7243 is_func_descriptor fields.
7244 (link_hash_newfunc): Init them.
7245 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7246 dot are candidates for plt entries. When processing .opd relocs,
7247 set function descriptor strings to point inside function code
7248 string, and set new ppc_link_hash_entry fields.
7249 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7250 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7251 function descriptors. It's now done in..
7252 (func_desc_adjust): New.
7253 (ppc64_elf_func_desc_adjust): New.
7254 (define elf_backend_always_size_sections): Define.
7255 (ppc64_elf_hide_symbol): New.
7256 (define elf_backend_hide_symbol): Define.
7257 (allocate_dynrelocs): Remove code looking up function descriptors
7258 as that has been done earlier.
7259 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7261 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
7262 up function descriptor.
7263 (build_one_stub): Look up the function code sym. Check for
7264 invalid plt offsets.
7265 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7266 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7268 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7270 (_bfd_elf_link_hash_hide_symbol): Likewise.
7271 * elflink.h (elf_link_add_object_symbols): Adjust call to
7272 elf_backend_hide_symbol.
7273 (elf_fix_symbol_flags): Likewise.
7274 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7276 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7277 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7278 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7279 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7280 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7282 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7283 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7284 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7286 2002-01-18 Alan Modra <amodra@bigpond.net.au>
7288 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7289 dynamic function descriptor symbol, not the associated function
7292 2002-01-17 Eric Christopher <echristo@redhat.com>
7294 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7296 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
7298 * po/bfd.pot: Regenerate.
7299 * po/fr.po: Regenerate.
7301 2002-01-17 Alan Modra <amodra@bigpond.net.au>
7303 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
7304 Remove "Elf_Internal_Shdr *" param.
7305 (_bfd_mips_elf_section_from_bfd_section): Ditto.
7306 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
7307 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
7308 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
7309 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
7310 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
7311 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
7312 function to override special sections. Remove hdr arg from
7313 backend call, and don't loop.
7315 2002-01-16 Eric Christopher <echristo@redhat.com>
7317 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
7318 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
7319 relocations requiring gp0 and gp.
7321 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
7323 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
7325 (elf32_arm_print_private_bfd_data): Likewise.
7327 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
7329 * po/tr.po: Import new version.
7331 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7333 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
7334 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
7335 (ORI_R0_R0_0): Correct.
7337 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7339 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
7340 when plt_not_loaded.
7341 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
7342 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
7343 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
7344 (ppc64_elf_glink_code): Delete.
7345 (PPC64_ELF_GLINK_SIZE): Delete.
7346 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
7347 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
7348 ORI_R0_R0_0): Define.
7349 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
7350 (struct ppc_link_hash_table): Add sstub and plt_overflow.
7351 (ppc64_elf_link_hash_table_create): Init them.
7352 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
7353 Don't copy to shared lib.
7354 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
7355 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
7356 (allocate_dynrelocs <plt>): Don't change function sym here. Make
7357 room for .stub and .glink code.
7358 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
7360 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
7361 bfd_elf64_bfd_final_link.
7362 (bfd_elf64_bfd_final_link): Don't define.
7363 (ppc64_elf_size_stubs): New.
7364 (build_plt_stub): New.
7365 (build_one_stub): New.
7366 (ppc64_elf_build_stubs): New.
7367 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
7368 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
7369 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
7370 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
7371 case output sections not separate. Adjust DT_RELASZ to not
7372 include plt relocs. Set reserved got entry. Set got and plt
7374 (elf_backend_got_header_size): Set to 8.
7375 * elf64-ppc.h: New file.
7377 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7379 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
7380 sections, use bfd_section_list_remove.
7381 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7382 * elflink.h (elf_link_add_object_symbols): When removing all
7383 sections, use bfd_section_list_clear.
7385 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7387 * po/sv.po: New file: Swedish translation.
7388 * configure.in (ALL_LINGUAS): Add sv.
7389 * configure: Regenerate.
7391 2002-01-15 Jakub Jelinek <jakub@redhat.com>
7393 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
7394 * elf.c (merge_sections_remove_hook): New function.
7395 (_bfd_elf_merge_sections): Pass it as 3rd argument to
7396 _bfd_merge_sections.
7397 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
7398 * libbfd.h: Rebuilt.
7399 * merge.c (_bfd_merge_sections): Add remove_hook argument.
7400 Call remove_hook if a SEC_EXCLUDE section is encountered.
7402 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7404 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
7405 (xstormy16_reloc_map): Initialise new field with correct howto
7407 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
7410 2002-01-10 Michael Snyder <msnyder@redhat.com>
7412 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
7413 (elfcore_write_pstatus): Use long instead of pid_t;
7414 * elf-bfd.h: Change prototypes to use long instead of pid_t;
7416 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
7418 * elf.c: Update copyright years.
7419 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
7420 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
7422 2002-01-08 Michael Snyder <msnyder@redhat.com>
7424 Add capability to write corefile note sections, for gdb.
7425 * elf.c (elfcore_write_note): New function.
7426 (elfcore_write_prpsinfo): New function.
7427 (elfcore_write_prstatus): New function.
7428 (elfcore_write_pstatus): New function.
7429 (elfcore_write_prfpreg): New function.
7430 (elfcore_write_prxfpreg): New function.
7431 * elf-bfd.h: Add prototypes for above functions.
7433 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
7435 * elf.c (elf_fake_sections): Propagate errors from
7436 elf_backend_fake_section.
7438 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
7440 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
7441 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
7442 (elf32-sh-nbsd.lo): New rule.
7443 * Makefile.in: Regenerate.
7444 * config.bfd (sh*le-*-netbsdelf*): New target.
7445 (sh*-*-netbsdelf*): New target.
7446 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
7447 (bfd_elf32_shnbsd_vec): New vector.
7448 (bfd_elf32_shlnbsd_vec): New vector.
7449 * configure: Regenerate.
7450 * elf32-sh-nbsd.c: New file.
7451 * targets.c: Update copyright years.
7452 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
7453 bfd_elf32_shnbsd_vec.
7455 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
7457 * coff-rs6000.c (READ20): Use bfd_scan_vma.
7459 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
7461 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
7462 of a symbol in a section that will be deleted.
7464 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
7466 * po/es.po: New file: Spanish translation.
7467 * configure.in (ALL_LINGUAS): Add es.
7468 * configure: Regenerate.
7470 2002-01-06 Steve Ellcey <sje@cup.hp.com>
7472 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
7473 argument so we can handle HP-UX specially.
7474 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
7475 (elfNN_hpux_backend_section_from_bfd_section): New for support
7476 of SHN_IA_64_ANSI_COMMON.
7477 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
7478 (is_unwind_section_name): Add special HP-UX support.
7479 (elfNN_ia64_section_from_shdr): Add support for more sections.
7480 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
7481 add support for more sections.
7482 (elfNN_ia64_additional_program_headers): Modify
7483 is_unwind_section_name call.
7484 (elfNN_ia64_modify_segment_map): Remove assumption that there is
7485 only one unwind section in segment.
7487 2002-01-06 Alan Modra <amodra@bigpond.net.au>
7489 * syms.c (_bfd_generic_make_empty_symbol): New function.
7490 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
7491 _bfd_generic_make_empty_symbol.
7492 * libbfd.h: Regenerate.
7493 * bfd-in2.h: Regenerate.
7494 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
7495 (hppabsd_core_get_symtab_upper_bound): Don't define.
7496 (hppabsd_core_get_symtab): Likewise.
7497 (hppabsd_core_print_symbol): Likewise.
7498 (hppabsd_core_get_symbol_info): Likewise.
7499 (hppabsd_core_bfd_is_local_label_name): Likewise.
7500 (hppabsd_core_get_lineno): Likewise.
7501 (hppabsd_core_find_nearest_line): Likewise.
7502 (hppabsd_core_bfd_make_debug_symbol): Likewise.
7503 (hppabsd_core_read_minisymbols): Likewise.
7504 (hppabsd_core_minisymbol_to_symbol): Likewise.
7505 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
7507 * hpux-core.c: Similarly.
7508 * irix-core.c: Similarly.
7509 * osf-core.c: Similarly.
7510 * sco5-core.c: Similarly.
7511 * binary.c (binary_make_empty_symbol): Remove function, define as
7512 _bfd_generic_make_empty_symbol.
7513 * ihex.c (ihex_make_empty_symbol): Likewise.
7514 * mmo.c (mmo_make_empty_symbol): Likewise.
7515 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
7516 * srec.c (srec_make_empty_symbol): Likewise.
7517 * versados.c (versados_make_empty_symbol): Likewise.
7518 * vms.c (_bfd_vms_make_empty_symbol): Remove.
7519 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
7520 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
7521 rather than _bfd_vms_make_empty_symbol.
7522 * vms-misc.c (new_symbol): Likewise.
7524 2002-01-05 Alan Modra <amodra@bigpond.net.au>
7526 * section.c (bfd_section_init): Remove unnecessary initialisations.
7527 (bfd_section_list_clear): New function.
7528 (bfd_section_list_remove, bfd_section_list_insert): New macros.
7529 (_bfd_strip_section_from_output): Use them.
7530 * coffcode.h (coff_set_alignment_hook): Likewise.
7531 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
7532 * elf64-mips.c (mips_elf64_final_link): Likewise.
7533 * elf64-mmix.c (mmix_elf_final_link): Likewise.
7534 * sunos.c (sunos_add_dynamic_symbols): Likewise.
7535 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
7536 * bfd-in2.h: Regenerate.
7538 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
7539 rather than doing our own section handling. Clean up after errors
7540 with bfd_release and bfd_section_list_clear. Handle unexpected
7542 * aoutf1.h (sunos4_core_file_p): Likewise.
7543 * aix386-core.c (aix386_core_file_p): Likewise.
7544 * cisco-core.c (cisco_core_file_validate): Likewise.
7545 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
7546 * trad-core.c (trad_unix_core_file_p): Likewise.
7548 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
7549 with bfd_release and bfd_section_list_clear.
7550 * hpux-core.c (hpux_core_core_file_p): Likewise.
7551 * irix-core.c (irix_core_core_file_p): Likewise.
7552 * lynx-core.c (lynx_core_file_p): Likewise.
7553 * osf-core.c (osf_core_core_file_p): Likewise.
7554 * rs6000-core.c (rs6000coff_core_p): Likewise.
7555 * sco5-core.c (sco5_core_file_p): Likewise.
7557 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
7558 sign extension adjustments without conditionals.
7560 2002-01-04 Jakub Jelinek <jakub@redhat.com>
7562 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
7563 CIE at .eh_frame start is removed due to no FDEs referencing it.
7565 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
7567 * config.bfd (x86_64-*-netbsd*): New target.
7568 * configure.in (x86_64-*-netbsd*): Set COREFILE
7570 * configure: Regenerated.
7572 2002-01-03 Tom Rix <trix@redhat.com>
7574 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
7575 for recent bfd_make_section_anyway change.
7577 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
7579 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7580 R_ARM_THM_PC11 reloc.
7582 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7584 * configure.in (LINGUAS): Add ja.
7585 * configure: Regenerate.
7586 * po/ja.po: Import from translation project's web site.
7588 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7590 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
7591 messages to ease translation into other languages.
7593 For older changes see ChangeLog-0001
7599 version-control: never