1 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
3 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4 of the other two relocations packed with a REL32 to NONE.
6 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
8 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
9 (sh_elf_link_hash_newfunc): Initialize it.
10 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
11 to got.refcount for symbols that are forced local or when
12 we have direct got refs.
13 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
14 to correctly adjust got.refcount and plt.refcount.
15 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
16 (sh_elf_check_relocs): Increment gotplt_refcount.
18 2002-10-01 Jakub Jelinek <jakub@redhat.com>
20 * elf32-i386.c (elf_i386_relocate_section): Fix
21 movl foo@indntpoff, %eax IE->LE transition.
23 2002-10-01 Jakub Jelinek <jakub@redhat.com>
25 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
26 sequence and its transitions.
28 2002-10-01 Jakub Jelinek <jakub@redhat.com>
30 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
31 to st_value + addend in non-code sections.
32 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
33 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
35 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
36 Ken Raeburn <raeburn@cygnus.com>
37 Aldy Hernandez <aldyh@redhat.com>
38 Eric Christopher <echristo@redhat.com>
39 Richard Sandiford <rsandifo@redhat.com>
41 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
42 (bfd_mach_mips5500): New.
43 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
44 (arch_info_struct): Add corresponding entries here.
45 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
46 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
47 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
48 bfd_mach_mips5400 and bfd_mach_mips5500.
49 (_bfd_mips_elf_mach_extends_p): New function.
50 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
51 the EF_MIPS_MACH flags.
52 * bfd-in2.h: Regenerate.
54 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
56 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
59 2002-09-28 Alan Modra <amodra@bigpond.net.au>
61 * elf.c (map_sections_to_segments): Correct test for start of
62 writable section in the same page as end of read-only section.
64 2002-09-27 Matt Thomas <matt@3am-software.com>
66 * elf32-vax.c (elf_vax_check_relocs): Remove unused
67 local_got_refcounts usage. Remove allocation of got slot.
68 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
69 Remove de-allocation of got slot.
70 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
71 traversal for elf_vax_instantiate_got_entries. Allow empty .got
73 (elf_vax_instantiate_got_entries): New function.
74 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
75 tests that are now handled by elf_vax_instantiate_got_entries.
76 Assert GOT entry falls within .got section size. Remove redundant
77 comparisions. Fix comments.
79 2002-09-27 Jakub Jelinek <jakub@redhat.com>
81 * reloc.c: Add x86-64 TLS relocs.
82 * bfd-in2.h, libbfd.h: Rebuilt.
83 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
84 relocs. Add TLS relocs.
85 (x86_64_reloc_map): Add TLS relocs.
86 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
87 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
88 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
89 (elf64_x86_64_hash_entry): Define.
90 (struct elf64_x86_64_obj_tdata): New.
91 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
92 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
93 (link_hash_newfunc): Initialize tls_type.
94 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
95 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
96 (elf64_x86_64_mkobject): New.
97 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
98 (elf64_x86_64_tls_transition): New.
99 (elf64_x86_64_check_relocs): Add r_type variable and use it.
101 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
102 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
103 (elf64_x86_64_size_dynamic_sections): Likewise.
104 (dtpoff_base, tpoff): New.
105 (elf64_x86_64_relocate_section): Handle TLS relocs.
106 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
108 (bfd_elf64_mkobject): Define.
110 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
111 DF_STATIC_TLS if shared.
113 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
115 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
116 empty relocation sections.
118 2002-09-26 Alan Modra <amodra@bigpond.net.au>
120 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
121 (ppc64_elf_build_stubs): Build them here instead.
123 2002-09-24 Jakub Jelinek <jakub@redhat.com>
125 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
126 addend into r_addend, not *r_offset.
127 (elf32_sparc_finish_dynamic_symbol): Likewise.
128 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
129 R_SPARC_RELATIVE's r_offset.
131 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
133 * dwarf2.c (decode_line_info): Update to correctly decode
134 the (non-standard DWARF2) out-of-order address sequences
135 generated by the Intel C++ 6.0 compiler for ia64-Linux.
137 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
139 * config.bfd: For DJGPP targets, match with any cpu and any machine.
141 2002-09-23 Alan Modra <amodra@bigpond.net.au>
143 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
144 for discarded FDEs. Remove redundant assignment.
145 * elflink.h (elf_bfd_discard_info): Save edited relocs.
147 2002-09-22 H.J. Lu <hjl@gnu.org>
149 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
150 the relocation count between different .reloc sections.
152 2002-09-21 Alan Modra <amodra@bigpond.net.au>
154 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
155 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
156 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
159 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
160 unsigned. Move "symcount" assignment out of loop.
161 * Makefile.am: Run "make dep-am".
162 * Makefile.in: Regenerate.
163 * configure: Regenerate.
164 * po/SRC-POTFILES.in: Regnerate.
166 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
168 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
169 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
172 2002-09-19 Jakub Jelinek <jakub@redhat.com>
174 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
175 even if generating R_PPC_RELATIVE reloc.
176 (ppc_elf_relocate_section): Make sure relocation is performed
177 if skip == -2. Clear memory at r_offset when creating dynamic
180 2002-09-19 Jakub Jelinek <jakub@redhat.com>
182 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
183 BFD_RELOC_386_TLS_GOTIE): Add.
184 * bfd-in2.h, libbfd.h: Rebuilt.
185 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
187 (elf_i386_reloc_type_lookup): Handle it.
188 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
189 char instead of enum, change GOT_* into defines.
190 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
191 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
192 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
193 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
194 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
195 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
196 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
197 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
198 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
199 tls_type is GOT_TLS_IE_BOTH.
200 (elf_i386_size_dynamic_sections): Likewise.
201 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
202 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
203 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
204 all 4 GOT_TLS_* TLS types.
206 2002-09-19 Nick Clifton <nickc@redhat.com>
208 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
209 follow indirect links.
211 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
213 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
214 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
216 (ecoff_swap_sym_in) <iss>: Likewise.
217 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
218 ECOFF information: 'ioptMax' refers to the actual *size*
219 of the optimization symtab, not the number of entries.
221 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
223 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
224 ELF_LINK_HASH_NEEDS_PLT logic.
226 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
228 * elfcode.h (elf_slurp_reloc_table_from_section): Check
229 correct relocation count.
231 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
233 * bfd-in.h (bfd_get_dynamic_symcount): Define.
234 * bfd.c (struct _bfd): Add dynsymcount.
235 * bfd-in2.h: Regenerated.
236 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
238 * elfcode.h (elf_slurp_reloc_table_from_section): Check
241 2002-09-17 Stan Cox <scox@redhat.com>
243 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
244 (mips_elf64_final_gp): Don't make up gp value.
245 * elfn32-mips.c (mips_elf_final_gp): Likewise.
246 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
247 .MIPS.options/.options section.
249 2002-09-17 David O'Brien <obrien@FreeBSD.org>
251 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
252 It is benign for FreeBSD < 4.1. Minor reformatting.
253 * elf64-alpha-fbsd.c: Likewise.
255 2002-09-17 Jakub Jelinek <jakub@redhat.com>
257 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
260 2002-09-17 Alan Modra <amodra@bigpond.net.au>
262 * elf64-alpha.c (alpha_elf_size_info): Make static.
264 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
266 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
267 * cpu-tic4x.c: Ditto.
269 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
271 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
274 2002-09-16 Bruno Haible <bruno@clisp.org>
276 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
277 by a target variant implementation.
278 * elf64-alpha.c: Likewise.
279 * elf32-i386-fbsd.c: New file.
280 * elf64-alpha-fbsd.c: New file.
281 * targets.c: Support bfd_elf32_i386_freebsd_vec and
282 bfd_elf64_alpha_freebsd_vec.
283 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
284 bfd_elf64_alpha_freebsd_vec.
285 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
286 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
287 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
288 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
289 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
290 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
291 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
293 2002-09-12 Jakub Jelinek <jakub@redhat.com>
295 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
297 (elf_i386_relocate_section): Return false after printing error about
298 unresolvable relocation.
300 2002-09-12 Nick Clifton <nickc@redhat.com>
302 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
305 2002-09-11 Jeffrey Law <law@redhat.com>
307 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
309 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
311 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
312 line_ptr before deciding we've found a symbol.
314 2002-09-11 Nick Clifton <nickc@redhat.com>
316 * po/da.po: New Danish translation file.
317 * configure.in (LINGUAS): Add 'da'.
318 * configure: Regenerate.
320 2002-09-10 Michael Snyder <msnyder@redhat.com>
322 * irix-core.c (do_sections, do_sections64): New functions.
323 (irix_core_core_file_p): Call new functions do_sections,
324 do_sections64, depending on corefile (32-bit or 64-bit).
326 2002-09-09 Richard Henderson <rth@redhat.com>
328 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
329 and PCREL21F like PCREL21B.
331 2002-09-04 Kevin Buettner <kevinb@redhat.com>
333 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
336 2002-09-02 Nick Clifton <nickc@redhat.com>
338 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
339 names instead of cryptically overloaded bfd_reloc error
341 (v850_elf_relocate_section): Likewise.
342 (v850_elf_relax_section): Replace caching of external symbols
343 with caching of internal symbols obtained from calling
344 bfd_elf_get_elf_syms().
345 Fixup problems with freeing cached allocated memory blocks.
347 2002-09-02 Alan Modra <amodra@bigpond.net.au>
349 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
350 (bfd_pj_arch): Use bfd_default_scan.
351 * cpu-v850.c (scan): Remove.
352 (N): Use bfd_default_scan.
353 * cpu-z8k.c (scan_mach): Remove.
354 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
355 first. Use bfd_default_scan.
357 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
359 (ecoff_get_magic): Likewise.
360 * elf32-v850.c (v850_elf_object_p): Likewise.
361 (v850_elf_final_write_processing): Likewise.
362 * mipsbsd.c (MY(set_arch_mach)): Likewise.
363 (MY(write_object_contents)): Likewise.
364 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
365 * coffcode.h (coff_write_object_contents): Likewise.
366 (coff_set_arch_mach_hook): Add comment describing machine == 0.
367 Remove unnecessary "machine" assignments.
368 (coff_write_relocs): Test for the absolute section sym by testing
371 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
372 and bfd_mach_i386_i386_intel_syntax.
373 * pdp11.c (NAME(aout,machine_type)): Likewise.
375 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
377 * bfd-in.h (align_power): Cast constants to bfd_vma type.
378 * bfd-in2.h (align_power): Likewise.
380 2002-08-30 Alan Modra <amodra@bigpond.net.au>
382 * Makefile.am: Run "make dep-am".
383 * Makefile.in: Regenerate.
385 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
386 * cpu-powerpc.c (powerpc_compatible): Likewise.
387 * cpu-rs6000.c (rs6000_compatible): Likewise.
389 2002-08-28 Catherine Moore <clm@redhat.com>
391 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
392 (v850-elf-reloc): Don't resolve pc relative relocs.
393 (v850_elf_ignore_reloc): New routine.
394 (v850_elf_final_link_relocate): Handle new relocs.
395 (v850_elf_relax_delete_bytes ): New routine.
396 (v850_elf_relax_section): New routine.
397 (bfd_elf32_bfd_relax_section): Define.
398 (HOWTO): New entries for new relocs.
399 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
400 (BFD_RELOC_V850_LONGJUMP): New reloc.
401 (BFD_RELOC_V850_ALIGN): New reloc.
402 * archures.c: Remove redundant v850ea architecture.
403 * cpu-v850.c: Remove redundant v850ea support.
404 * libbfd.h: Regenerate.
405 * bfd-in2.h: Regenerated.
407 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
409 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
410 * configure.in: Add tic4x_coff vector files.
411 * configure: Regenerate.
412 * Makefile.am: Add tic4x target.
413 * Makefile.in: Regenerate.
415 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
417 * archures.c: Add the BFD arch type tic4x.
418 * bfd-in.h: Add BFD_IN_MEMORY flag.
419 * coff-tic4x.c: New file.
420 * coffswap.h (coff_swap_sym_out): Add preadjuster.
421 * cpu-tic4x.c: New file.
422 * targets.c: Added tic4x- in list of xvecs.
423 * ticoff.h: New file.
424 * bfd-in2.h: Regenerate.
426 2002-08-27 Adam Nemet <anemet@lnxw.com>
428 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
429 bit of DT_INIT and DT_FINI for Thumb functions.
431 2002-08-26 Alan Modra <amodra@bigpond.net.au>
433 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
435 2002-08-26 Alan Modra <amodra@bigpond.net.au>
437 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
439 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
441 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
442 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
444 (struct elf_sh_pcrel_relocs_copied): Removed.
445 (struct elf_sh_dyn_relocs): New.
446 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
447 field with dyn_relocs.
448 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
449 sections and sym_sec.
450 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
451 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
452 (sh_elf_create_dynamic_sections): Use create_got_section instead
453 of _bfd_elf_create_got_section.
454 (sh_elf_check_relocs): Likewise.
455 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
457 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
458 sh_elf_relocate_section, sh_elf_check_relocs,
459 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
461 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
462 dynamic relocations and avoiding the copy relocation when we
463 didn't find any dynamic relocations in the section which has
464 contents or is read-only.
465 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
466 (sh_elf_size_dynamic_sections): Don't reset the size of
467 .rela.got section even if dynamic_sections_created flag is off.
468 Don't use sh_elf_discard_copies. Scan all input bfd and use
469 allocate_dynrelocs. Call readonly_dynrelocs to determine
470 whether we need DT_TEXTREL.
471 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
472 whether the symbol was never referred to.
473 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
474 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
475 (sh_elf_check_relocs): Call create_got_section if the short-cut
476 to .got is null. Increment reference counters only instead of
477 allocating space on dynamic sections here. Don't conditionalize
478 uninitialized got.offset value when marking the symbol as a
479 global offset table entry. Keep relocations for symbols satisfied
480 by a dynamic library to avoid copy relocations for the symbol.
481 Set dynobj field of an elf hash table if needed.
482 (sh_elf_finish_dynamic_sections): Handle null section pointer
484 (elf_backend_copy_indirect_symbol): Defined.
485 (elf_backend_can_refcount): Defined.
487 2002-08-23 Nick Clifton <nickc@redhat.com>
489 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
490 previous change. Add comment explaining why.
492 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
494 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
495 contents of .got.plt[2] to tr0, not address of .got.plt.
496 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
497 patching absolute plt entry. For shmedia plt entry, set bottom bit
498 of branch to plt0 as this is a branch to an shmedia instruction.
499 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
500 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
501 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
503 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
504 patching absolute plt entry. For shmedia plt entry, branch to
505 plt0 is now ptrel, so use relative offset. Set bottom bit of
506 branch target as it is a branch to an shmedia instruction.
508 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
509 Richard Shann <richard.shann@superh.com>
511 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
512 value if .init is an SHmedia function. Similarly for DT_FINI.
513 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
515 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
517 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
519 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
521 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
523 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
524 byte read when reading the return address register column.
526 2002-08-22 Nick Clifton <nickc@redhat.com>
528 * config.bfd: Add powepc64-*-*bsd* target.
530 2002-08-22 Graeme Peterson <gp@qnx.com>
532 * Makefile.am: Add entries for elf32-shqnx.c
533 * Makefile.in: Regenerate.
534 * config.bfd: Add support sh-*-nto* target.
535 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
536 * configure: Regenerate.
537 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
538 * elf32-sh.c: Do not include elf32-target.h if
539 ELF32_SH_C_INCLUDED is defined.
540 * elf32-shqnx.c: New file: Support for QNX.
541 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
543 2002-08-22 Nick Clifton <nickc@redhat.com>
545 * po/tr.po: Updated Turkish translation.
547 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
548 symbols are not read.
550 2002-08-22 Alan Modra <amodra@bigpond.net.au>
552 * elf32-m68hc11.c: Formatting fixes.
553 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
554 * elf32-m68hc12.c: Formatting fixes.
555 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
557 2002-08-22 Alan Modra <amodra@bigpond.net.au>
559 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
561 (pmac_xcoff_vec): Likewise.
562 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
563 (aix5coff64_vec): Likewise.
565 2002-08-22 Alan Modra <amodra@bigpond.net.au>
567 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
568 param to elf_backend_copy_indirect_symbol.
569 (_bfd_elf_link_hash_copy_indirect): Likewise.
570 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
571 calls to copy_indirect_symbol.
572 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
573 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
574 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
575 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
576 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
577 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
578 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
579 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
580 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
581 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
582 test refcounts for "used" values.
584 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
586 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
587 argument declaration.
589 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
591 * archures.c (bfd_mach_ppc_e500): Added.
592 * bfd-in2.h: Rebuilt.
593 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
595 2002-08-19 Alan Modra <amodra@bigpond.net.au>
597 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
599 2002-08-17 Andrew Cagney <ac131313@redhat.com>
601 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
604 2002-08-17 Stan Cox <scox@redhat.com>
606 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
607 IRIX 6 segment layout for NEWABI.
609 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
611 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
612 symbols when looking for section referred to by a relocation.
613 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
615 2002-08-15 Alan Modra <amodra@bigpond.net.au>
617 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
619 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
621 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
622 missing check for whether the symbol is referenced by DSO before
623 unexporting it as an unneeded dynamic symbol.
625 2002-08-14 H.J. Lu <hjl@gnu.org>
627 * libbfd.h: Regenerate.
629 2002-08-14 H.J. Lu <hjl@gnu.org>
631 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
633 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
635 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
637 (m68hc11_direct_relax): New to define table of relaxable instructions.
638 (find_relaxable_insn): New, find a relaxable insn.
639 (compare_reloc): New to compare two relocs.
640 (m68hc11_elf_relax_section): New, relax text sections.
641 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
642 (elf32_m68hc11_check_relocs): New function for GC support.
643 (elf32_m68hc11_relocate_section): New function for GC support.
644 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
645 (elf_backend_check_relocs): Likewise.
646 (elf_backend_relocate_section): Likewise.
648 2002-08-13 H.J. Lu <hjl@gnu.org>
650 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
651 definitions in shared objects when checking symbol with
654 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
656 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
657 (elf32_m68hc11_gc_sweep_hook): Likewise.
658 (elf_backend_gc_mark_hook): Define for GC section support.
659 (elf_backend_gc_sweep_hook): Likewise.
660 (elf_backend_can_gc_sections): Likewise.
662 * elf32-m68hc12.c: Likewise.
664 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
666 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
667 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
668 (_bfd_m68hc11_elf_set_private_flags): New function.
669 Use them to set/check/print ELF flags specific to 68HC11.
671 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
672 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
673 (_bfd_m68hc12_elf_set_private_flags): New function.
674 Use them to set/check/print ELF flags specific to 68HC12.
676 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
678 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
679 fix masks for PC-rel relocs.
680 (m68hc11_elf_ignore_reloc): New function.
682 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
683 68HC12 banked addressing relocs.
684 (m68hc12_phys_addr): New to compute physical address of banked memory.
685 (m68hc12_phys_page): Likewise for page.
686 (m68hc12_addr_is_banked): New to see if address is in banked area.
687 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
689 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
691 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
692 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
693 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
694 * bfd-in2.h: Regenerate.
696 2002-08-12 H.J. Lu <hjl@gnu.org>
698 * elflink.h (elf_add_default_symbol): Preserve section across
701 2002-08-09 Graeme Peterson <gp@qnx.com>
703 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
704 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
705 * Makefile.in: Regenerate.
706 * config.bfd: Add support for powerpc{le}-*-nto targets.
707 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
708 * configure: Regenerate.
709 * elf32-i386qnx.c: Moved backend functions into a QNX specific
710 common file "elf32-qnx.h", and now include that file.
711 * elf32-qnx.h: New file: QNX specific common elf backend.
712 * elf32-ppc.c: Do not include elf32-target.h if
713 ELF32_PPC_C_INCLUDED is defined.
714 * elf32-ppcqnx.c: New file: Support for QNX.
715 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
716 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
718 2002-08-09 Nick Clifton <nickc@redhat.com>
720 * po/sv.po: Updated Swedish translation.
722 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
724 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
725 g->global_gotsym is NULL.
727 2002-08-08 H.J. Lu <hjl@gnu.org>
729 * elflink.h (elf_add_default_symbol): Don't warn if a definition
730 overrides an indirect versioned symbol.
732 2002-08-08 Jakub Jelinek <jakub@redhat.com>
734 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
735 for R_386_TLS_TPOFF32 relocs against symndx 0.
737 2002-08-07 H.J. Lu <hjl@gnu.org>
739 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
740 with undefined version if needed.
741 (elf_link_assign_sym_version): Match a default symbol with a
742 version without definition. No need to hide the default
743 definition separately.
745 2002-08-08 Alan Modra <amodra@bigpond.net.au>
747 * elflink.h (elf_link_output_extsym): Don't output symbols from
748 SEC_EXCLUDE sections.
750 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
752 2002-08-07 Alan Modra <amodra@bigpond.net.au>
754 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
757 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
759 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
762 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
764 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
766 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
768 * elf32-mips.c (mips_reloc_map): Fix typo.
770 2002-08-06 Alan Modra <amodra@bigpond.net.au>
772 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
774 2002-08-06 Alan Modra <amodra@bigpond.net.au>
776 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
778 2002-08-06 Alan Modra <amodra@bigpond.net.au>
780 * libxcoff.h: Use PARAMS on function declarations.
781 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
782 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
784 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
786 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
788 2002-08-06 Alan Modra <amodra@bigpond.net.au>
790 * coff-rs6000.c: Formatting fixes.
791 (xcoff_calculate_relocation): Use PARAMS in declaration.
792 (xcoff_complain_overflow): Likewise.
793 (xcoff_ppc_relocate_section): Use old-style function pointer call.
794 (bfd_xcoff_backend_data): Remove useless comments.
795 (rs6000coff_vec): Likewise.
796 (bfd_pmac_xcoff_backend_data): Likewise.
797 (pmac_xcoff_vec): Likewise.
799 * coff64-rs6000.c: Formatting fixes.
800 (xcoff64_calculate_relocation): Use PARAMS in declaration.
801 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
802 (bfd_xcoff_backend_data): Remove useless comments.
803 (rs6000coff64_vec): Likewise.
804 (bfd_xcoff_aix5_backend_data): Likewise.
805 (aix5coff64_vec): Likewise.
807 2002-08-06 Alan Modra <amodra@bigpond.net.au>
809 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
810 mask entries. Use complain_overflow_dont for R_REF.
811 (xcoff_reloc_type_ba): Revert last change.
812 (xcoff_reloc_type_br): Likewise.
813 (xcoff_reloc_type_crel): Likewise.
814 (xcoff_ppc_relocate_section): Likewise.
815 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
816 (xcoff64_ppc_relocate_section): Likewise.
817 (xcoff64_howto_table): Revert some of last change to mask entries.
818 Use complain_overflow_dont for R_REF.
820 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
821 relocs with bitsize == 16 have size = 1.
822 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
823 (xcoff_reloc_type_br): Likewise.
824 (xcoff_reloc_type_crel): Likewise.
825 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
826 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
828 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
829 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
830 bitsize == 16 have size = 1.
832 2002-08-01 Denis Chertykov <denisc@overta.ru>
834 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
835 (struct misc): New field isymbuf. All free_* fields removed.
836 (symbol_value): Pass in internal syms. No need to swap syms in.
837 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
838 possibly cached info.
839 (tidyup_after_error): Removed.
840 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
842 (adjust_all_relocations): Use internal syms. No need to swap syms
844 (add_page_insn): Don't use removed fields of struct misc.
846 2002-08-01 Nick Clifton <nickc@redhat.com>
848 * elf32-arm.h: Revert previous delta.
850 2002-08-01 Nick Clifton <nickc@redhat.com>
852 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
853 * configure: Regenerate.
855 2002-07-31 H.J. Lu <hjl@gnu.org>
857 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
860 2002-07-31 H.J. Lu <hjl@gnu.org>
862 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
865 2002-07-31 Jakub Jelinek <jakub@redhat.com>
867 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
868 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
870 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
872 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
873 There is no 8 byte relocation type for this architecture.
874 (do_ns32k_reloc): Use bfd_vma instead of native types.
875 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
877 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
878 rely on generic code to do that.
879 * aout-ns32k.c (howto_table): Add appropriate overflow detection
880 to all table entries.
881 (_bfd_ns32k_relocate_contents): put_data returns void.
882 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
883 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
886 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
888 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
889 archive object is target dependant.
891 2002-07-31 Adam Nemet <anemet@lnxw.com>
893 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
894 (THUMB_PLT_ENTRY_SIZE): New macro.
895 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
896 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
898 (elf32_arm_plt_entry): Likewise.
899 (elf_backend_plt_header_size): Likewise.
900 (elf32_thumb_plt0_entry): New global.
901 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
903 (elf32_thumb_plt_entry): New global.
904 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
905 Thumb entries. Set the bottom bit of the corresponding GOT entry
906 for a Thumb PLT entry.
907 (struct elf32_arm_plt_entry_info): New structure.
908 (struct elf32_arm_link_hash_entry, plt_info): New member of this
910 (elf32_arm_link_hash_newfunc): Initialize new member.
911 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
912 relocations against the PLT.
913 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
914 first_rel_type if this is the first time we encounter the symbol.
915 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
916 Determine if relocation needs a PLT entry. Set first_rel_type if
917 this is the first time we encounter the symbol
918 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
920 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
921 (elf32_arm_create_dynamic_sections): New function. Create the
923 (elf_backend_create_dynamic_sections): Call it.
925 2002-07-31 Nick Clifton <nickc@redhat.com>
927 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
928 'alternative' in order to avoid shadowing global symbol of the
930 * bfd-in2.h: Regenerate.
931 * libbfd.h: Regenerate.
932 * libcoff.h: Regenerate.
934 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
936 * Makefile.am: Add n32 ABI support.
937 * Makefile.in: Regenerate.
938 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
939 bit vectors for mips*-*-linux targets as optional.
940 * configure.in: Add n32 ABI vectors.
941 * configure: Regenerate.
942 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
943 * elfn32-mips.c: New file, n32 ABI support.
944 * targets.c: Add n32 ABI vectors.
946 2002-07-30 Graeme Peterson <gp@qnx.com>
948 * elfarmqnx-nabi.c: New file: Support for QNX.
949 * config.bfd: Add support for arm-*-nto target.
950 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
951 * configure: Regenerate.
952 * Makefile.am: Add entries for elfarmqnx-nabi.c.
953 * Makefile.in: Regenerate.
954 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
955 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
956 * elfarm-nabi.c: Do not include elf32-arm.h if
957 ELFARM_NABI_C_INCLUDED is defined.
958 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
960 2002-07-30 Nick Clifton <nickc@redhat.com>
962 * po/sv.po: Updated Swedish translation.
964 2002-07-30 Jakub Jelinek <jakub@redhat.com>
966 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
968 2002-07-30 Alan Modra <amodra@bigpond.net.au>
970 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
971 * archive.c (bfd_generic_archive_p): Likewise.
972 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
973 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
974 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
975 (xcoff64_archive_p): Likewise.
976 (xcoff64_openr_next_archived_file): Likewise.
977 (xcoff64_archive_p): Clean up tdata properly on error.
978 * coffgen.c (coff_real_object_p): Likewise.
979 (coff_object_p): Release filehdr and opthdr.
980 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
981 * ieee.c (ieee_archive_p): Likewise.
982 * ihex.c (ihex_object_p): Likewise.
983 (ihex_mkobject): Always allocate tdata.
984 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
985 * srec.c (srec_mkobject): Always allocate tdata.
986 (srec_object_p): Clean up tdata properly on error.
987 (symbolsrec_object_p): Likewise.
988 * versados.c (versados_object_p): Likewise.
989 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
990 and bfd_realloc instead of realloc.
991 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
992 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
993 place of bfd_malloc, simplifying error freeing. Free hash table too.
994 (vms_object_p): Clean up tdata on error.
995 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
996 (vms_close_and_cleanup): Adjust for bfd_alloc use.
998 2002-07-30 Alan Modra <amodra@bigpond.net.au>
1000 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
1002 2002-07-26 Chris Demetriou <cgd@broadcom.com>
1004 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
1005 flags into resulting BFD.
1007 2002-07-26 Alan Modra <amodra@bigpond.net.au>
1009 From John Reiser <jreiser@BitWagon.com>
1010 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
1011 tls_ldm_got.refcount.
1013 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1015 * elf64-mips.c: Update TODO comment.
1016 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
1017 mips_elf64_gprel16_reloca): Remove prototypes.
1018 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
1019 (UNUSED_RELOC): Replace by EMPTY_RELOC.
1020 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
1021 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
1023 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
1024 R_MIPS_GOT16. Remove wrong comments.
1025 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
1026 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
1028 (mips_elf64_hi16_reloc): Fix formatting.
1029 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
1030 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
1031 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
1032 (mips_elf64_gprel16_reloc): Make static. Add check for
1034 (mips_elf64_gprel16_reloca): Remove.
1035 (mips_elf64_literal_reloc): New function.
1036 (mips_elf64_gprel32_reloc): Fix formatting.
1037 (mips_elf64_shift6_reloc): Fix comment. Make static.
1038 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
1040 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
1042 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
1043 specific relocations.
1044 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
1045 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
1046 (ELF_MAXPAGESIZE): Add comment.
1048 2002-07-25 Nick Clifton <nickc@redhat.com>
1050 * po/sv.po: Updated Swedish translation.
1051 * po/es.po: Updated Spanish translation.
1052 * po/fr.po: Updated French translation.
1054 2002-07-25 Alan Modra <amodra@bigpond.net.au>
1056 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
1057 as elf_link_record_local_dynamic_symbol.
1058 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
1059 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
1060 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
1061 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
1062 attempt is made to record a symbol in a discarded section, and
1063 return `2' in that case.
1065 2002-07-24 Nick Clifton <nickc@redhat.com>
1067 * po/sv.po: Updated Swedish translation.
1068 * po/es.po: Updated Spanish translation.
1070 2002-07-23 Alan Modra <amodra@bigpond.net.au>
1072 * po/SRC-POTFILES.in: Regenerate.
1074 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
1075 immediately. Remove code handling relocatable linking.
1076 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1077 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1078 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
1079 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1080 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1081 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1082 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1083 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1084 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1085 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1086 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1087 * elf32-avr.c (elf_backend_rela_normal): Define.
1088 * elf32-cris.c: Likewise.
1089 * elf32-fr30.c: Likewise.
1090 * elf32-frv.c: Likewise.
1091 * elf32-h8300.c: Likewise.
1092 * elf32-hppa.c: Likewise.
1093 * elf32-ip2k.c: Likewise.
1094 * elf32-sparc.c: Likewise.
1095 * elf32-v850.c: Likewise.
1096 * elf32-vax.c: Likewise.
1097 * elf64-hppa.c: Likewise.
1098 * elf64-sparc.c: Likewise.
1099 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
1100 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1101 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1102 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1103 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1104 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1105 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1106 * elf-m10200.c (USE_RELA): Don't define.
1107 * elf-m10300.c: Likewise.
1108 * elfarm-oabi.c: Likewise.
1109 * elf32-i370.c: Likewise.
1110 * elf32-ip2k.c: Likewise.
1111 * elf32-m68k.c: Likewise.
1112 * elf32-mcore.c: Likewise.
1113 * elf32-ppc.c: Likewise.
1114 * elf32-s390.c: Likewise.
1115 * elf32-vax.c: Likewise.
1116 * elf64-ppc.c: Likewise.
1117 * elf64-s390.c: Likewise.
1118 * elf64-x86-64.c: Likewise.
1119 * elfxx-ia64.c: Likewise.
1120 * elf32-avr.c (USE_REL): Don't undef.
1121 * elf32-ip2k.c: Likewise.
1123 2002-07-23 Nick Clifton <nickc@redhat.com>
1125 * elf-bfd.h (struct elf_backend_data): Add new bitfield
1126 'want_p_paddr_set_to_zero'.
1127 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
1129 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
1130 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
1132 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
1134 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
1135 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
1136 show the Copyright string.
1137 Minor formatting tidy ups.
1139 2002-07-23 Nick Clifton <nickc@redhat.com>
1141 * po/fr.po: Updated French translation.
1142 * po/sv.po: Updated Swedish translation.
1144 2002-07-23 Alan Modra <amodra@bigpond.net.au>
1146 * elflink.h (elf_link_input_bfd): Don't change internal symbols
1147 when outputting relocs.
1149 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
1151 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
1152 DT_PLTGOT into the dynamic section if there is a PLT.
1154 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1156 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
1158 (_bfd_mips_elf_write_section): Likewise.
1159 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
1160 (_bfd_mips_elf_write_section): Likewise.
1161 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
1162 (elf32_mips_write_section): Likewise.
1163 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
1164 (_bfd_mips_elf_write_section): Likewise.
1166 2002-07-19 Alan Modra <amodra@bigpond.net.au>
1168 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
1169 PT_IA_64_UNWIND segments for a given section.
1171 2002-07-17 H.J. Lu <hjl@gnu.org>
1173 * Makefile.am: Fix a typo.
1174 * Makefile.in: Regenerate.
1176 2002-07-15 Denis Chertykov <denisc@overta.ru>
1177 Frank Ch. Eigler <fche@redhat.com>
1178 Ben Elliston <bje@redhat.com>
1179 Alan Lehotsky <alehotsky@cygnus.com>
1180 John Healy <jhealy@redhat.com>
1181 Graham Stott <grahams@redhat.com>
1182 Jeff Johnston <jjohnstn@redhat.com>
1184 * Makefile.am: Add support for ip2k.
1185 * Makefile.in: Regenerate.
1186 * doc/Makefile.in: Regenerate.
1187 * archures.c: Add support for ip2k.
1188 * config.bfd: Add support for ip2k.
1189 * configure.in: Add support for ip2k.
1190 * configure: Regenerate.
1191 * reloc.c: Add support for ip2k.
1192 * targets.c: Add support for ip2k.
1193 * bfd-in2.h: Regenerate.
1194 * libbfd.h: Regenerate.
1195 * cpu-ip2k.c: New file.
1196 * elf32-ip2k.c: New file.
1198 2002-07-17 Ian Rickards <irickard@arm.com>
1200 * dwarf2.c (concat_filename): If we can't establish the directory
1201 just return the filename.
1203 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
1205 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
1207 2002-07-16 Alan Modra <amodra@bigpond.net.au>
1209 * elflink.h: Formatting fixes, tidy prototypes.
1210 (elf_link_assign_sym_version): Move common code out of loop.
1212 2002-07-16 Alan Modra <amodra@bigpond.net.au>
1214 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
1215 reloc section size is zero. Correct reloc output location.
1217 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1219 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
1220 the final type for the e_fsel selector when generating PA2.0W code.
1221 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
1224 2002-07-14 H.J. Lu <hjl@gnu.org>
1226 * elflink.h (elf_link_assign_sym_version): Hide the default
1227 definition if there is a hidden versioned definition.
1229 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
1231 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
1232 dynamic reference test in assertion when initializing GOT with
1233 static contents. Just assert that there are either no dynamic
1234 sections, the symbol is defined in the regular objects or that the
1235 symbol is undef weak. Tweak comment.
1236 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
1237 only if the symbol isn't defined in the program and isn't undef
1239 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
1240 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
1241 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
1242 (elf_cris_discard_excess_program_dynamics): Don't consider
1243 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
1245 2002-07-11 Alan Modra <amodra@bigpond.net.au>
1247 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
1248 unresolved debugging relocs in dynamic applications.
1249 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1250 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1251 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1252 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1253 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1254 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1256 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1258 * elf64-ppc.c (ONES): Define.
1259 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
1260 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
1261 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
1263 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
1264 (ppc64_elf_set_private_flags): Delete.
1265 (ppc64_elf_section_from_shdr): Delete.
1266 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
1267 (ppc64_elf_fake_sections): Delete.
1268 (bfd_elf64_bfd_set_private_flags): Don't define.
1269 (bfd_elf64_get_symbol_info): Likewise.
1270 (elf_backend_section_from_shdr): Likewise.
1271 (elf_backend_fake_sections): Likewise.
1273 2002-07-10 Marco Walther <Marco.Walther@sun.com>
1275 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
1276 when not already set.
1277 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
1278 (elf_backend_fake_sections): Define.
1280 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1282 * merge.c (_bfd_merge_section): Remove redundant output_section check.
1284 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
1286 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
1288 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
1289 NULL sym_hashes to just before use.
1290 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
1291 symbol with non-default visibility.
1292 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
1293 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1295 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
1296 symbol with non-default visibility.
1297 (cris_elf_check_relocs): At tests for local symbol before
1298 increasing h->plt.refcount, also check for non-default
1299 visibility. Ditto when checking for local symbol to eliminate
1300 pc-relative runtime relocs.
1302 2002-07-08 Alan Modra <amodra@bigpond.net.au>
1304 * elf.c: Formatting.
1305 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
1306 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
1307 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
1310 2002-07-07 Mark Mitchell <mark@codesourcery.com>
1311 Alan Modra <amodra@bigpond.net.au>
1313 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
1314 account the impact of relocation count overflow when computing
1316 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
1317 or not to apply the PE COFF reloc overflow handling. Fix a
1318 fencepost error in deciding whether or not to use that technique.
1320 2002-07-07 Alan Modra <amodra@bigpond.net.au>
1322 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
1323 change type of locsyms.
1324 (bfd_elf_get_elf_syms): Declare.
1325 * elf.c (bfd_elf_get_elf_syms): New function.
1326 (group_signature): Use bfd_elf_get_elf_syms.
1327 (bfd_section_from_r_symndx): Likewise.
1328 * elfcode.h (elf_slurp_symbol_table): Likewise.
1329 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1330 (elf_link_add_object_symbols): Likewise. Reorganise to increase
1331 locality of various data structures. Properly free internal relocs.
1332 (elf_bfd_final_link): Properly free internal relocs.
1333 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
1334 (elf_link_input_bfd): Likewise.
1335 (elf_gc_mark): Likewise. Properly free internal relocs.
1336 (elf_gc_sweep): Properly free internal relocs.
1337 (elf_reloc_symbol_deleted_p): No need to swap syms in.
1338 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
1340 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
1341 Properly free possibly cached info.
1342 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
1343 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
1344 symbol swapping code.
1345 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
1346 Properly free possibly cached info.
1347 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
1348 (mn10300_elf_relax_delete_bytes): Likewise.
1349 (mn10300_elf_symbol_address_p): Likewise.
1350 (mn10300_elf_get_relocated_section_contents): Likewise.
1351 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
1352 (elf32_h8_relax_delete_bytes): Likewise.
1353 (elf32_h8_symbol_address_p): Likewise.
1354 (elf32_h8_get_relocated_section_contents): Likewise.
1355 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
1356 (m32r_elf_relax_delete_bytes): Likewise.
1357 (m32r_elf_get_relocated_section_contents): Likewise.
1358 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
1359 elf_section_data to determine whether cached.
1360 (sh_elf_relax_section): As above for elf-m10200.c.
1361 (sh_elf_relax_delete_bytes): Likewise.
1362 (sh_elf_get_relocated_section_contents): Likewise.
1363 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
1364 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
1365 reading of local syms.
1366 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1367 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
1368 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
1369 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
1371 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
1372 free internal relocs and section contents. Don't read symbols.
1373 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
1374 (elf32_hppa_size_stubs): Don't free local syms.
1375 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
1376 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
1377 possibly cached info.
1378 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1379 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
1380 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
1382 (get_local_syms): Delete function.
1383 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
1385 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
1387 2002-07-05 Jim Wilson <wilson@redhat.com>
1389 * syms.c (decode_section_type): New.
1390 (bfd_decode_symclass): Call decode_section_type.
1392 2002-07-04 Jakub Jelinek <jakub@redhat.com>
1394 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
1395 section content start.
1396 Reported by Michael Schumacher <mike@hightec-rt.com>.
1398 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1400 * section.c (_bfd_strip_section_from_output): Remove unnecessary
1401 link order code. Don't actually remove the output section here;
1402 Just set a flag for the linker to do so.
1403 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
1404 sections when setting up output section dynsyms.
1406 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1408 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
1410 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
1413 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1415 * elf64-s390.c (create_got_section): Set .got section alignment to
1417 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
1419 2002-07-02 Alan Modra <amodra@bigpond.net.au>
1421 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
1423 2002-07-01 Matt Thomas <matt@3am-software.com>
1425 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
1428 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1430 * elfxx-mips.c (ABI_64_P): Fix comment.
1431 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
1432 new section names for N64 ABI.
1433 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1434 (mips_elf_calculate_relocation): Code formatting.
1435 (mips_elf_create_dynamic_relocation): Likewise.
1436 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1437 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1438 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1440 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1442 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1443 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1446 2002-07-01 Andreas Schwab <schwab@suse.de>
1448 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1449 R_X86_64_64 to R_X86_64_RELATIVE.
1451 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1453 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1454 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1456 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1458 * configure.in (vaxbsd_vec): Add.
1459 * targets.c (vaxbsd_vec): Add.
1460 * Makefile.in: Rebuild.
1461 * configure: Rebuild.
1462 * po/SRC-POTFILES.in: Rebuild.
1464 2002-07-01 Alan Modra <amodra@bigpond.net.au>
1466 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1467 examining to gc_mark_hook, rather than the bfd.
1468 (elf_gc_sections): Adjust.
1469 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1470 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1471 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1472 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1473 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1474 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1475 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1476 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1477 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1478 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1479 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1480 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1481 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1482 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1483 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1484 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1485 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1486 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1487 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1488 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1489 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1490 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1491 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1492 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1493 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1494 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1495 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1496 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1497 redundant local sym tests.
1498 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1499 (link_hash_newfunc): Init is_entry.
1500 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1501 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1502 (create_linkage_sections): Use bfd_make_section_anyway rather than
1504 (ppc64_elf_mark_entry_syms): New function.
1505 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1506 up opd entry to function section map.
1507 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1508 relocs that reference the opd section.
1509 (edit_opd): New function.
1510 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1511 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1512 (get_local_syms): Do so here. Exit if we already have local syms.
1513 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1514 read local syms on non-ELF input.
1515 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1516 than duplicating it's function here. Adjust free of internal
1518 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1519 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1520 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1521 _bfd_elf32_link_read_relocs rather than duplicating it's function
1522 here. Adjust free of internal relocs to suit.
1524 2002-07-01 Andreas Jaeger <aj@suse.de>
1526 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1527 are not allowed in shared libs code, enforce -fPIC.
1529 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1531 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1532 trailing zero-sequences when there's previous left-over data.
1534 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1536 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1537 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1538 and opd_rel_sec in order for starting rela section. Check _raw_size.
1539 (elf_backend_reloc_type_class): Define.
1541 2002-06-27 Kevin Buettner <kevinb@redhat.com>
1543 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1546 2002-06-27 Alan Modra <amodra@bigpond.net.au>
1548 * cpu-powerpc.c: Comment on ordering of arch_info.
1549 * elf32-ppc.c (ppc_elf_object_p): New function.
1550 (elf_backend_object_p): Define.
1551 * elf64-ppc.c (ppc64_elf_object_p): New function.
1552 (elf_backend_object_p): Define.
1554 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1556 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1557 * configure: Regenerate.
1559 2002-06-25 Jason Eckhardt <jle@rice.edu>
1561 * dwarf2.c (decode_line_info): Check unit->addr_size
1562 to read in the proper number of prologue bytes.
1564 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1566 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1567 aix5coff64_vec if 64-bit bfd support has been enabled.
1568 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1571 * targets.c (_bfd_target_vector[]): Only include
1572 aix5coff64_vec if 64-bit bfd support has been enabled.
1574 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1576 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1577 * elf32-hppa.c (hppa_add_stub): Likewise.
1578 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1579 * elflink.h (elf_add_default_symbol): Fix comment typo.
1580 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1581 (elf_link_add_object_symbols): Likewise.
1582 (elf_link_assign_sym_version): Likewise.
1583 * hash.c (bfd_hash_lookup): Likewise.
1584 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1585 * section.c (bfd_get_unique_section_name): Likewise.
1586 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1587 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1588 (assign_section_numbers): Likewise.
1589 (_bfd_elfcore_make_pseudosection): Likewise.
1590 (elfcore_grok_lwpstatus): Likewise.
1591 (elfcore_grok_win32pstatus): Likewise.
1592 (elfcore_write_note): Constify input params. Use PTR instead of
1593 void *. Include terminating NUL in namesz. Correct padding.
1594 Support NULL "name" param. Use memcpy instead of strcpy.
1595 (elfcore_write_prpsinfo): Constify input params.
1596 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1597 (elfcore_write_lwpstatus): Likewise.
1598 (elfcore_write_pstatus): Likewise.
1599 (elfcore_write_prfpreg): Likewise.
1600 (elfcore_write_prxfpreg): Likewise.
1601 * elf-bfd.h (elfcore_write_note): Update declaration.
1602 (elfcore_write_prpsinfo): Likewise.
1603 (elfcore_write_prstatus): Likewise.
1604 (elfcore_write_pstatus): Likewise.
1605 (elfcore_write_prfpreg): Likewise.
1606 (elfcore_write_prxfpreg): Likewise.
1607 (elfcore_write_lwpstatus): Likewise.
1609 2002-06-25 Jason Eckhardt <jle@rice.edu>
1611 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1612 symbols of type stProc and stStaticProc.
1614 2002-06-25 Nick Clifton <nickc@redhat.com>
1616 * ecoff.c: VArious formatting fixes.
1618 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1620 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1622 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1624 * aout-adobe.c: Don't compare against "true" or "false.
1625 * aout-target.h: Likewise.
1626 * aoutx.h: Likewise.
1627 * archive.c: Likewise.
1629 * cache.c: Likewise.
1630 * coff-a29k.c: Likewise.
1631 * coff-alpha.c: Likewise.
1632 * coff-i386.c: Likewise.
1633 * coff-mips.c: Likewise.
1634 * coff-or32.c: Likewise.
1635 * coff64-rs6000.c: Likewise.
1636 * coffcode.h: Likewise.
1637 * coffgen.c: Likewise.
1638 * cpu-ns32k.c: Likewise.
1639 * ecoff.c: Likewise.
1640 * ecofflink.c: Likewise.
1642 * elf32-arm.h: Likewise.
1643 * elf32-cris.c: Likewise.
1644 * elf32-d30v.c: Likewise.
1645 * elf32-i386.c: Likewise.
1646 * elf32-mcore.c: Likewise.
1647 * elf32-ppc.c: Likewise.
1648 * elf32-sh.c: Likewise.
1649 * elf32-sh64.c: Likewise.
1650 * elf32-v850.c: Likewise.
1651 * elf64-alpha.c: Likewise.
1652 * elf64-sh64.c: Likewise.
1653 * elfcode.h: Likewise.
1654 * elfcore.h: Likewise.
1655 * elflink.h: Likewise.
1656 * elfxx-mips.c: Likewise.
1657 * i386os9k.c: Likewise.
1659 * libbfd.c: Likewise.
1660 * linker.c: Likewise.
1662 * nlm32-alpha.c: Likewise.
1663 * nlm32-i386.c: Likewise.
1664 * nlm32-ppc.c: Likewise.
1665 * nlm32-sparc.c: Likewise.
1666 * nlmcode.h: Likewise.
1667 * oasys.c: Likewise.
1668 * pdp11.c: Likewise.
1669 * peicode.h: Likewise.
1670 * reloc.c: Likewise.
1673 * tekhex.c: Likewise.
1675 * xcofflink.c: Likewise.
1676 * elf64-sparc.c: Edit comment to not use "== false".
1678 * aoutf1.h: Don't use "? true : false".
1679 * ecoff.c: Likewise.
1680 * format.c: Likewise.
1682 * linker.c: Likewise.
1684 * oasys.c: Likewise.
1686 2002-06-23 H.J. Lu <hjl@gnu.org>
1688 * elflink.h (elf_link_add_archive_symbols): For the default
1689 version, check references with only one `@' first.
1691 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1693 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1695 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1697 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1698 (elf64_hppa_size_dynamic_sections): Revise to use
1699 elf64_hppa_mark_milli_and_exported_functions.
1700 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1701 symbols out of dynamic symbol table.
1703 2002-06-23 Alan Modra <amodra@bigpond.net.au>
1705 * Makefile.in: Regenerate.
1706 * libbfd.h: Regenerate.
1707 * bfd-in2.h: Regenerate.
1708 * configure: Regenerate.
1709 * po/SRC-POTFILES.in: Regenerate.
1711 * elflink.h: Comment typo fixes.
1713 2002-06-23 H.J. Lu <hjl@gnu.org>
1715 * elf-bfd.h (elf_link_loaded_list): New structure.
1716 (elf_link_hash_table): Add "loaded".
1717 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1718 * elflink.h (elf_link_check_versioned_symbol): New function.
1719 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1721 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1723 * elflink.h (size_dynamic_sections): If the target does not
1724 support an ELF style hash table, return true, indicating that
1725 nothing needed to be done, rather than false, indicating that the
1726 section's size could not be computed.
1728 2002-06-18 Dave Brolley <brolley@redhat.com>
1730 From Catherine Moore, Michael Meissner, Dave Brolley:
1731 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1732 * targets.c: Support bfd_elf32_frv_vec.
1733 * reloc.c: Add FRV relocs.
1734 * configure.in: Add support for bfd-elf32-frv-vec.
1735 * config.bfd (targ_cpu): Add support for frv-*-elf.
1736 * archures.c: Add frv arch and machines.
1737 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1738 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1739 (BFD32_BACKENDS): Add elf32-frv.lo.
1740 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1741 (cpu-frv.lo): New target.
1742 (elf32-frv.lo): New target.
1743 * cpu-frv.c: New file.
1744 * elf32-frv.c: New file.
1746 2002-06-18 Jakub Jelinek <jakub@redhat.com>
1748 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1750 Only read the first section header if e_shoff is non-zero.
1751 Don't consider e_shstrndx if there are no sections.
1753 2002-06-17 Tom Rix <trix@redhat.com>
1755 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1756 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1757 complain_overflow_bitfield.
1759 2002-06-17 Alan Modra <amodra@bigpond.net.au>
1761 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1762 (bfd_fdopenr): Likewise.
1763 (bfd_openstreamr): Likewise.
1764 (bfd_openw): Likewise.
1766 * targets.c: Sort target vecs.
1767 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1768 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1769 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1770 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1771 * configure.in: Sort target vecs. Add m88kmach3_vec.
1772 * configure: Regenerate.
1774 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1776 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1777 bpo_reloc_no to break sort order ties, not address of items.
1779 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1781 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1782 Skip excluded sections in determing __gp value.
1783 (elf_hppa_final_link_relocate): Use the symbol's address in
1784 R_PARISC_FPTR64 relocations that don't need an opd entry.
1785 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1786 (elf64_hppa_finalize_dynreloc): Likewise.
1787 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1788 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1790 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1792 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1793 alignment for .bss, .data and .text sections so that sse and sse2
1795 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1797 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
1799 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1802 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1804 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1807 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1808 for a symbol that has no output section.
1809 (allocate_dynrel_entries): Correct comment.
1810 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1812 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1813 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1814 with no section. Remove unnecessary parentheses.
1816 2002-06-11 Tom Rix <trix@redhat.com>
1818 * coffcode.h (coff_compute_section_file_positions): Add data
1819 section to AIX loader alignment check.
1821 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1822 alignment to 4 bytes.
1823 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1824 power accessor macro.
1825 (do_shared_object_padding): Remove invalid assertion.
1827 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
1829 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1830 for removed output sections.
1832 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
1834 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1836 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1838 2002-06-08 H.J. Lu <hjl@gnu.org>
1840 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1841 work around a long long bug in gcc 2.96 on mips.
1843 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1845 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1846 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1847 Regenerate dependency lists.
1848 * Makefile.in: Regenerate.
1849 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1850 vax1knetbsd_vec to targ_selvecs.
1851 * configure.in: Add vax1knetbsd_vec.
1852 * configure: Regenerate.
1853 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1854 * vax1knetbsd.c: New file.
1855 * vaxnetbsd.c: Update copyright years.
1856 (TARGET_PAGE_SIZE): Set to 0x1000.
1857 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1859 2002-06-08 Matt Thomas <matt@3am-software.com>
1861 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1863 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1865 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1867 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1869 * Makefile.am: Run "make dep-am".
1870 * Makefile.in: Regenerate.
1872 * armnetbsd.c: Replace CONST with const.
1873 * corefile.c: Likewise.
1874 * elf32-dlx.c: Likewise.
1875 * elf64-mips.c: Likewise.
1877 * ns32knetbsd.c: Likewise.
1879 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1880 table is elf64-sparc.
1882 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1884 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1885 Fix RELA addends to get not shifted in the result. Don't do special
1886 handling of R_MIPS_64 for NewABI.
1888 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1890 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1891 (NAME(aout,slurp_reloc_table)): Likewise.
1892 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1893 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1894 (xcoff_write_archive_contents_big): Likewise.
1895 (xcoff_generate_rtinit): Likewise.
1896 (xcoff_generate_rtinit): Likewise, and check error return.
1897 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1898 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1899 (coff_get_normalized_symtab): Likewise.
1900 (coff_make_empty_symbol): Likewise.
1901 (bfd_coff_set_symbol_class): Likewise.
1902 * cofflink.c (coff_link_add_symbols): Likewise.
1903 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1904 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1905 (bfd_ecoff_write_accumulated_debug): Likewise.
1906 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1907 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1908 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1909 * ieee.c (do_with_relocs): Use bfd_zalloc.
1910 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1911 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1912 (NAME(aout,slurp_reloc_table)): Likewise.
1913 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1914 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1915 * som.c (som_build_and_write_symbol_table): Likewise.
1916 (som_slurp_string_table): Likewise.
1917 (som_slurp_symbol_table): Likewise.
1918 (som_bfd_ar_write_symbol_stuff): Likewise.
1919 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1920 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1921 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
1922 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1923 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1925 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1927 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1929 (elf_group_name): Update.
1930 (elf_group_id): Define.
1931 (bfd_elf_set_group_contents): Declare.
1932 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1933 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
1934 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
1935 that sym for the signature.
1936 (_bfd_elf_compute_section_file_positions): Don't call
1937 set_group_contents for "ld -r" case.
1938 (swap_out_syms): Use bfd_zalloc.
1939 * elflink.h (elf_link_add_archive_symbols): Likewise.
1940 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1941 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1943 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1945 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1946 relocs in opd for non-shared too.
1948 2002-06-06 Jeffrey Law <law@redhat.com>
1950 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1953 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
1955 * merge.c: Include libiberty.h.
1956 * elf-strtab.c: Include libiberty.h.
1958 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
1960 * peXXigen.c (pe_print_idata): Remove unused variable.
1962 2002-06-06 David Heine <dlheine@tensilica.com>
1964 * elf.c (assign_file_positions_for_segments): Remove unallocated
1965 sections from the section to segment mapping for PT_LOAD segments.
1966 Update comment about empty loadable segments.
1968 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
1970 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1971 is within the .stabstr section.
1973 2002-06-06 Alan Modra <amodra@bigpond.net.au>
1975 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1976 are "const PTR", not "const PTR *".
1977 (bfd_elf32_swap_symbol_in): Likewise.
1978 (bfd_elf64_swap_symbol_in): Likewise.
1979 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1980 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1981 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1982 (elf_link_add_object_symbols): Likewise.
1983 (elf_link_record_local_dynamic_symbol): Likewise.
1984 (elf_link_input_bfd): Likewise.
1985 (elf_gc_mark): Likewise.
1986 (elf_reloc_symbol_deleted_p): Likewise.
1987 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1988 (mn10200_elf_relax_delete_bytes): Likewise.
1989 (mn10200_elf_symbol_address_p): Likewise.
1990 (mn10200_elf_get_relocated_section_contents): Likewise.
1991 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1992 (mn10300_elf_relax_section): Likewise.
1993 (mn10300_elf_relax_delete_bytes): Likewise.
1994 (mn10300_elf_symbol_address_p): Likewise.
1995 (mn10300_elf_get_relocated_section_contents): Likewise.
1996 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1997 (elf32_h8_relax_delete_bytes): Likewise.
1998 (elf32_h8_symbol_address_p): Likewise.
1999 (elf32_h8_get_relocated_section_contents): Likewise.
2000 * elf32-hppa.c (get_local_syms): Likewise.
2001 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2002 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2003 * elf32-sh.c (sh_elf_relax_section): Likewise.
2004 (sh_elf_relax_delete_bytes): Likewise.
2005 (sh_elf_get_relocated_section_contents): Likewise.
2006 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2007 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2008 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2009 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2010 * elf64-ppc.c (get_local_syms): Likewise.
2011 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2012 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2014 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
2016 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
2018 2002-06-05 Alan Modra <amodra@bigpond.net.au>
2020 * elf.c (group_signature): Swap in the whole symbol, and handle
2021 extracting section symbol names.
2022 (setup_group): Add comment.
2023 (set_group_contents): When called from objcopy or ld, arrange for
2024 section contents to be written. Write group member output section
2025 indices to allow objcopy to reorganize sections.
2026 (_bfd_elf_copy_private_section_data): Copy group info.
2028 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
2029 (bfd_elf32_swap_symbol_in): Update prototype.
2030 (bfd_elf64_swap_symbol_in): Likewise.
2031 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
2032 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2033 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2034 (elf_link_add_object_symbols): Likewise.
2035 (elf_link_record_local_dynamic_symbol): Likewise.
2036 (elf_link_input_bfd): Likewise.
2037 (elf_gc_mark): Likewise.
2038 (elf_reloc_symbol_deleted_p): Likewise.
2039 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2040 (mn10200_elf_relax_delete_bytes): Likewise.
2041 (mn10200_elf_symbol_address_p): Likewise.
2042 (mn10200_elf_get_relocated_section_contents): Likewise.
2043 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2044 (mn10300_elf_relax_section): Likewise.
2045 (mn10300_elf_relax_delete_bytes): Likewise.
2046 (mn10300_elf_symbol_address_p): Likewise.
2047 (mn10300_elf_get_relocated_section_contents): Likewise.
2048 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2049 (elf32_h8_relax_delete_bytes): Likewise.
2050 (elf32_h8_symbol_address_p): Likewise.
2051 (elf32_h8_get_relocated_section_contents): Likewise.
2052 * elf32-hppa.c (get_local_syms): Likewise.
2053 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2054 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2055 * elf32-sh.c (sh_elf_relax_section): Likewise.
2056 (sh_elf_relax_delete_bytes): Likewise.
2057 (sh_elf_get_relocated_section_contents): Likewise.
2058 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2059 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2060 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2061 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2062 * elf64-ppc.c (get_local_syms): Likewise.
2063 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2064 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2065 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
2066 * elf64-alpha.c (alpha_elf_size_info): Likewise.
2067 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2068 * elf64-mips.c (mips_elf64_size_info): Likewise.
2069 * elf64-s390.c (s390_elf64_size_info): Likewise.
2070 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2072 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2074 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
2075 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
2076 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
2077 _bfd_mips_elf_ignore_discarded_relocs.
2078 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
2080 2002-06-05 H.J. Lu <hjl@gnu.org>
2082 * elfxx-mips.c (mips_elf_calculate_relocation): Call
2083 _bfd_elf_rel_local_sym for STT_SECTION relocations against
2084 the SEC_MERGE section.
2086 2002-06-05 Alan Modra <amodra@bigpond.net.au>
2088 * coff-alpha.c: Update copyright date.
2089 * coff-mips.c: Likewise.
2090 * xcoff-target.h: Likewise.
2092 * bfd-in.h: Remove "taken from the source" comment.
2093 * libbfd-in.h: Likewise.
2094 * libcoff-in.h: Likewise.
2095 * bfd-in2.h: Regenerate.
2096 * libbfd.h: Regenerate.
2097 * libcoff.h: Regenerate.
2099 * elf.c (bfd_elf_discard_group): Return true.
2100 * elf-bfd.h (bfd_elf_discard_group): Declare.
2101 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
2102 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
2103 * bfd.c (bfd_discard_group): Define.
2104 * targets.c (struct bfd_target): Add _bfd_discard_group.
2105 (BFD_JUMP_TABLE_LINK): Here too.
2106 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
2107 * aout-adobe.c (aout_32_bfd_discard_group): Define.
2108 * aout-target.h (MY_bfd_discard_group): Define.
2109 * aout-tic30.c (MY_bfd_discard_group): Define.
2110 * binary.c (binary_bfd_discard_group): Define.
2111 * bout.c (b_out_bfd_discard_group): Define.
2112 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
2113 * coffcode.h (coff_bfd_discard_group): Define.
2114 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
2115 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
2116 * i386msdos.c (msdos_bfd_discard_group): Define.
2117 * i386os9k.c (os9k_bfd_discard_group): Define.
2118 * ieee.c (ieee_bfd_discard_group): Define.
2119 * ihex.c (ihex_bfd_discard_group): Define.
2120 * mmo.c (mmo_bfd_discard_group): Define.
2121 * nlm-target.h (nlm_bfd_discard_group): Define.
2122 * oasys.c (oasys_bfd_discard_group): Define.
2123 * ppcboot.c (ppcboot_bfd_discard_group): Define.
2124 * som.c (som_bfd_discard_group): Define.
2125 * srec.c (srec_bfd_discard_group): Define.
2126 * tekhex.c (tekhex_bfd_discard_group): Define.
2127 * versados.c (versados_bfd_discard_group): Define.
2128 * vms.c (vms_bfd_discard_group): Define.
2129 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
2130 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
2131 (aix5coff64_vec): Likewise.
2132 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
2134 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2136 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
2137 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
2138 (elf32-sh64-com.lo): New dependency list.
2139 * Makefile.in: Regenerate.
2140 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
2141 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
2143 * configure: Regenerate.
2144 * elf32-sh64.c (sh64_address_in_cranges)
2145 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
2146 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
2147 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
2148 * elf32-sh64-com.c: ...here. New file.
2150 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2152 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
2153 ATTRIBUTE_UNUSED on used params.
2154 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
2155 before calling bfd_section_from_elf_index on local syms.
2156 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2158 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2160 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
2161 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
2162 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
2163 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
2164 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
2165 * Makefile.in: Regenerate.
2166 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2167 (sh64-*-netbsd*): New targets.
2168 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
2169 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
2170 * configure: Regenerate.
2171 * elf32-sh64-nbsd.c: New file.
2172 * elf64-sh64-nbsd.c: New file.
2173 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
2174 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
2175 bfd_elf64_sh64lnbsd_vec.
2177 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2179 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
2180 (bfd_section_from_shdr): Likewise. Set section name of group
2181 sections from signature.
2182 (group_signature): Split out from setup_group. Ensure symbol table
2184 (bfd_elf_discard_group): New function.
2185 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
2186 .gnu.linkonce* sections if they are members of a group.
2187 (set_group_contents): Set GRP_COMDAT flag.
2188 * section.c (bfd_discard_group): New function.
2189 * bfd-in.h (bfd_elf_discard_group): Declare.
2190 * bfd-in2.h: Regenerate.
2191 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
2192 (elf_linkonce_p): Define.
2194 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2196 * elf.c (bfd_section_from_shdr): Make "name" const.
2197 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
2198 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
2199 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2200 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2201 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2202 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2203 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2204 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
2205 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2206 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2207 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2209 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2211 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
2214 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
2216 * elf32-arc.c: Fix formatting.
2217 * elf32-arm.h: Likewise.
2218 * elf32-cris.c: Likewise.
2219 * elf32-dlx.c: Likewise.
2220 * elf32-hppa.c: Likewise.
2221 * elf32-i386.c: Likewise.
2222 * elf32-i386qnx.c: Likewise.
2223 * elf32-or32.c: Likewise.
2224 * elf32-s390.c: Likewise.
2225 * elf32-sh64.c: Likewise.
2226 * elf32-vax.c: Likewise.
2227 * elf32-xstormy16.c: Likewise.
2228 * elf64-alpha.c: Likewise.
2229 * elf64-mmix.c: Likewise.
2230 * elf64-ppc.c: Likewise.
2231 * elf64-s390.c: Likewise.
2232 * elf64-sh64.c: Likewise.
2233 * elf64-x86-64.c: Likewise.
2235 2002-06-02 Richard Henderson <rth@redhat.com>
2237 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
2238 null when there are no got entries for a symbol.
2239 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
2240 uninitialized variable warning.
2242 2002-06-01 Richard Henderson <rth@redhat.com>
2244 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
2245 undefined symbols here.
2246 (elf64_alpha_relax_section): Do it here. Also test for not
2247 defined in the current module.
2248 (elf64_alpha_relocate_section_r): Split out of ...
2249 (elf64_alpha_relocate_section): ... here. Don't dereference
2250 NULL when looking up local got entries.
2252 2002-06-01 Richard Henderson <rth@redhat.com>
2254 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
2255 symbols from JSR relaxation.
2256 (elf64_alpha_size_plt_section_1): New.
2257 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
2258 (elf64_alpha_size_rela_got_1): ... here.
2259 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
2260 (elf64_alpha_size_rela_got_section): ... here.
2261 (elf64_alpha_size_plt_section): New.
2262 (elf64_alpha_relax_section): Call them.
2263 (elf64_alpha_size_got_sections): Remove output_bfd arg.
2264 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
2266 2002-06-01 Richard Henderson <rth@redhat.com>
2268 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
2269 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
2270 in shared libraries. Fix DTPRELHI and TPRELHI value.
2271 (INSN_ADDQ, INSN_RDUNIQ): New.
2272 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
2273 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
2274 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
2275 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
2276 Handle GOTDTPREL and GOTTPREL relocations.
2277 (elf64_alpha_relax_gprelhilo): New.
2278 (elf64_alpha_relax_tls_get_addr): New.
2279 (elf64_alpha_relax_find_tls_segment): New.
2280 (elf64_alpha_relax_section): Handle TLS relocations.
2281 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
2282 (elf64_alpha_check_relocs): Set it.
2284 2002-06-01 Richard Henderson <rth@redhat.com>
2286 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
2288 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
2289 check; don't suppress dynamic relocs for non-allocated sections.
2291 * elf64-alpha.c: Remove dead code.
2293 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2295 * bfd-in2.h: Regenerate.
2296 * libbfd.h: Regenerate.
2297 * po/SRC-POTFILES.in: Regenerate.
2299 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
2302 2002-05-31 Graeme Peterson <gp@qnx.com>
2304 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
2305 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
2307 * Makefile.in: Regenerate.
2308 * config.bfd: Add i[3456]86-*-nto-qnx* support.
2309 * configure.in: Add bfd_elf32_i386qnx_vec support.
2310 * configure: Regenerate.
2311 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
2312 is_contained_by_filepos, and copy_private_bfd_data_p.
2313 * elf.c (assign_file_positions_for_segments): Call backend
2314 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
2315 (IS_CONTAINED_BY_FILEPOS): Define.
2316 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
2317 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
2318 Fix non-K&R call to _bfd_error_handler.
2319 (_bfd_elf_copy_private_section_data): Use backend
2320 copy_private_bfd_data_p.
2321 * elf32-i386.c: Don't include elfxx-target.h when
2322 ELF32_I386_C_INCLUDED is defined.
2323 * elf32-i386qnx.c: New QNX elf backend file.
2324 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
2325 elf_backend_is_contained_by_filepos, and
2326 elf_backend_do_copy_private_bfd_data.
2327 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
2329 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2331 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
2332 Move other similar defines to start of file.
2334 2002-05-30 Tom Rix <trix@redhat.com>
2336 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
2337 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
2339 2002-05-30 Richard Henderson <rth@redhat.com>
2341 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
2342 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
2343 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
2344 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
2345 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
2346 (struct alpha_elf_obj_tdata): Rename total_got_entries and
2347 n_local_got_entries to total_got_size and local_got_size.
2348 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
2349 (alpha_got_entry_size): New.
2350 (elf64_alpha_relax_with_lituse): Use it.
2351 (elf64_alpha_relax_without_lituse): Likewise.
2352 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
2353 (get_got_entry): New.
2354 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
2355 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
2356 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
2357 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
2358 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
2359 (elf64_alpha_calc_got_offsets): Likewise.
2360 (alpha_dynamic_entries_for_reloc): New.
2361 (elf64_alpha_calc_dynrel_sizes): Use it.
2362 (elf64_alpha_size_dynamic_sections): Likewise.
2363 (elf64_alpha_relocate_section): Handle TLS relocations.
2364 * reloc.c: Add Alpha TLS relocations.
2365 * bfd-in2.h, libbfd.h: Rebuild.
2367 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2369 * peXXigen.c (pe_print_idata): Remove double printed
2370 import table lines; add Bound-To comment.
2372 2002-05-29 Matt Thomas <matt@3am-software.com>
2374 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
2375 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
2376 (elf32-vax.lo): New rule.
2377 * Makefile.in: Regenerate.
2378 * configure.in (bfd_elf32_vax_vec)
2379 (vaxnetbsd_vec): New vectors.
2380 * configure: Regenerate.
2381 * config.bfd (vax-*-netbsdelf*)
2383 (vax-*-netbsd*): New targets.
2384 * elf32-vax.c: New file.
2385 * reloc.c: Add VAX relocations.
2386 * bfd-in2.h: Regenerate.
2387 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
2389 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
2391 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
2392 and bfd_elf32_bigarm_vec to targ_selvecs.
2394 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2396 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
2397 with auto-imported symbols.
2399 2002-05-29 Adam Nemet <anemet@lnxw.com>
2401 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
2402 sections only record bfd.
2403 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
2404 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
2405 * bfd-in2.h: Regenerate.
2407 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
2409 * syms.c (_bfd_stab_section_find_nearest_line): Move
2410 declaration and initialisation of saw_line and saw_func out of
2413 2002-05-29 Alan Modra <amodra@bigpond.net.au>
2415 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
2416 (bfd_elf64_get_symbol_info): Define.
2417 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
2419 2002-05-29 Andrey Volkov <avolkov@transas.com>
2421 * cpu-h8300.c: Make default h8300 machine first in machine list.
2423 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
2425 * config.bfd: Added DLX configuraton.
2426 * Makefile.am: Added DLX configuraton.
2427 * configure.in: Added DLX configuraton.
2428 * archures.c: Add DLX architecure.
2429 * reloc.c: Add DLX relocs.
2430 * targets.c: Added DLX target vector.
2431 * configure: Regenerate.
2432 * Makefile.in: Regenreate.
2433 * bfd-in2.h: Regenreate.
2434 * elf32-dlx.c: New file: Support DLX target.
2435 * cpu-dlx.c: New file: Support DLX target.
2437 2002-05-25 Alan Modra <amodra@bigpond.net.au>
2439 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2441 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2442 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2443 strings to point inside function code sym string.
2444 (func_desc_adjust): Likewise.
2445 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2447 2002-05-24 Michal Ludvig <mludvig@suse.cz>
2449 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2450 (elf64_x86_64_grok_psinfo): Added.
2452 2002-05-24 TAMURA Kent <kent@netbsd.org>
2454 * config.bfd: Add a target for i386-netbsdpe.
2456 2002-05-24 Alan Modra <amodra@bigpond.net.au>
2458 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2459 and is_func_descriptor.
2460 (func_desc_adjust): Hide function code sym in shared libs unless
2461 there is a matching exported function descriptor sym.
2463 2002-05-23 Jakub Jelinek <jakub@redhat.com>
2465 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2466 for symbols from SHF_TLS section.
2467 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2468 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2469 (map_sections_to_segments): Build PT_TLS segment if necessary.
2470 (assign_file_positions_for_segments): Likewise.
2471 (get_program_header_size): Account for PT_TLS segment.
2472 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2473 SEC_THREAD_LOCAL sections to STT_TLS.
2474 * reloc.c: Add 386 and IA-64 TLS relocs.
2475 * section.c (SEC_THREAD_LOCAL): Define.
2476 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2478 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2479 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2481 (struct elf_final_link_info): Add first_tls_sec.
2482 (elf_bfd_final_link): Set first_tls_sec.
2483 Compute elf_hash_table (info)->tls_segment.
2484 (elf_link_output_extsym): Handle STT_TLS symbols.
2485 (elf_link_input_bfd): Likewise.
2486 * syms.c (BSF_THREAD_LOCAL): Define.
2487 * bfd-in2.h: Rebuilt.
2488 * libbfd.h: Rebuilt.
2489 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2490 elf_i386_mkobject, elf_i386_object_p): New functions.
2491 (elf_howto_table): Add TLS relocs.
2492 (elf_i386_reloc_type_lookup): Support TLS relocs.
2493 (elf_i386_info_to_howto_rel): Likewise.
2494 (struct elf_i386_link_hash_entry): Add tls_type.
2495 (struct elf_i386_obj_tdata): New.
2496 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2498 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2499 (link_hash_newfunc): Clear tls_type.
2500 (elf_i386_check_relocs): Support TLS relocs.
2501 (elf_i386_gc_sweep_hook): Likewise.
2502 (allocate_dynrelocs): Likewise.
2503 (elf_i386_size_dynamic_sections): Likewise.
2504 (elf_i386_relocate_section): Likewise.
2505 (elf_i386_finish_dynamic_symbol): Likewise.
2506 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2507 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2508 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2509 want_tprel, want_dtpmod, want_dtprel.
2510 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2511 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2512 R_IA64_LTOFF_TPREL22.
2513 (elf_code_to_howto_index): Add TLS relocs.
2514 (elfNN_ia64_check_relocs): Support TLS relocs.
2515 (allocate_global_data_got): Account for TLS .got data.
2516 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2517 (elfNN_ia64_install_value): Supprt TLS relocs.
2518 (set_got_entry): Support TLS relocs.
2519 (elfNN_ia64_relocate_section): Likewise.
2521 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2523 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2524 BLX reloc round the relocation up rather than down.
2525 * coff-arm.c (coff_arm_relocate_section): Likewise.
2527 2002-05-21 H.J. Lu (hjl@gnu.org)
2529 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2532 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2534 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2535 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2537 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2539 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2541 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2543 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2545 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
2548 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2550 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2552 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2553 return with false on error.
2554 (elf_link_input_bfd): Check reloc_emitter return value.
2556 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2558 * config.bfd (armeb-*-netbsdelf*): New target.
2560 2002-05-20 Alan Modra <amodra@bigpond.net.au>
2562 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2563 at the plt call stub.
2565 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2567 * cpu-mips.c (mips_compatible): Don't try to check machine
2570 2002-05-18 Tom Rix <trix@redhat.com>
2572 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2574 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2576 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2577 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2578 we've already warned about an undefined symbol. Report more
2579 detail on reloc errors.
2581 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2583 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2584 * configure.in: Invoke AM_INSTALL_LIBBFD.
2585 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2586 (install_libbfd): .. New target.
2587 (uninstall_libbfd): Likewise.
2588 (install-bfdlibLTLIBRARIES): Likewise.
2589 (uninstall-bfdlibLTLIBRARIES): Likewise.
2591 (bfdincludedir): New.
2592 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2593 * aclocal.m4: Regenerate.
2594 * configure: Regenerate.
2595 * Makefile.in: Regenerate.
2597 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
2599 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2602 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2604 * config.bfd: Add targets for sh64-linux (little endian and
2607 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2609 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2610 is located in the same section as the import table. Instead
2611 check, and if necessary load the section containing the thunk.
2613 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2615 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
2617 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2620 2002-05-15 Alan Modra <amodra@bigpond.net.au>
2622 * aix5ppc-core.c: Warning fixes.
2623 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2624 * aout-target.h (MY_bfd_link_just_syms): Define.
2625 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2626 * bfd.c (bfd_link_just_syms): Define.
2627 * binary.c (binary_bfd_link_just_syms): Define.
2628 * bout.c (b_out_bfd_link_just_syms): Define.
2629 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2630 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2631 * coffcode.h (coff_bfd_link_just_syms): Define.
2632 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2633 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2634 (_bfd_elf_link_just_syms): Declare.
2635 * elf.c (_bfd_elf_link_just_syms): New function.
2636 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2637 sections haven't already been discarded by the linker.
2638 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2639 sections and SEC_MERGE sections.
2640 (elf_bfd_discard_info): Similarly here.
2641 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2642 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2643 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2644 * ieee.c (ieee_bfd_link_just_syms): Define.
2645 * ihex.c (ihex_bfd_link_just_syms): Define.
2646 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2647 (_bfd_generic_link_just_syms): Declare.
2648 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2649 * linker.c (_bfd_generic_link_just_syms): New function.
2650 * mmo.c (mmo_bfd_link_just_syms): Define.
2651 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2652 * oasys.c (oasys_bfd_link_just_syms): Define.
2653 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2654 * som.c (som_bfd_link_just_syms): Define.
2655 * srec.c (srec_bfd_link_just_syms): Define.
2656 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2657 (BFD_JUMP_TABLE_LINK): And here.
2658 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2659 * versados.c (versados_bfd_link_just_syms): Define.
2660 * vms.c (vms_bfd_link_just_syms): Define.
2661 * libbfd.h: Regenerate.
2662 * bfd-in2.h: Regenerate.
2664 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2666 * elf32-mips.c: Remove superfluous definitions copied from
2668 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2669 SGIish vectors to check the special case.
2670 (mips_elf_hi16_reloc): Fix comment.
2671 (mips_elf_got16_reloc): Likewise.
2672 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2673 (elf_reloc_map): Code cleanup.
2674 (mips_reloc_map): Add comment.
2675 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2676 (mips_elf32_rtype_to_howto): Likewise.
2677 (mips_elf32_discard_info): Likewise.
2678 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2679 lead to IRIX compatibility now.
2681 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2683 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2685 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2687 * config.bfd (shle-*-netbsdelf*): Add target which includes
2690 2002-05-13 David Edelsohn <edelsohn@gnu.org>
2692 * configure.in: Revert 2002-04-07. Instead, auto-configure
2694 * configure: Regenerate.
2695 * config.in: Regenerate.
2696 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2699 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2701 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2703 * configure: Regenerate.
2705 2002-05-13 Alan Modra <amodra@bigpond.net.au>
2707 * Makefile.am (install-data-local): Install headers to
2708 $(exec_prefix)/include.
2709 * Makefile.in: Regenerate.
2711 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2712 Daniel Jacobowitz <drow@mvista.com>
2714 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2717 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2719 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2720 hppa*-*-openbsd*): New targets.
2721 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2722 * configure: Regenerate.
2724 2002-05-10 Tom Rix <trix@redhat.com>
2726 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
2727 xcoff64_ppc_relocate_section.
2728 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2729 * libxcoff.h: Common xcoff_reloc_type function declaration.
2731 2002-05-10 Alan Modra <amodra@bigpond.net.au>
2733 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
2734 added in 2002-05-09 commit.
2736 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2737 don't look for stubs on all undefined syms.
2739 2002-05-09 Alan Modra <amodra@bigpond.net.au>
2741 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2742 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2745 * elf32-i386.c (elf_howto_table): Comments.
2746 (elf_i386_relocate_section): Handle more relocs for relocatable
2747 linking and against SEC_MERGE sections.
2749 2002-05-08 Alan Modra <amodra@bigpond.net.au>
2751 * elf32-ppc.c (ppc_elf_create_got): New function.
2752 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2753 _bfd_elf_create_dynamic_sections. Correct .plt flags.
2754 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2755 _bfd_elf_create_got_section.
2757 2002-05-07 Alan Modra <amodra@bigpond.net.au>
2759 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2760 * elfxx-target.h (elf_backend_rela_normal): Define.
2761 (elfNN_bed): Init rela_normal.
2762 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2763 for section symbols here if rela_normal. Simplify abs section test.
2764 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2765 return immediately. Remove code handling relocatable linking.
2766 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2767 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2768 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2769 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2770 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2771 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2772 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2773 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2774 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2775 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2776 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2777 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2778 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2779 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2780 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2781 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2782 * elf-m10200.c (elf_backend_rela_normal): Define.
2783 * elf-m10300.c (elf_backend_rela_normal): Define.
2784 * elf32-fr30.c (elf_backend_rela_normal): Define.
2785 * elf32-i370.c (elf_backend_rela_normal): Define.
2786 * elf32-i860.c (elf_backend_rela_normal): Define.
2787 * elf32-m68k.c (elf_backend_rela_normal): Define.
2788 * elf32-mcore.c (elf_backend_rela_normal): Define.
2789 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2790 * elf32-ppc.c (elf_backend_rela_normal): Define.
2791 * elf32-s390.c (elf_backend_rela_normal): Define.
2792 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2793 * elf64-ppc.c (elf_backend_rela_normal): Define.
2794 * elf64-s390.c (elf_backend_rela_normal): Define.
2795 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2796 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2797 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2798 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2800 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2802 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2803 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2805 2002-05-06 Alan Modra <amodra@bigpond.net.au>
2807 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2808 when not relocatable. Fix reloc_emitter call for K&R.
2810 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2812 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2813 reloading local sym addend mistakenly removed in 2002-05-01 change.
2815 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2816 (read_abbrevs): Change "offset" param to bfd_vma.
2817 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2818 Change "abbrev_offset" to bfd_vma.
2819 (read_indirect_string): Use correct conversion chars in error
2820 message format string, cast bfd_vma's to unsigned long.
2821 (read_abbrevs): Likewise.
2822 (read_attribute_value): Likewise.
2823 (decode_line_info): Likewise.
2824 (scan_unit_for_functions): Likewise.
2825 (parse_comp_unit): Likewise.
2827 2002-05-04 Tom Rix <trix@redhat.com>
2829 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2830 (coff_swap_reloc_out): Same.
2831 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2832 (xcoff_swap_reloc_out): Same.
2833 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2834 case some 16 bit relocs. Add reloc value to output.
2835 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2836 R_RBR. Improve names.
2837 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2838 (bfd_xcoff_backend_data): Update with new reloc swap names.
2839 (bfd_pmac_xcoff_backend_data) : Same.
2840 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2841 (xcoff64_swap_reloc_out): Same.
2842 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2843 R_POS. Add reloc value to output.
2844 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2845 bit R_RBR. Improve names, masks.
2846 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2847 (bfd_xcoff_backend_data): Update with new reloc swap names.
2848 (bfd_xcoff_aix5_backend_data) : Same.
2850 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2852 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2853 bfd_count top_index, input_list, all_local_syms.
2854 (elf32_hppa_setup_section_lists): New function, split from
2855 elf32_hppa_size_stubs.
2856 (elf32_hppa_next_input_section): Likewise.
2857 (group_sections): Likewise.
2858 (get_local_syms): Likewise.
2859 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2860 stubs on undefined syms too.
2861 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2862 Only access htab elf fields when we have an elf hash table.
2863 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2864 (elf32_hppa_next_input_section): Declare.
2866 2002-05-04 Bob Byrnes <byrnes@curl.com>
2868 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2871 2002-05-03 H.J. Lu (hjl@gnu.org)
2873 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2874 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2875 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2876 to hide a global symbol.
2877 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2878 forced_local to true.
2880 2002-05-02 Richard Henderson <rth@redhat.com>
2882 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2883 vs SHN_UNDEF to zero.
2885 2002-05-02 Alan Modra <amodra@bigpond.net.au>
2887 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2889 <R_PPC64_SECTOFF_DS>: Likewise.
2890 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2892 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2893 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2896 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2897 (ppc64_elf_ha_reloc): New function.
2898 (ppc64_elf_brtaken_reloc): New function.
2899 (ppc64_elf_sectoff_reloc): New function.
2900 (ppc64_elf_sectoff_ha_reloc): New function.
2901 (ppc64_elf_toc_reloc): New function.
2902 (ppc64_elf_toc_ha_reloc): New function.
2903 (ppc64_elf_toc64_reloc): New function.
2904 (ppc64_elf_unhandled_reloc): New function.
2905 (ppc64_elf_howto_raw): Use the above.
2906 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2907 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
2908 <R_PPC64_SECTOFF_DS>: Likewise.
2909 (IS_ABSOLUTE_RELOC): Update.
2910 (struct ppc_link_hash_table): Add have_undefweak.
2911 (ppc64_elf_link_hash_table_create): Init.
2912 (func_desc_adjust): Set have_undefweak.
2913 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
2914 add the .sfpr blr when have_undefweak.
2915 (ppc64_elf_setup_section_lists): Check hash table flavour.
2916 (ppc64_elf_next_input_section): Move output_section->owner test to
2918 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2919 and relocatable test. Return TOCstart and don't set elf_gp.
2920 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2921 offset calculation. Add assert on weak sym branch tweaks.
2922 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2923 (ppc64_elf_toc): Declare.
2924 (ppc64_elf_next_input_section): Update.
2926 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2928 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2931 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2933 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2934 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
2935 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
2936 call branches. Correct undefined weak destination.
2937 (ppc64_elf_func_desc_adjust): Always create at least one blr in
2938 .sfpr, and correct case where either only savef* or restf* is
2941 Long branch stubs, multiple stub sections.
2942 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2943 (ppc64_elf_next_input_section): Declare.
2944 * elf64-ppc.c: Move linker-only prototypes.
2945 (STUB_SUFFIX): Define.
2946 (enum ppc_stub_type): New.
2947 (struct ppc_stub_hash_entry): New.
2948 (struct ppc_branch_hash_entry): New.
2949 (struct ppc_link_hash_entry): Add stub_cache, oh.
2950 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
2951 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2952 Rename plt_overflow to stub_error.
2953 (ppc_stub_hash_lookup): Define.
2954 (ppc_branch_hash_lookup): Define.
2955 (stub_hash_newfunc): New function.
2956 (branch_hash_newfunc): New function.
2957 (link_hash_newfunc): Init new fields.
2958 (ppc64_elf_link_hash_table_create): Likewise.
2959 (ppc64_elf_link_hash_table_free): New function.
2960 (ppc_stub_name): New function.
2961 (ppc_get_stub_entry): New function.
2962 (ppc_add_stub): New function.
2963 (create_linkage_sections): Use bfd_make_section_anyway. Create
2964 .branch_lt and .rela.branch_lt sections. Don't create .stub.
2965 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2966 and set up for plt call stubs. Link func and func desc syms.
2967 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2968 (func_desc_adjust): Avoid hash lookup when func desc sym available
2969 via shortcut, and set links when processing.
2970 (ppc64_elf_hide_symbol): Likewise.
2971 (allocate_dynrelocs): Don't allocate stub section here.
2972 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2974 (ppc_type_of_stub): New function.
2975 (build_one_stub): Delete.
2976 (ppc_build_one_stub): New function.
2977 (ppc_size_one_stub): New function.
2978 (ppc64_elf_setup_section_lists): New function.
2979 (ppc64_elf_next_input_section): New function.
2980 (group_sections): New function.
2981 (get_local_syms): New function.
2982 (ppc64_elf_size_stubs): Rewrite.
2983 (ppc64_elf_build_stubs): Rewrite.
2984 (ppc64_elf_relocate_section): Look up stub entry for REL24
2985 relocs. Don't propagate REL14* to dynamic objects. Look for long
2986 branch stubs if REL14* or REL24 relocs won't reach.
2987 (bfd_elf64_bfd_link_hash_table_free): Define.
2989 2002-04-30 Mark Mitchell <mark@codesourcery.com>
2991 * config.bfd: Add support for powerpc-*-windiss.
2993 2002-04-30 Tom Rix <trix@redhat.com>
2995 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2996 symbol names into the hash table.
2998 2002-04-28 Tom Rix <trix@redhat.com>
3000 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
3001 calulating relocations.
3002 (xcoff_complain_overflow) : Function table for relocation errors.
3003 (xcoff_ppc_relocate_section): Use relocation and complain function
3005 (xcoff_complain_overflow_unsigned_func): New complain function.
3006 (xcoff_complain_overflow_signed_func): Same.
3007 (xcoff_complain_overflow_bitfield_func): Same.
3008 (xcoff_complain_overflow_dont_func): Same.
3009 (xcoff_reloc_type_crel): New recot function.
3010 (xcoff_reloc_type_br): Same.
3011 (xcoff_reloc_type_ba): Same.
3012 (xcoff_reloc_type_toc): Same.
3013 (xcoff_reloc_type_rel): Same.
3014 (xcoff_reloc_type_neg): Same.
3015 (xcoff_reloc_type_pos): Same.
3016 (xcoff_reloc_type_fail): Same.
3017 (xcoff_reloc_type_noop): Same.
3018 * libxcoff.h : Declare common parts for xcoff64.
3019 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
3020 and complain function tables.
3022 2002-04-28 Alan Modra <amodra@bigpond.net.au>
3024 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
3025 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
3027 2002-04-26 Alan Modra <amodra@bigpond.net.au>
3029 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
3030 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
3032 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
3033 same as the output before calling elf_link_input_bfd.
3035 * coffcode.h (coff_compute_section_file_positions): Set
3036 section_tail after shuffling section list.
3038 2002-04-24 Christian Groessler <chris@groessler.org>
3040 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
3041 addresses are 23bit with a special layout, not plain 32bit
3042 values. Prevent relocation of immediate values.
3044 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
3046 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
3047 MIPS-16 ASE flags are set, print something to indicate that.
3049 2002-04-23 Alan Modra <amodra@bigpond.net.au>
3051 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
3052 under which a plt call stub is used.
3053 (final_link_relocate): Similarly.
3054 (allocate_plt_static): Clear h-plabel except when plt entry is
3055 exclusively used for a plabel.
3056 (allocate_dynrelocs): Use the above to simplify plt sizing.
3057 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
3058 (elf32_hppa_link_hash_table_create): Init.
3060 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
3061 (elf32_hppa_check_relocs): Set has_22bit_branch.
3063 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
3064 (final_link_relocate): Likewise.
3066 2002-04-22 Jakub Jelinek <jakub@redhat.com>
3068 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
3069 search table if some FDE is DW_EH_PE_aligned encoded either.
3070 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
3072 2002-04-22 Richard Smith <richard@ex-parrot.com>
3073 Jakub Jelinek <jakub@redhat.com>
3075 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
3076 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
3077 encoded personality.
3078 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
3079 for CIE/FDE removal.
3081 2002-04-20 Tom Rix <trix@redhat.com>
3083 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
3085 2002-04-20 Alan Modra <amodra@bigpond.net.au>
3087 * archures.c (bfd_lookup_arch): Move the list order comment..
3088 (struct bfd_arch_info): ..to where it belongs.
3089 * bfd-in2.h: Regenerate.
3091 * archures.c (bfd_lookup_arch): Add comment on list order.
3092 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
3093 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
3094 is always at head of list.
3096 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3098 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
3099 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
3100 definition of these functions for ARM_WINCE builds as they are
3102 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
3103 for ARM_WINCE builds.
3105 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3107 * coff-arm.c (bfd_arm_process_before_allocation):
3109 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
3111 * cpu-sh.c (scan_mach): Delete.
3112 (arch_info_struct): Replace scan_mach with bfd_default_scan.
3113 (bfd_sh_arch): Likewise.
3115 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
3117 * ihex.c (ihex_write_object_contents): Fix check for records
3118 crossing 64K boundaries.
3120 2002-04-16 Alan Modra <amodra@bigpond.net.au>
3122 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
3123 type rather than just assuming entries are ELF.
3124 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3125 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3126 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
3127 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
3128 rather than elf_link_hash_entry.
3130 2002-04-15 Richard Henderson <rth@redhat.com>
3132 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
3135 2002-04-15 Michael Snyder <msnyder@redhat.com>
3137 * opncls.c (bfd_close): Write contents if writeable.
3138 Minor formatting tidy-ups.
3140 2002-04-15 Alan Modra <amodra@bigpond.net.au>
3142 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
3144 2002-04-12 Michael Snyder <msnyder@redhat.com>
3146 * bfd-in.h (bfd_get_section_lma): New access macro.
3147 Minor white-space fix-up.
3149 2002-04-12 Alan Modra <amodra@bigpond.net.au>
3151 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
3154 2002-04-09 DJ Delorie <dj@redhat.com>
3156 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
3158 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
3160 * coffcode.h (coff_read_word): New.
3161 (coff_compute_checksum): New.
3162 (coff_apply_checksum): New.
3163 (coff_write_object_contents): Call coff_apply_checksum () to
3164 apply checksum to PE image.
3166 2002-04-08 Randolph Chung <tausq@debian.org>
3168 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
3169 (elf32_hppa_final_link): Split out sorting logic to..
3170 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
3171 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
3173 2002-04-07 Andrew Cagney <ac131313@redhat.com>
3175 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
3177 * configure: Re-generate.
3179 2002-04-07 Andrew Cagney <ac131313@redhat.com>
3181 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
3182 is greater or equal to 4.3.3.
3183 * configure: Regenerate.
3186 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
3188 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
3189 R_CRIS_32_PCREL>: Fix typo in name.
3190 (cris_elf_check_relocs): Always create .rela.got here when
3191 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
3192 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
3193 assume it's created.
3195 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
3197 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
3198 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
3200 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
3201 * bfd.c (bfd_link_hash_table_free): Define.
3202 * binary.c (binary_bfd_link_hash_table_free): Define.
3203 * bout.c (b_out_bfd_link_hash_table_free): Define.
3204 * coff-rs6000.c (rs6000coff_vec): Include
3205 _bfd_generic_link_hash_table_free.
3206 (pmac_xcoff_vec): Likewise.
3207 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3208 (aix5coff64_vec): Likewise.
3209 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
3210 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
3211 (bfd_elf32_bfd_link_hash_table_free): Define.
3212 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
3213 (bfd_elf32_bfd_link_hash_table_free): Define.
3214 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
3216 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
3217 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
3218 * ieee.c (ieee_bfd_link_hash_table_free): Define.
3219 * ihex.c (ihex_bfd_link_hash_table_free): Define.
3220 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
3221 (_bfd_generic_link_hash_table_free): Add prototype.
3222 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
3223 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
3224 * linker.c (_bfd_generic_link_hash_table_free): New function.
3225 * mmo.c (mmo_bfd_link_hash_table_free): Define.
3226 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
3227 * oasys.c (oasys_bfd_link_hash_table_free): Define.
3228 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
3229 * som.c (som_bfd_link_hash_table_free): Define.
3230 * srec.c (srec_bfd_link_hash_table_free): Define.
3231 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
3232 * versados.c (versados_bfd_link_hash_table_free): Define.
3233 * vms.c (vms_bfd_link_hash_table_free): New function.
3234 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
3236 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
3237 instead of bfd_alloc.
3238 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
3239 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
3240 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
3241 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
3242 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3243 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
3244 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
3245 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
3246 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3247 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
3248 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
3249 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3250 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
3251 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
3252 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
3253 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
3254 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
3255 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
3256 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
3257 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
3258 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3259 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
3260 * m68klinux.c (linux_link_hash_table_create): Likewise.
3261 * sparclinux.c (linux_link_hash_table_create): Likewise.
3262 * sunos.c (sunos_link_hash_table_create): Likewise.
3263 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
3265 * targets.c: Add _bfd_link_hash_table_free to xvec.
3267 * bfd-in2.h: Regenerate.
3268 * libbfd.h: Regenerate.
3269 * libcoff.h: Regenerate.
3271 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3273 * dep-in.sed: Cope with absolute paths.
3274 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
3276 * Makefile.in: Regenerate.
3277 * coff-arm.c: Fix copyright date.
3278 * cpu-h8300.c: Likewise.
3279 * cpu-i370.c: Likewise.
3280 * cpu-s390.c: Likewise.
3281 * cpu-mips.c: Likewise.
3282 * po/SRC-POTFILES.in: Regenerate.
3284 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3286 * Makefile.am: Add elfxx-mips.c to the known backends.
3287 (elf32-mips.lo): remove dependency to coff/external.h.
3288 * Makefile.in: Regenerate.
3289 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
3290 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
3292 * configure: Regenerate.
3293 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
3294 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
3295 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
3296 MIPS specific backend functions.
3297 * elf32-mips.c: Moved most code to elfxx-mips.c.
3298 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
3300 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
3301 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
3302 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
3303 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
3304 interface to allow selection of the right REL or RELA howto table.
3305 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
3306 static. Let it refuse n32 objects.
3307 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
3308 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
3309 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
3310 (elf32_mips_ignore_discarded_relocs): Rename from
3311 _bfd_elf32_mips_ignore_discarded_relocs.
3312 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
3313 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
3314 (elf_mips_howto_table_rela): Remove.
3315 * elf64-mips.c: Moved most code to elfxx-mips.c.
3316 (bfd_elf64_bfd_reloc_type_lookup): Make static.
3317 (mips_elf64_rtype_to_howto): New function.
3318 (mips_elf64_object_p): Likewise.
3319 (elf64_mips_irix_compat): Likewise.
3320 * elfxx-mips.c: New file containing common code merged together from
3321 elf32-mips.c and elf64-mips.c.
3322 * elfxx-mips.h: New file containing MIPS specific prototypes from
3324 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
3325 elf_backend_mips_rtype_to_howto.
3327 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3329 * srec.c (MAXCHUNK, Chunk): Revise comments.
3330 (srec_write_record): Correct buffer size.
3331 (srec_write_header): Do without intermediate buffer.
3332 (srec_write_section): Validate Chunk.
3333 (srec_write_terminator): Pass NULL instead of dummy buffer.
3334 (srec_write_symbols): Pass file and symbol names directly to
3335 bfd_bwrite so sprintf won't overflow buffer.
3337 2002-04-03 Jakub Jelinek <jakub@redhat.com>
3339 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
3340 PC relative relocs against hidden symbols.
3341 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3343 2002-04-03 Alan Modra <amodra@bigpond.net.au>
3345 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
3346 LMAs, loop over segments until p_vaddr and p_memsz specify an
3347 extent enclosing the section.
3349 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
3351 * ihex.c (ihex_write_object_contents): Do not allow records to
3352 cross a 64K boundary - wrap if necessary.
3354 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
3356 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
3357 which caused the returned LWP ID to always be 0.
3359 2002-04-01 Richard Henderson <rth@redhat.com>
3361 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3362 (elf32_sparc_relocate_section): Use it to figure out when to
3363 initialize .got entries.
3364 * elf64-sparc.c: Similarly.
3366 2002-03-28 Alan Modra <amodra@bigpond.net.au>
3368 * linker.c (link_action): Ignore duplicate warning syms.
3369 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
3370 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
3371 (elf_adjust_dynamic_symbol): Likewise.
3372 (elf_export_symbol): Likewise.
3373 (elf_link_find_version_dependencies): Likewise.
3374 (elf_link_assign_sym_version): Likewise.
3375 (elf_link_sec_merge_syms): Likewise.
3376 (elf_link_output_extsym): Likewise.
3377 (elf_gc_sweep_symbol): Likewise.
3378 (elf_gc_propagate_vtable_entries_used): Likewise.
3379 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3380 (elf_gc_allocate_got_offsets): Likewise.
3381 (elf_collect_hash_codes): Likewise.
3382 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
3383 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3384 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3385 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
3386 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
3387 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
3388 (elf_cris_discard_excess_dso_dynamics): Likewise.
3389 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
3390 (mark_PIC_calls): Likewise.
3391 (allocate_plt_static): Likewise.
3392 (allocate_dynrelocs): Likewise.
3393 (readonly_dynrelocs): Likewise.
3394 * elf32-i386.c (allocate_dynrelocs): Likewise.
3395 (readonly_dynrelocs): Likewise.
3396 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
3397 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
3398 * elf32-mips.c (mips_elf_output_extsym): Likewise.
3399 (mips_elf_sort_hash_table_f): Likewise.
3400 (mips_elf_check_mips16_stubs): Likewise.
3401 * elf32-s390.c (allocate_dynrelocs): Likewise.
3402 (readonly_dynrelocs): Likewise.
3403 * elf32-sh.c (sh_elf_discard_copies): Likewise.
3404 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
3405 (xstormy16_relax_plt_realloc): Likewise.
3406 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
3407 (elf64_alpha_output_extsym): Likewise.
3408 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
3409 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
3410 (mips_elf64_check_mips16_stubs): Likewise.
3411 (mips_elf64_output_extsym): Likewise.
3412 * elf64-ppc.c (func_desc_adjust): Likewise.
3413 (allocate_dynrelocs): Likewise.
3414 (readonly_dynrelocs): Likewise.
3415 * elf64-s390.c (allocate_dynrelocs): Likewise.
3416 (readonly_dynrelocs): Likewise.
3417 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
3418 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3419 (readonly_dynrelocs): Likewise.
3420 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
3421 * aoutx.h (aout_link_write_other_symbol): Likewise.
3422 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
3423 (_bfd_coff_write_global_sym): Likewise.
3424 * i386linux.c (linux_tally_symbols): Likewise.
3425 * m68klinux.c (linux_tally_symbols): Likewise.
3426 * sparclinux.c (linux_tally_symbols): Likewise.
3427 * pdp11.c (aout_link_write_other_symbol): Likewise.
3428 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3429 * xcofflink.c (xcoff_build_ldsyms): Likewise.
3430 (xcoff_write_global_symbol): Likewise.
3432 * cofflink.c (_bfd_coff_final_link): Formatting.
3433 * cpu-mips.c (mips_compatible): Make static, prototype.
3434 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3435 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3436 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3437 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3438 (mips_elf64_final_link): Likewise.
3439 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3442 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3444 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3445 (SWAP_OUT_RELOC_OFFSET): Define.
3447 2002-03-27 Gregory Steuck <greg@nest.cx>
3449 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3450 terminating NULL if empty symbol table.
3451 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3453 2002-03-26 H.J. Lu (hjl@gnu.org)
3455 * elflink.h (elf_link_input_bfd): Revert the last change since
3456 the gcc exception handling isn't fixed yet.
3458 2002-03-26 H.J. Lu (hjl@gnu.org)
3460 * elflink.h (elf_link_input_bfd): Complain about relocations
3461 against local symbols in discarded sections.
3463 2002-03-26 Alan Modra <amodra@bigpond.net.au>
3465 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3467 2002-03-23 Alan Modra <amodra@bigpond.net.au>
3469 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3470 section file offset for !SEC_LOAD sections.
3472 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
3474 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3475 <case R_ARM_GOT>): Handle relocations to Thumb functions.
3477 2002-03-21 Alan Modra <amodra@bigpond.net.au>
3479 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3481 * archive.c: Update copyright date.
3482 * bfd-in2.h: Regenerate.
3483 * libbfd.h: Regenerate.
3484 * Makefile.am: Run "make dep-am"
3485 * Makefile.in: Regenerate.
3486 * po/SRC-POTFILES.in: Regenerate.
3488 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
3490 * dwarf2.c (struct funcinfo): Move up.
3491 (lookup_address_in_function_table): New argument function_ptr.
3493 (lookup_address_in_line_table): New argument function. If function
3494 is non-NULL, use it to handle ``addr'' before the first line note of
3496 (comp_unit_find_nearest_line): Update and swap calls to
3497 lookup_address_in_function_table and lookup_address_in_line_table.
3498 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3499 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3501 2002-03-20 Tom Rix <trix@redhat.com>
3503 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
3504 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
3505 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
3507 2002-03-19 Tom Rix <trix@redhat.com>
3509 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
3510 dynamic objects in archives.
3512 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3514 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3515 STT_NOTYPE symbols to STT_OBJECT.
3517 2002-03-18 Jan Hubicka <jh@suse.cz>
3519 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3521 2002-03-18 Tom Rix <trix@redhat.com>
3523 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3524 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3525 * coff-rs6000 (do_pad) : New function for archive padding.
3526 (do_copy) : New function for object file copying in archives.
3527 (do_shared_object_padding) : New function for padding shared
3528 objects to their text section alignment in archives.
3529 (bfd_xcoff_ar_achive_set_magic) : Stub.
3530 (xcoff_write_armap_big) : Use do_copy and do_pad.
3531 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3533 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
3534 bfd_xcoff_magic_number.
3535 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3537 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3538 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3539 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3540 * rs6000-core.c : Update copyright date.
3541 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
3543 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3544 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3545 (coff_set_flags) : Use bfd_xcoff_magic_number.
3546 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3547 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3548 * Makefile.am : Same.
3549 * config.bfd : Same.
3551 * configure : Regnerate.
3552 * Makefile.in : Same.
3555 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3557 * po/fr.po: Updated version.
3559 2002-03-18 Alan Modra <amodra@bigpond.net.au>
3561 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3562 * libbfd.h: Regenerate.
3563 * archive.c (coff_write_armap): Pass on failures from
3564 bfd_write_bigendian_4byte_int.
3566 2002-03-14 H.J. Lu <hjl@gnu.org>
3568 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3569 error to bfd_error_nonrepresentable_section for reinit_array
3572 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3574 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3575 OR it in rather than replacing previously selected flags.
3577 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3578 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3580 2002-03-14 Alan Modra <amodra@bigpond.net.au>
3582 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3584 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3585 ensure reloc size matches before calling elf_link_input_bfd.
3586 Add an assert to check reloc size when counting output relocs.
3588 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3590 * mmo.c (mmo_get_loc): Return NULL rather than false.
3592 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3594 * po/fr.po: Updated version.
3596 2002-03-13 Alan Modra <amodra@bigpond.net.au>
3598 * archures.c (bfd_default_compatible): Test bits_per_word.
3599 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3600 bfd_default_compatible.
3601 * cpu-i370.c (i370_compatible): Likewise.
3602 * cpu-sparc.c (sparc_compatible): Likewise.
3603 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3605 * elflink.h: Formatting fixes.
3606 (elf_link_output_extsym): Merge undefined and undef weak cases.
3608 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3609 when word size of input matches output word size.
3611 2002-03-12 Andreas Jaeger <aj@suse.de>
3613 * cpu-i386.c (i386_compatible): New. Use it instead of
3614 bfd_default_compatible.
3616 2002-03-07 H.J. Lu (hjl@gnu.org)
3618 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3619 as the type for bfd_reloc_val.
3621 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3623 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3624 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3625 (elf_hppa_final_link_relocate): Correct relocations for indirect
3626 references to local data through the DLT. Fix .opd creation for
3627 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3628 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3629 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3630 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3631 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3632 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3633 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3635 2002-03-05 Jakub Jelinek <jakub@redhat.com>
3637 * merge.c (_bfd_merge_sections): Don't segfault if there
3638 is nothing to merge due to GC.
3640 2002-03-05 Alan Modra <amodra@bigpond.net.au>
3642 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3643 symbols that have been forced local.
3645 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3646 to output forced local syms for non-shared link.
3647 (elf_link_output_extsym): Tweak condition for calling backend
3648 adjust_dynamic_symbol so that previous behaviour is kept.
3649 Whitespace changes throughout file.
3651 2002-03-04 H.J. Lu <hjl@gnu.org>
3653 * elf.c (bfd_section_from_shdr): Handle special sections,
3654 .init_array, .fini_array and .preinit_array.
3655 (elf_fake_sections): Likewise.
3657 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3658 DT entry only if the section is in output for .init_array,
3659 .fini_array and .preinit_array. Complain about .preinit_array
3661 (elf_bfd_final_link): Warn zero size for .init_array,
3662 .fini_array and .preinit_array sections.
3664 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3665 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3666 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3669 2002-03-04 Alan Modra <amodra@bigpond.net.au>
3671 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3672 * configure: Regenerate.
3674 2002-03-02 Tom Rix <trix@redhat.com>
3676 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3678 * coff-rs6000.c (xcoff_howto_table): Same.
3680 2002-03-01 David Mosberger <davidm@hpl.hp.com>
3682 * elflink.h (size_dynamic_sections): If section named
3683 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3684 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3685 ".init_array" and ".fini_array".
3686 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3687 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3690 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
3692 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3695 2002-02-25 Alan Modra <amodra@bigpond.net.au>
3697 * elf64-hppa.h: Update copyright date.
3699 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3700 (ppc64_elf_relocate_section): Don't generate power4 style branch
3701 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3703 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3705 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3707 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3709 2002-02-21 Andreas Jaeger <aj@suse.de>
3711 * elf64-x86-64.c: Major rework that introduces all recent changes
3712 to the x86-64 backend. Get a closer match to elf32-i386.
3713 (struct elf64_x86_64_dyn_relocs): Rename from
3714 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3716 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3718 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3719 remove casts, initialize new hash members.
3720 (create_got_section): New.
3721 (elf64_x86_64_create_dynamic_sections): New.
3722 (elf64_x86_64_copy_indirect_symbol): New.
3723 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3724 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3725 Reference count possible .plt and .got entries. Don't test input
3726 section SEC_READONLY here to try to avoid copy relocs, and keep
3727 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3728 DF_TEXTREL here. Delay setting of variables until needed. Cache
3729 pointer to "sreloc" section in elf_section_data. Tweak condition
3730 under which .got created. Report files with bad relocation
3732 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3733 Reference count possible .plt entries. Don't deallocate .got and
3735 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3736 do copy reloc processing for weakdefs. Remove redundant casts and
3737 aborts. Delay setting of vars until needed. Move creation of
3738 dynamic symbols and allocation of .plt and .rela.plt to
3739 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3740 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3741 (allocate_dynrelocs): New.
3742 (readonly_dynrelocs): New.
3743 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3744 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3745 Zero out the dynamic allocated content space.
3746 (elf64_x86_64_discard_copies): Removed.
3747 (elf64_x86_64_relocate_section): Make use of dynamic section
3748 short-cuts. Localise vars, and delay setting. Better error
3749 reporting, replace BFD_ASSERT with abort. Check
3750 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3751 regular object file and tread the weak definition as the normal
3752 one. Don't discard relocs for undefweak or undefined symbols and
3753 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3755 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3756 symbols that have been forced local. Use same test to decide if
3757 we can use a relative reloc for got as relocate_section. Expand
3758 SHN_UNDEF comment. Move expressions out of function calls.
3759 Replace BFD_ASSERT with abort.
3760 (bfd_elf64_bfd_final_link): Removed.
3761 (elf_backend_copy_indirect_symbol): Define.
3763 2002-02-20 Tom Rix <trix@redhat.com>
3765 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3766 (_bfd_xcoff_reloc_type_lookup): Use it.
3767 * coff64-rs6000.c (xcoff64_howto_table): Same.
3768 (xcoff64_reloc_type_lookup): Same.
3770 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3772 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3775 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3777 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3778 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3779 * bfd-in2.h: Regenerate.
3780 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3781 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3783 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3784 (elf_s390_reloc_type_lookup): Likewise.
3785 (elf_s390_check_relocs): Likewise.
3786 (elf_s390_gc_sweep_hook): Likewise.
3787 (elf_s390_relocate_section): Likewise.
3788 (elf_s390_object_p): Use renamed architecture define.
3789 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3791 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
3793 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3795 2002-02-19 Jakub Jelinek <jakub@redhat.com>
3797 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3798 absptr -> pcrel optimization for shared libs.
3799 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3800 library cannot be converted to pcrel.
3801 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3803 * elf32-i386.c (elf_i386_relocate_section): If
3804 _bfd_elf_section_offset returned -2, skip, but make sure the
3805 relocation is installed.
3806 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3807 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3808 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3809 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3810 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3811 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3812 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3813 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3814 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3815 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3816 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3817 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3818 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3819 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3820 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3821 _bfd_elf_section_offset returning -2 the same way as -1.
3822 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3823 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3825 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3827 2002-02-18 Tom Rix <trix@redhat.com>
3829 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3830 (bfd_xcoff_size_dynamic_sections): Same.
3831 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3832 (bfd_xcoff_size_dynamic_sections): Same.
3833 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3834 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3835 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3836 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3837 * bfd-in2.h: Regenerate.
3839 2002-02-18 Alan Modra <amodra@bigpond.net.au>
3841 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3842 (struct ppc_link_hash_table): Add sfpr.
3843 (ppc64_elf_link_hash_table_create): Init it.
3844 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3846 (create_linkage_sections): ..here. Make .sfpr too.
3847 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3849 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3850 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3851 ._restf* functions, and create as needed.
3852 (func_desc_adjust): Only force_local for shared libs.
3854 2002-02-18 David O'Brien <obrien@FreeBSD.org>
3856 * configure.in: Bump version number post 2.12 branching.
3857 * configure: Regenerate.
3859 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3861 * mmo.c: Correct and improve comments.
3862 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3863 zero-pad. Use input to fill up non-empty bfd buffer.
3864 (mmo_flush_chunk): New function.
3865 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3866 changed. Don't emit location specifier if VMA is same as
3867 *LAST_VMAP after omitting leading zero contents. Call
3868 mmo_flush_chunk before emitting location specifier.
3869 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3870 with mmo_write_loc_chunk calls.
3871 (mmo_internal_write_section): Call mmo_flush_chunk after
3873 (mmo_write_symbols_and_terminator): Move :Main to first position
3874 in symbol array. Add faked one if it does not exist if there are
3875 other symbols. Don't add it if there are no symbols at all. Move
3876 out test for value of :Main from symbol loop. Rename table
3877 fakemain to maintable and variable mainsym to fakemain.
3879 2002-02-15 Richard Henderson <rth@redhat.com>
3881 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3882 section with no got matches any got. Simplify error generaion.
3884 2002-02-15 Alan Modra <amodra@bigpond.net.au>
3886 Support arbitrary length fill patterns.
3887 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3888 (_bfd_default_link_order): Remove bfd_fill_link_order code.
3889 Call default_data_link_order.
3890 (default_fill_link_order): Delete.
3891 (default_data_link_order): New function.
3892 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3893 of bfd_fill_link_order with bfd_data_link_order.
3894 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3895 * elf64-mips.c (mips_elf64_final_link): Likewise.
3897 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3898 Correct value returned in "end" for "0x<non-hex>".
3900 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
3902 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3903 (scan): Test against 'mach' field in info structure.
3905 2002-02-14 Alan Modra <amodra@bigpond.net.au>
3907 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3909 2002-02-14 Matt Fredette <fredette@netbsd.org>
3911 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3914 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
3916 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
3917 non-zero physical addresses when adjusting the LMAs of new
3920 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3922 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3923 from _bfd_elf_hppa_gen_reloc_type.
3924 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3925 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3926 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3927 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3929 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
3931 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3932 loading its contents if there's nothing to do in it.
3934 2002-02-12 Alan Modra <amodra@bigpond.net.au>
3936 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3939 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3940 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3941 (ppc64_elf_finish_dynamic_sections): Set values for them.
3943 2002-02-11 Michael Snyder <msnyder@redhat.com>
3945 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3946 * elf.c (elfcore_grok_pstatus): Add prototype.
3947 (elfcore_grok_lwpstatus): Add prototype.
3948 (elfcore_write_lwpstatus): New function.
3949 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3951 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
3953 * elf32-sh.c: Added missing prototypes.
3954 * elf32-sh64.c: Likewise.
3955 (sh_elf_align_loads): Mark unused args as such.
3956 * elf64-sh64.c: Added missing prototypes.
3957 (struct elf_sh64_link_hash_entry): Fix typo.
3958 (sh_elf64_relocate_section): Fix info argument passed to
3959 _bfd_elf_section_offset.
3961 2002-02-11 Alan Modra <amodra@bigpond.net.au>
3963 * Makefile.am: "make dep-am".
3964 * Makefile.in: Regenerate.
3965 * aclocal.m4: Regenerate.
3966 * config.in: Regenerate.
3967 * configure: Regenerate.
3969 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
3971 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3973 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3975 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3976 cast warnings for the common case.
3978 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
3980 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3982 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3985 2002-02-09 Richard Henderson <rth@redhat.com>
3987 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3988 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3989 (elf64_alpha_relocate_section): Likewise.
3990 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3991 * bfd-in2.h, libbfd.h: Rebuild.
3993 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
3995 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3996 that base-plus-offset reloc accounting is consistent.
3997 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3998 up to date for undefined symbols.
4000 2002-02-08 Eric Christopher <echristo@redhat.com>
4002 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4004 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
4005 sections for the O32 ABI.
4007 2002-02-08 Chris Demetriou <cgd@broadcom.com>
4009 * elf32-arm.h: Fix formatting of _("...").
4010 * elf32-d10v.c: Likewise.
4011 * elf32-m68k.c: Likewise.
4012 * elf32-mips.c: Likewise.
4014 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
4016 * coff-or32.c: Fix compile time warning messages.
4018 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
4020 Contribute sh64-elf.
4021 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
4022 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
4023 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
4024 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
4025 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
4026 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
4027 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
4028 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
4029 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
4030 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
4032 * libbfd.h, bfd-in2.h: Rebuilt.
4033 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
4034 (sh_reloc_map): Map them.
4035 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4036 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
4037 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
4038 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
4039 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
4040 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
4041 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
4042 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
4043 datalabel_got_offset.
4044 (sh_elf_link_hash_newfunc): Initialize it.
4045 (sh_elf_relocate_section): Augment the scope of
4046 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
4047 GOT and GOTOFF handling to new SHmedia relocation types. Support
4049 (sh_elf_check_relocs): Likewise.
4050 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
4051 PLT entries using movi_shori_putval. Support GOT_BIAS.
4052 (sh_elf_finish_dynamic_sections): Likewise.
4053 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
4054 relocation, it's now done by the caller.
4056 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
4057 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
4058 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
4059 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
4060 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
4061 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
4062 sh64_elf64_hash_table): New.
4063 (sh_elf64_howto_table): Introduce new relocs.
4064 (sh_elf64_info_to_howto): Accept new PIC relocs.
4065 (sh_elf64_relocate_section): Augment the scope of
4066 seen_stt_datalabel. Support new PIC relocs.
4067 (sh_elf64_check_relocs): Support new PIC relocs.
4068 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
4069 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
4070 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
4071 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
4072 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
4073 movi_shori_putval, movi_3shori_putval,
4074 sh64_elf64_create_dynamic_sections,
4075 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
4076 sh64_elf64_size_dynamic_sections,
4077 sh64_elf64_finish_dynamic_symbol,
4078 sh64_elf64_finish_dynamic_sections): New.
4079 (elf_backend_create_dynamic-sections,
4080 bfd_elf64_bfd_link_hash_table_create,
4081 elf_backend_adjust_dynamic_symbol,
4082 elf_backend_size_dynamic_sections,
4083 elf_backend_finish_dynamic_symbol,
4084 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
4085 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4086 elf_backend_got_header_size, elf_backend_plt_header_size):
4088 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
4089 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
4090 match official numbers and names; moved unmaching ones to the
4092 * elf32-sh64.c, elf64-sh64.c: Likewise.
4093 2001-03-12 DJ Delorie <dj@redhat.com>
4094 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
4096 2001-03-12 DJ Delorie <dj@redhat.com>
4097 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
4099 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
4100 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
4101 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
4102 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
4103 .cranges section with SEC_SORT_ENTRIES set.
4104 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
4105 incoming sorted .cranges section.
4106 (sh64_bfd_elf_copy_private_section_data): New.
4107 (sh64_elf_final_write_processing): Only sort .cranges and modify
4108 start address if called by linker.
4109 2001-01-08 Ben Elliston <bje@redhat.com>
4110 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
4111 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
4112 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
4113 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4114 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
4115 line. Add comments before all entries.
4116 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
4118 (sh_elf64_reloc): Correct head comment.
4119 (sh_elf64_relocate_section): Correct spacing.
4120 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
4121 instead call reloc_dangerous callback.
4122 <case R_SH_SHMEDIA_CODE>: New case.
4123 (sh_elf64_gc_mark_hook): Correct spacing.
4124 (sh_elf64_check_relocs): Ditto.
4125 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
4127 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
4129 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
4130 clarify describing comment. Add comments before all entries.
4131 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
4132 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
4133 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4134 Sort .cranges section in final link. Prepare to set bit 0 on
4136 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
4137 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
4138 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
4140 (sh64_backend_section_from_shdr): New, to recognize
4141 SHT_SH5_CR_SORTED on incoming .cranges section.
4142 (elf_backend_section_from_shdr): Define.
4143 (sh64_elf_final_write_processing): Sort outgoing .cranges
4144 section. (New, temporarily disabled:) Set bit 0 on entry address
4145 according to ISA type.
4146 (sh64_find_section_for_address): New.
4147 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
4148 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
4149 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
4150 bfd_malloc, not xmalloc.
4151 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
4153 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
4154 temporarily disabled) setting bit 0 on entry address.
4155 (elf_backend_final_write_processing): Define.
4156 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
4157 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
4158 be a proper relocation for PTA and PTB rather than a marker.
4159 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
4160 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
4161 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
4162 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
4163 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
4165 * elf64-sh64.c: Ditto.
4166 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
4167 * elf32-sh64.c: Include opcodes/sh64-opc.h
4168 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
4169 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
4170 parameters. No unused parameters. Caller changed.
4171 <case R_SH_PT_16>: New case.
4172 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
4173 * Makefile.in: Regenerate.
4174 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
4175 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
4177 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4178 (sh64_elf_merge_private_data): Ditto.
4179 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
4180 to access stored section flags.
4181 (sh64_elf_final_write_processing): Return immediately unless
4182 called by linker. Use sh64_elf_section_data (cranges) to get size
4183 of linker-generated cranges entries.
4184 (sh64_elf_copy_private_data): Add missing "return true".
4185 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4186 (sh_elf64_merge_private_data): Ditto.
4187 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
4188 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
4189 elf64-sh64.c:sh64_elf_fake_sections.
4190 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
4191 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
4192 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
4193 (sh64_elf_final_write_processing): New.
4194 (elf_backend_final_write_processing): Define.
4195 (sh64_elf_fake_sections): Get header flags from tdata field.
4196 (sh64_elf_copy_private_data): Do not call
4197 sh64_elf_copy_private_data_internal, just copy e_flags field.
4198 (sh64_elf_merge_private_data): Do not call
4199 sh64_elf_copy_private_data_internal.
4200 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
4201 Remove EF_SH64_ABI64, let ELF size make difference.
4202 Remove SH64-specific BFD section flag.
4203 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
4204 containing SHmedia through elf_section_data (asect)->tdata
4205 non-zero, not using a BFD section flag.
4206 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
4207 (sh64_elf_merge_private_data): Similar.
4208 (elf_backend_section_flags): Don't define.
4209 (sh64_elf_backend_section_flags): Delete.
4210 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
4212 (sh_elf64_merge_private_data): Similar.
4213 * section.c (Section flags definitions): Don't define
4215 (bfd-in2.h): Regenerate.
4216 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
4217 Make DataLabel references work with partial linking.
4218 * elf32-sh64.c: Fix formatting.
4219 (sh64_elf_link_output_symbol_hook): New.
4220 (elf_backend_link_output_symbol_hook): Define to
4221 sh64_elf_link_output_symbol_hook.
4222 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
4223 undefined if partial linking. Adjust sanity check.
4224 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
4225 (elf_backend_link_output_symbol_hook): Define to
4226 sh64_elf64_link_output_symbol_hook.
4227 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
4228 undefined if partial linking. Adjust sanity check.
4229 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
4230 Implement semantics for inter-file DataLabel references.
4231 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
4232 (sh64_elf64_add_symbol_hook): New.
4233 (sh_elf64_relocate_section): If passing an indirect symbol with
4234 st_type STT_DATALABEL on the way to a symbol with st_other
4235 STO_SH5_ISA32, do not bitor 1 to the relocation.
4236 (elf_backend_add_symbol_hook): Define to
4237 sh64_elf64_add_symbol_hook.
4238 * elf64-sh32.c: Tweak comments.
4239 (DATALABEL_SUFFIX): Define.
4240 (sh64_elf_add_symbol_hook): New.
4241 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
4242 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
4243 symbol with st_type STT_DATALABEL on the way to a symbol with
4244 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
4245 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
4246 Pass through STT_DATALABEL.
4247 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
4248 (elf_backend_get_symbol_type): Define.
4249 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
4250 (elf_backend_get_symbol_type): Define.
4251 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
4252 * elf32-sh64.c: Tweak comments.
4253 (sh64_elf_copy_private_data_internal): Add prototype.
4254 (bfd_elf32_bfd_set_private_flags): Define.
4255 (sh64_elf_copy_private_data_internal): Compare machine name, not
4256 textual BFD target name, to check whether to copy section flag
4258 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
4259 Tweak section-contents-type-mismatch message.
4260 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
4261 Validize reloc-types.
4262 * elf64-sh64.c: New file.
4263 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
4264 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
4265 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
4266 Regenerate dependencies.
4267 * Makefile.in: Regenerate.
4268 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
4269 bfd_elf64_sh64l_vec.
4270 * configure.in: Handle bfd_elf64_sh64_vec and
4271 bfd_elf64_sh64l_vec.
4272 * configure: Regenerate.
4273 * po/POTFILES.in: Regenerate.
4274 * po/bfd.pot: Regenerate.
4275 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
4276 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
4277 anything else but EF_SH64 and EF_SH64_ABI64.
4278 (sh64_elf_merge_private_data): Emit error for anything else but
4279 EF_SH64 and EF_SH64_ABI64.
4280 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
4282 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
4283 bfd_elf32_sh64l_vec as a temporary measure.
4284 * configure: Regenerate.
4285 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
4286 * cpu-sh.c (arch_info_struct): Include sh5 item
4288 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
4289 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
4290 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
4291 * elf32-sh64.c: Tweak comments.
4292 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
4293 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
4294 (sh64_elf_copy_private_data_internal): Wrap long line.
4295 (sh64_elf_merge_private_data): Rewrite to allow objects from
4296 SH64 subsets to be linked together.
4297 (INCLUDE_SHMEDIA): Define.
4298 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
4299 Parenthesize plus-expression inside or-expression.
4300 <global symbol>: Ditto.
4301 (sh_elf_set_mach_from_flags): Remove code refusing
4302 deleted EF_SH64_32BIT_ABI flag.
4303 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
4304 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
4305 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
4306 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
4307 (sh_elf_relocate_section) <local symbol>: Or 1 in
4308 calculation of relocation if sym->st_other & STO_SH5_ISA32.
4309 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
4310 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
4312 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
4313 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
4314 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
4315 Regenerate dependencies.
4316 * Makefile.in: Regenerate.
4317 * archures.c: Add bfd_mach_sh5.
4318 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
4319 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
4320 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
4321 * configure: Regenerate.
4322 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
4323 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
4324 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
4325 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
4326 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
4327 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
4328 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
4329 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
4330 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
4331 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
4333 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
4335 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
4336 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
4337 shmedia_prepare_reloc, goto final_link_relocate if it returns
4338 non-zero, else fail as before.
4339 (sh_elf_set_mach_from_flags): Provide function only if not defined
4340 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
4341 (sh_elf_set_private_flags): Provide function only if not defined
4343 (sh_elf_copy_private_data): Similar.
4344 (sh_elf_merge_private_data): Similar.
4345 * section.c (SEC_SH_ISA_SHMEDIA): New.
4346 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
4347 * elf32-sh64.c: New file.
4348 * libbfd.h: Regenerate.
4349 * bfd-in2.h: Regenerate.
4350 * po/POTFILES.in: Regenerate.
4351 * po/bfd.pot: Regenerate.
4352 * bfd-in2.h: Regenerate.
4353 * libbfd.h: Regenerate.
4355 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
4357 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
4358 been included, not drag it in.
4359 * bfd-in2.h: Regenerate.
4361 2002-02-06 H.J. Lu (hjl@gnu.org)
4363 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
4364 the mach and ISA fields if necessary.
4366 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
4368 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
4369 ARM architecture when an F_ARM_5 flag is detected, since we cannot
4370 be sure exactly which architecture this represents.
4372 2002-02-05 Nick Clifton <nickc@redhat.com>
4374 * po/tr.po: Updated translation.
4376 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4378 From Jimi X <jimix@watson.ibm.com>
4379 * archures (bfd_mach_ppc64): Define.
4380 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
4381 (bfd_powerpc_arch): Define.
4382 * bfd-in2.h: Regenerate.
4383 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
4384 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
4385 (bfd_powerpc_archs): Add default powerpc64 arch.
4387 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4389 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
4390 against section syms in readonly sections. Don't do the global
4391 sym check if we find one.
4392 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
4393 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
4394 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4395 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
4396 (elf_s390_grok_prstatus): Add missing prototype.
4398 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
4400 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
4401 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
4402 Call bfd_get_section_by_name only once. Initialize
4403 bpodata->n_bpo_relocs_this_section.
4404 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
4406 (bpo_reloc_request_sort_fn): Don't use difference of values as
4409 2002-02-02 David O'Brien <obrien@FreeBSD>
4411 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
4412 version 4.5 and later the same as 5-CURRENT.
4413 * configure: Re-generate.
4415 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
4417 * config.bfd (hppa*-*-netbsd*): New target.
4419 2002-01-31 Philipp Thomas <pthomas@suse.de>
4421 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
4422 to front of message. Unify messages with elf32-arm.h. Use
4423 commas where neccessary.
4424 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
4425 ERROR in messages. Unify messages with coff-arm.c. Correct
4426 VFP/FPA error message.
4427 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
4428 APCS-32 for translation.
4430 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
4432 Perform on-demand global register allocation from
4433 R_MMIX_BASE_PLUS_OFFSET relocs.
4434 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4435 bpo_reloc_request, struct bpo_greg_section_info): New.
4436 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4437 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4438 _bfd_mmix_check_all_relocs,
4439 _bfd_mmix_prepare_linker_allocated_gregs,
4440 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4441 (elf_mmix_howto_table): Correct src_mask for most relocs.
4442 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4444 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4445 case. Fix typo in comment. New label do_mmix_reloc.
4446 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4447 store first object file with a base-plus-offset reloc. Call
4448 mmix_elf_check_common_relocs for the part common with mmo.
4449 (mmix_elf_final_link): Write out linker-allocated register
4451 (elf_backend_gc_sweep_hook): Define.
4452 (bfd_elf64_bfd_relax_section): Define.
4454 * mmo.c: Don't include <ctype.h>
4455 (mmo_init): Correct init-once logic.
4457 2002-02-01 Tom Rix <trix@redhat.com>
4459 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4461 2002-02-01 Alan Modra <amodra@bigpond.net.au>
4463 * Makefile.am: Run "make dep-am"
4464 * Makefile.in: Regenerate.
4466 2002-01-31 David O'Brien <obrien@FreeBSD>
4468 * configure.in: Recognize the differences in core files from FreeBSD
4469 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4471 * configure: Regenerate.
4473 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
4475 * coff-or32.c: New file.
4476 * cpu-or32.c: New file.
4477 * elf32-or32.c: New file.
4478 * archures.c: Add support for or32.
4479 * targets.c: Add support for or32.
4480 * bfd-in2.h: Regenerate.
4481 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
4482 coff_write_object_contents): Add support for or32.
4483 * config.bfd: Add target.
4484 * configure.in: Add support for or32.
4485 * configure: Regenerate.
4486 * Makefile.am: Add support for or32.
4487 * Makefile.in: Regenerate.
4488 * po/SRC-POTFILES.in: Add or32 files.
4489 * po/bfd.pot: Regenerate.
4491 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4492 Don Lindsay <lindsayd@cisco.com>
4494 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4495 false' with a return of a bfd_reloc_ error code.
4497 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
4499 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4500 unexport unreferenced symbols when --export-dynamic. Call
4501 _bfd_elf_strtab_delref when unexporting.
4503 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
4505 * bfd-in.h: Include <stdbool.h> if it is available.
4506 * bfd-in2.h: Regenerated.
4508 2002-01-31 Alan Modra <amodra@bigpond.net.au>
4510 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4513 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4515 * archures.c: Tidy up formatting of embedded comments.
4516 * bfd.c: Tidy up formatting of embedded comments.
4517 * bfd-in.h: Fix formatting of comments.
4518 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4519 * section.c: Tidy up formatting of embedded comments.
4520 * syms.c: Tidy up formatting of embedded comments.
4521 * targets.c: Tidy up formatting of embedded comments.
4523 * bfd-in2.h: Regenerate.
4525 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4527 * vms-tir.c (cmd_name): New function.
4528 (tir_cmd_name): New function.
4529 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4530 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4533 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4535 (pe_print_pdata): Rearrange message to aid in translation.
4537 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4540 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4542 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4544 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4545 message to aid in translation.
4547 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4548 to aid in translation.
4550 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4552 2002-01-30 Philipp Thomas <pthomas@suse.de>
4554 * coff-arm.c, elf32-elf.h: Unify messages.
4556 2002-01-30 Nick Clifton <nickc@redhat.com>
4558 * po/sv.po: Updated translation.
4560 2002-01-30 Philipp Thomas <pthomas@suse.de>
4562 * dwarf2.c (read_abbrev): Use full section name in error message.
4563 (decode_line_info): Likewise.
4565 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4568 2002-01-30 Alan Modra <amodra@bigpond.net.au>
4570 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4571 descriptor symbols for undefined function code syms. Clear
4572 ELF_LINK_NON_ELF so that they can stay weak.
4574 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4575 Mitch Lichtenberg <mpl@broadcom.com>
4577 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4578 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4579 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4581 * bfd-in2.h: Regenerate.
4583 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4585 * elf32-mips.c: Add additional comments about HI16 relocation
4587 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4588 pc-relative relocations. (Reverts change made on 2001-10-31.)
4589 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4590 for pc-relative relocations.
4591 (mips_elf_calculate_relocation): Add a comment about a kludge
4592 in the R_MIPS_GNU_REL_HI16 handling.
4593 (_bfd_mips_elf_relocate_section): Implement that kludge;
4594 adjust pc-relative HI16 relocation for difference in HI16 and
4595 LO16 addresses, since it can't easily be done in
4596 mips_elf_calculate_relocation.
4598 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4600 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4601 relocations with PC32 relocations for undefined or weak symbols.
4602 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4603 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4605 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4607 * elfcore.h (elf_core_file_p): Improve comment for last change.
4609 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
4611 * configure: Regenerated.
4613 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4615 * elfcore.h (elf_core_file_p): Set the machine architecture
4616 before processing the program headers.
4618 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4620 * configure.in <64-bit configuration>: If using gcc, check and
4621 emit error for egcs-1.1.2.
4622 * configure: Regenerate.
4624 2002-01-26 Egor Duda <deo@logos-m.ru>
4626 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4627 as possible to avoid stack corruption.
4629 2002-01-26 Richard Henderson <rth@redhat.com>
4631 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4632 for non-allocated sections.
4634 2002-01-25 Mark Kettenis <kettenis@gnu.org>
4636 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4637 prstat.pr_reg even if it is a struct.
4639 2002-01-25 Steve Ellcey <sje@cup.hp.com>
4641 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
4643 2002-01-25 Philipp Thomas <pthomas@suse.de>
4645 * coffgen.c (coff_print_symbol): Don't mark info message
4648 2002-01-25 Nick Clifton <nickc@redhat.com>
4650 * po/fr.po: Updated translation.
4651 * po/es.po: Updated translation.
4653 2002-01-25 Philipp Thomas <pthomas@suse.de>
4655 * coff-alpha.c (alpha_relocate_section): Unify warning message
4656 for GP relative relocations without GP defined.
4657 * coff-mips.c (mips_relocate_section): Likewise.
4659 2002-01-25 Alan Modra <amodra@bigpond.net.au>
4661 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4662 unsigned overflow when new_offset < old_offset.
4664 2002-01-24 Philipp Thomas <pthomas@suse.de>
4666 * bfd.c (_bfd_abort): Fix typo.
4668 2002-01-23 Richard Henderson <rth@redhat.com>
4670 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4671 plt entries for undefweak symbols.
4673 2002-01-23 Steve Ellcey <sje@cup.hp.com>
4675 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
4676 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4677 (bfd_elf32_h8300_vec): Ditto.
4679 2002-01-23 Alan Modra <amodra@bigpond.net.au>
4681 * elf64-ppc.c: Remove stale part of ABI comment.
4682 (NO_OPD_RELOCS): Define.
4683 (ppc64_elf_check_relocs): Use it.
4684 (ppc64_elf_relocate_section): Here too.
4685 (build_one_stub): Don't point function syms at the stub. Instead,
4687 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4688 really go to the stub. Make all dynamic relocs in opd against
4690 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4693 2002-01-22 Richard Henderson <rth@redhat.com>
4695 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4697 2002-01-22 Alan Modra <amodra@bigpond.net.au>
4699 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4700 TOC_BASE_OFF adjustment.
4702 * Makefile.am: Run "make dep-am".
4703 * Makefile.in: Regenerate.
4704 * po/SRC-POTFILES.in: Regenerate.
4706 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4708 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4711 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
4713 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4714 Check for and emit error if sgot is NULL at this point.
4716 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4718 * config.bfd (ia64*-*-netbsd*): New target.
4720 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4722 * som.c (som_write_space_strings): Comment typo fix.
4724 2002-01-21 Alan Modra <amodra@bigpond.net.au>
4726 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4727 is_func_descriptor fields.
4728 (link_hash_newfunc): Init them.
4729 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4730 dot are candidates for plt entries. When processing .opd relocs,
4731 set function descriptor strings to point inside function code
4732 string, and set new ppc_link_hash_entry fields.
4733 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4734 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4735 function descriptors. It's now done in..
4736 (func_desc_adjust): New.
4737 (ppc64_elf_func_desc_adjust): New.
4738 (define elf_backend_always_size_sections): Define.
4739 (ppc64_elf_hide_symbol): New.
4740 (define elf_backend_hide_symbol): Define.
4741 (allocate_dynrelocs): Remove code looking up function descriptors
4742 as that has been done earlier.
4743 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4745 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4746 up function descriptor.
4747 (build_one_stub): Look up the function code sym. Check for
4748 invalid plt offsets.
4749 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4750 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4752 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4754 (_bfd_elf_link_hash_hide_symbol): Likewise.
4755 * elflink.h (elf_link_add_object_symbols): Adjust call to
4756 elf_backend_hide_symbol.
4757 (elf_fix_symbol_flags): Likewise.
4758 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4760 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4761 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4762 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4763 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4764 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4766 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4767 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4768 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4770 2002-01-18 Alan Modra <amodra@bigpond.net.au>
4772 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4773 dynamic function descriptor symbol, not the associated function
4776 2002-01-17 Eric Christopher <echristo@redhat.com>
4778 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4780 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4782 * po/bfd.pot: Regenerate.
4783 * po/fr.po: Regenerate.
4785 2002-01-17 Alan Modra <amodra@bigpond.net.au>
4787 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4788 Remove "Elf_Internal_Shdr *" param.
4789 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4790 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4791 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4792 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4793 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4794 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4795 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4796 function to override special sections. Remove hdr arg from
4797 backend call, and don't loop.
4799 2002-01-16 Eric Christopher <echristo@redhat.com>
4801 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4802 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4803 relocations requiring gp0 and gp.
4805 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
4807 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4809 (elf32_arm_print_private_bfd_data): Likewise.
4811 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4813 * po/tr.po: Import new version.
4815 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4817 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4818 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4819 (ORI_R0_R0_0): Correct.
4821 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4823 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4824 when plt_not_loaded.
4825 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4826 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4827 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4828 (ppc64_elf_glink_code): Delete.
4829 (PPC64_ELF_GLINK_SIZE): Delete.
4830 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4831 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4832 ORI_R0_R0_0): Define.
4833 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4834 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4835 (ppc64_elf_link_hash_table_create): Init them.
4836 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4837 Don't copy to shared lib.
4838 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4839 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4840 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4841 room for .stub and .glink code.
4842 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4844 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4845 bfd_elf64_bfd_final_link.
4846 (bfd_elf64_bfd_final_link): Don't define.
4847 (ppc64_elf_size_stubs): New.
4848 (build_plt_stub): New.
4849 (build_one_stub): New.
4850 (ppc64_elf_build_stubs): New.
4851 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4852 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4853 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4854 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4855 case output sections not separate. Adjust DT_RELASZ to not
4856 include plt relocs. Set reserved got entry. Set got and plt
4858 (elf_backend_got_header_size): Set to 8.
4859 * elf64-ppc.h: New file.
4861 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4863 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4864 sections, use bfd_section_list_remove.
4865 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4866 * elflink.h (elf_link_add_object_symbols): When removing all
4867 sections, use bfd_section_list_clear.
4869 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4871 * po/sv.po: New file: Swedish translation.
4872 * configure.in (ALL_LINGUAS): Add sv.
4873 * configure: Regenerate.
4875 2002-01-15 Jakub Jelinek <jakub@redhat.com>
4877 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4878 * elf.c (merge_sections_remove_hook): New function.
4879 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4880 _bfd_merge_sections.
4881 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4882 * libbfd.h: Rebuilt.
4883 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4884 Call remove_hook if a SEC_EXCLUDE section is encountered.
4886 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4888 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4889 (xstormy16_reloc_map): Initialise new field with correct howto
4891 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4894 2002-01-10 Michael Snyder <msnyder@redhat.com>
4896 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4897 (elfcore_write_pstatus): Use long instead of pid_t;
4898 * elf-bfd.h: Change prototypes to use long instead of pid_t;
4900 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
4902 * elf.c: Update copyright years.
4903 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4904 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
4906 2002-01-08 Michael Snyder <msnyder@redhat.com>
4908 Add capability to write corefile note sections, for gdb.
4909 * elf.c (elfcore_write_note): New function.
4910 (elfcore_write_prpsinfo): New function.
4911 (elfcore_write_prstatus): New function.
4912 (elfcore_write_pstatus): New function.
4913 (elfcore_write_prfpreg): New function.
4914 (elfcore_write_prxfpreg): New function.
4915 * elf-bfd.h: Add prototypes for above functions.
4917 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
4919 * elf.c (elf_fake_sections): Propagate errors from
4920 elf_backend_fake_section.
4922 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
4924 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4925 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4926 (elf32-sh-nbsd.lo): New rule.
4927 * Makefile.in: Regenerate.
4928 * config.bfd (sh*le-*-netbsdelf*): New target.
4929 (sh*-*-netbsdelf*): New target.
4930 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4931 (bfd_elf32_shnbsd_vec): New vector.
4932 (bfd_elf32_shlnbsd_vec): New vector.
4933 * configure: Regenerate.
4934 * elf32-sh-nbsd.c: New file.
4935 * targets.c: Update copyright years.
4936 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
4937 bfd_elf32_shnbsd_vec.
4939 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
4941 * coff-rs6000.c (READ20): Use bfd_scan_vma.
4943 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
4945 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4946 of a symbol in a section that will be deleted.
4948 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
4950 * po/es.po: New file: Spanish translation.
4951 * configure.in (ALL_LINGUAS): Add es.
4952 * configure: Regenerate.
4954 2002-01-06 Steve Ellcey <sje@cup.hp.com>
4956 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4957 argument so we can handle HP-UX specially.
4958 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4959 (elfNN_hpux_backend_section_from_bfd_section): New for support
4960 of SHN_IA_64_ANSI_COMMON.
4961 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4962 (is_unwind_section_name): Add special HP-UX support.
4963 (elfNN_ia64_section_from_shdr): Add support for more sections.
4964 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4965 add support for more sections.
4966 (elfNN_ia64_additional_program_headers): Modify
4967 is_unwind_section_name call.
4968 (elfNN_ia64_modify_segment_map): Remove assumption that there is
4969 only one unwind section in segment.
4971 2002-01-06 Alan Modra <amodra@bigpond.net.au>
4973 * syms.c (_bfd_generic_make_empty_symbol): New function.
4974 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4975 _bfd_generic_make_empty_symbol.
4976 * libbfd.h: Regenerate.
4977 * bfd-in2.h: Regenerate.
4978 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4979 (hppabsd_core_get_symtab_upper_bound): Don't define.
4980 (hppabsd_core_get_symtab): Likewise.
4981 (hppabsd_core_print_symbol): Likewise.
4982 (hppabsd_core_get_symbol_info): Likewise.
4983 (hppabsd_core_bfd_is_local_label_name): Likewise.
4984 (hppabsd_core_get_lineno): Likewise.
4985 (hppabsd_core_find_nearest_line): Likewise.
4986 (hppabsd_core_bfd_make_debug_symbol): Likewise.
4987 (hppabsd_core_read_minisymbols): Likewise.
4988 (hppabsd_core_minisymbol_to_symbol): Likewise.
4989 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4991 * hpux-core.c: Similarly.
4992 * irix-core.c: Similarly.
4993 * osf-core.c: Similarly.
4994 * sco5-core.c: Similarly.
4995 * binary.c (binary_make_empty_symbol): Remove function, define as
4996 _bfd_generic_make_empty_symbol.
4997 * ihex.c (ihex_make_empty_symbol): Likewise.
4998 * mmo.c (mmo_make_empty_symbol): Likewise.
4999 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
5000 * srec.c (srec_make_empty_symbol): Likewise.
5001 * versados.c (versados_make_empty_symbol): Likewise.
5002 * vms.c (_bfd_vms_make_empty_symbol): Remove.
5003 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
5004 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
5005 rather than _bfd_vms_make_empty_symbol.
5006 * vms-misc.c (new_symbol): Likewise.
5008 2002-01-05 Alan Modra <amodra@bigpond.net.au>
5010 * section.c (bfd_section_init): Remove unnecessary initialisations.
5011 (bfd_section_list_clear): New function.
5012 (bfd_section_list_remove, bfd_section_list_insert): New macros.
5013 (_bfd_strip_section_from_output): Use them.
5014 * coffcode.h (coff_set_alignment_hook): Likewise.
5015 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
5016 * elf64-mips.c (mips_elf64_final_link): Likewise.
5017 * elf64-mmix.c (mmix_elf_final_link): Likewise.
5018 * sunos.c (sunos_add_dynamic_symbols): Likewise.
5019 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
5020 * bfd-in2.h: Regenerate.
5022 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
5023 rather than doing our own section handling. Clean up after errors
5024 with bfd_release and bfd_section_list_clear. Handle unexpected
5026 * aoutf1.h (sunos4_core_file_p): Likewise.
5027 * aix386-core.c (aix386_core_file_p): Likewise.
5028 * cisco-core.c (cisco_core_file_validate): Likewise.
5029 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
5030 * trad-core.c (trad_unix_core_file_p): Likewise.
5032 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
5033 with bfd_release and bfd_section_list_clear.
5034 * hpux-core.c (hpux_core_core_file_p): Likewise.
5035 * irix-core.c (irix_core_core_file_p): Likewise.
5036 * lynx-core.c (lynx_core_file_p): Likewise.
5037 * osf-core.c (osf_core_core_file_p): Likewise.
5038 * rs6000-core.c (rs6000coff_core_p): Likewise.
5039 * sco5-core.c (sco5_core_file_p): Likewise.
5041 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
5042 sign extension adjustments without conditionals.
5044 2002-01-04 Jakub Jelinek <jakub@redhat.com>
5046 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
5047 CIE at .eh_frame start is removed due to no FDEs referencing it.
5049 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
5051 * config.bfd (x86_64-*-netbsd*): New target.
5052 * configure.in (x86_64-*-netbsd*): Set COREFILE
5054 * configure: Regenerated.
5056 2002-01-03 Tom Rix <trix@redhat.com>
5058 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
5059 for recent bfd_make_section_anyway change.
5061 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
5063 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5064 R_ARM_THM_PC11 reloc.
5066 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5068 * configure.in (LINGUAS): Add ja.
5069 * configure: Regenerate.
5070 * po/ja.po: Import from translation project's web site.
5072 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5074 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
5075 messages to ease translation into other languages.
5077 For older changes see ChangeLog-0001
5083 version-control: never