Commit Graph

1433 Commits

Author SHA1 Message Date
Alan Modra e614115148 daily update 2001-11-21 23:00:51 +00:00
Alan Modra d7458677f4 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
than sym_sec->output_section to detect relocs against discarded
	sections.
2001-11-21 14:58:26 +00:00
Alan Modra 7a47c3a29c daily update 2001-11-21 00:53:38 +00:00
H.J. Lu 45e9217a8f 2001-11-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
	discarding relocations.
2001-11-20 00:54:51 +00:00
Alan Modra b572d65c66 daily update 2001-11-19 23:00:05 +00:00
Nick Clifton 84c254c646 Define and use bfd_is_const_section(). 2001-11-19 15:35:38 +00:00
Alan Modra a0e94dc00c * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount. 2001-11-19 03:52:37 +00:00
Alan Modra 2a5aaecb4a * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
millicode syms as candidates for import stubs.
2001-11-19 03:01:43 +00:00
Alan Modra e5ee5df190 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
(allocate_PIC_calls): Rename to allocate_plt_static.
	(allocate_dynrelocs): Move most of code handling .plt entries to..
	(allocate_plt_static): ..here.  Don't drop plabel entries.
2001-11-19 01:25:00 +00:00
Hans-Peter Nilsson 6eeb40b2c0 * mmo.c: Adjust documentation tags to use texinfo 4 features. 2001-11-19 01:22:45 +00:00
Alan Modra 7138fabc3c daily update 2001-11-18 23:00:04 +00:00
Alan Modra b66167ff38 daily update 2001-11-17 23:00:06 +00:00
Alan Modra 773a0d1a66 daily update 2001-11-16 23:00:05 +00:00
Daniel Jacobowitz 44421011e3 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
local syms from discarded sections.  Update comment.
2001-11-16 02:56:08 +00:00
Alan Modra 949f8813f9 daily update 2001-11-15 23:00:05 +00:00
Alan Modra beb1d4ece2 * po/SRC-POTFILES.in: Regenerate. 2001-11-15 12:18:27 +00:00
Alan Modra f9f32305f7 * elflink.h (elf_link_input_bfd): Complain about all relocs
against local syms from discarded sections.
	(elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
2001-11-15 09:31:25 +00:00
Alexandre Oliva 6361c4c9bc * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
overflows in the .stab section.
2001-11-15 04:13:35 +00:00
Daniel Jacobowitz 73d074b4e2 2001-11-11 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h (bfd_elf32_discard_info): Add prototype.
	(bfd_elf64_discard_info): Likewise.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (struct elf_reloc_cookie): New.
	(struct elf_backend_data): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
	(_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
	(_bfd_elf64_reloc_symbol_deleted_p): Likewise.
	* elf32-mips.c (_bfd_elf32_mips_discard_info): New.
	(_bfd_elf32_mips_ignore_discarded_relocs): New.
	(_bfd_elf32_mips_write_section): New.
	(elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	* elfcode.h (elf_bfd_discard_info): Define.
	(elf_reloc_symbol_deleted_p): Define.
	* elflink.h (elf_link_input_bfd): Check
	elf_section_ignore_discarded_relocs.  Call
	bed->elf_backend_write_section if available.
	(elf_reloc_symbol_deleted_p): New.
	(elf_bfd_discard_info): New.
	(elf_section_ignore_discarded_relocs): New.
	* elfxx-target.h (elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	(elfNN_bed): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and
	elf_backend_write_section.
	* libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
	* libbfd.h: Regenerate.
	* stabs.c (_bfd_discard_section_stabs): New.

2001-11-11  Daniel Jacobowitz  <drow@mvista.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
	(struct ld_emulation_xfer_struct): Use it.
2001-11-15 01:34:12 +00:00
Alan Modra 883d69e653 daily update 2001-11-14 23:00:06 +00:00
Martin Schwidefsky 27018c3f68 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
scheme to get rid of an ugly complicated test.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
2001-11-14 18:48:26 +00:00
Andreas Jaeger 58a3581362 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
x86-64 for display.
2001-11-14 12:01:58 +00:00
Jakub Jelinek d03ba2a185 * dwarf2.c (struct line_head) [total_length]: Change type to
bfd_vma.
	(struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
	(struct comp_unit): Add stash and offset_size.
	(read_8_bytes): Return bfd_vma.
	(read_indirect_string): New.
	(read_attribute): Handle DW_FORM_strp.
	(decode_line_info): Support 64-bit DWARF format.
	(_bfd_dwarf2_find_nearest_line): Likewise.
	(parse_comp_unit): Set offset_size and stash.
2001-11-14 11:16:47 +00:00
Richard Henderson cf716c5663 * dwarf2.c (read_attribute_value): New function to handle
DW_FORM_indirect.
        (read_attribute): Use it.
2001-11-13 23:37:41 +00:00
Alan Modra 13d574884b daily update 2001-11-13 23:00:10 +00:00
Geoffrey Keating 1a509dcc12 Index: bfd/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* dwarf2.c (decode_line_info): Properly deal with unknown standard
	opcodes.

Index: binutils/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (display_debug_lines): Deal with unknown standard
	opcodes.  Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
	DW_LNS_set_isa.

Index: include/elf/ChangeLog
2001-11-11  Geoffrey Keating  <geoffk@redhat.com>

	* dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
2001-11-13 20:13:30 +00:00
Alan Modra 4e6bfe8ada * section.c (bfd_make_section_anyway): Don't increment section_id
and the BFD's section_count if adding the section failed.
	* vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
	change.
2001-11-13 03:52:25 +00:00
Hans-Peter Nilsson bc0d28ee42 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
core dump format.
2001-11-12 23:47:02 +00:00
Alan Modra 968d5a056e daily update 2001-11-12 23:01:05 +00:00
H.J. Lu 350836e342 2001-11-11 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
	_bfd_elf_strtab_size instead of _bfd_stringtab_size.

	* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
	dynstr type to `struct elf_strtab_hash *'.
2001-11-11 23:51:36 +00:00
Alan Modra 50e480d974 daily update 2001-11-11 23:00:05 +00:00
Hans-Peter Nilsson b959dc73d0 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
size_t.  Rename second i to j.
2001-11-11 22:18:01 +00:00
Alan Modra 94753239c5 daily update 2001-11-10 23:00:05 +00:00
Jeff Law 7e250b6c31 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h. 2001-11-10 15:53:31 +00:00
Alan Modra ec33885937 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
relocs into shared libs.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf.c (bfd_section_from_r_symndx): New function.
	* elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
	(struct sym_sec_cache): New.
	(bfd_section_from_r_symndx): Declare.
	(struct bfd_elf_section_data): Change local_dynrel type to PTR.
	* elflink.h (elf_link_input_bfd): Don't test for removed linkonce
	relocs when relocatable.  Don't	zero entire reloc, just zero the
	addend and sym.
	* elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
	(elf_i386_link_hash_table_create): Init it.
	(elf_i386_check_relocs): Track dynamic relocs needed for local
	syms on a per-section basis as we do for globals.
	(elf_i386_gc_sweep_hook): Update for local_dynrel change.
	Remove dead code.
	(allocate_dynrelocs): Warning fix.
	(elf_i386_size_dynamic_sections): Don't allocate relocs when
	section has been discarded.
	(elf_i386_relocate_section): Don't copy STN_UNDEF relocs
	into shared libs.
	* elf32-hppa.c: Likewise.
	* elf32-s390.c: Likewise.
	* elf64-ppc.c: Likewise.
	* elf64-s390.c: Likewise.
2001-11-10 00:23:35 +00:00
Alan Modra 2972bad307 daily update 2001-11-09 23:00:05 +00:00
Alan Modra a525240841 daily update 2001-11-08 23:00:04 +00:00
Martin Schwidefsky 0451c93c40 * elf32-s390: Major rework that introduces all recent changes to
the s390 backends.  Get a closer match to elf32-i386.
(elf_s390_relocate_section): Make use of dynamic section short-cuts.
Localise vars, and delay setting.  Better error reporting, replace
BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
symbol is not defined in the regular object file and tread the weak
definition as the normal one.  Don't discard relocs for undefweak or
undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
test for avoided copy relocs.  Reinstate fudge for unresolved relocs
in debugging sections.
(elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
reloc processing for weakdefs.  Remove redundant casts and aborts.
Delay setting of vars until needed.  Move creation of dynamic symbols
and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
BFD_ASSERT with abort.  Discard .plt entries for everything with
plt.refcount <= 0.
(elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
.got or .relgot here but do it in allocate_dynrelocs.  Reference count
possible .plt and .got entries.  Don't test input section SEC_READONLY
here to try to avoid copy relocs, and keep dyn_relocs regardless of
ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
variables until needed.  Remove separate switch stmt for creating .got
section.  Initialise local_got_refcounts to 0.  Cache pointer to
"sreloc" section in elf_section_data. Tweak condition under which .got
created.  Report files with bad relocation section names.
(elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
have been forced local.  Use same test to decide if we can use a
relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
comment.  Move expressions out of function calls.  Replace BFD_ASSERT
with abort.
(elf_s390_finish_dynamic_sections): Migrate common code out of switch
statement.  Replace BFD_ASSERT with abort.
(elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
instead of looking up section names for DT_TEXTREL.  Replace
BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
Add a comment to remind us that one day this ought to be fixed.
(struct elf_s390_link_hash_entry): Rename "root" to "elf".
(struct elf_s390_link_hash_table): Likewise.
(elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
rid of unnecessary casts.
(struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
Remove "section" field.
(elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
Reference count possible .plt entries.  Don't deallocate .got and
.relgot space here.
(struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
Update comment.
(struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
dyn_relocs.
(elf_s390_discard_copies):  Delete.
(elf_s390_link_hash_traverse): Delete.
(bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
rather than gc variety).
(struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
srelplt, sdynbss, srelbss fields.
(elf_s390_link_hash_table_create): Init them.
(WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
(allocate_dynrelocs): New function.
(create_got_section): New function.
(elf_backend_can_refcount): Define.
(elf_backend_copy_indirect_symbol): Define.
(elf_s390_copy_indirect_symbol): New function.
(elf_s390_create_dynamic_sections): New function.
(readonly_dynrelocs): New function.
* elf64-s390x: Likewise.
2001-11-08 18:45:46 +00:00
Alan Modra a65d482311 daily update 2001-11-07 23:00:06 +00:00
Jakub Jelinek 2b0f7ef92e * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
(BFD32_BACKENDS_CFILES): Add elf-strtab.c.
	(elf-strtab.lo): Add rule.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-strtab.lo.
	* configure: Rebuilt.
	* elf-bfd.h (elf_strtab_hash): Forward declare.
	(struct elf_link_hash_table): Change dynstr type to
	struct elf_strtab_hash *.
	(struct elf_obj_tdata): Change strtab_ptr type to
	struct elf_strtab_hash *.
	(_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
	_bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
	_bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
	_bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
	_bfd_elf_strtab_finalize): New prototypes.
	* elf-strtab.c: New file.
	* elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
	and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
	Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
	when forcing dynamic symbol to local.
	(elf_link_create_dynamic_sections): Call
	_bfd_elf_strtab_init instead of elf_stringtab_init.
	(elf_link_record_local_dynamic_symbol): Likewise, change
	dynstr type.  Use _bfd_elf_strtab functions instead of
	_bfd_stringtab calls.
	(size_dynamic_sections): Use _bfd_elf_strtab functions instead of
	_bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
	call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
	(elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
	(elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
	dynamic symbol to local.
	(elf_link_assign_sym_version): Likewise.
	(elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
	_bfd_stringtab_emit.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
	type.  Call _bfd_elf_strtab functions instead of
	_bfd_stringtab functions.
	* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
	* elf.c (_bfd_elf_init_reloc_shdr): Likewise.
	(elf_fake_sections): Likewise.
	(assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
	on shstrtab hash table, call _bfd_elf_strtab_addref on each section
	name in the output.  Call _bfd_elf_strtab_finalize and
	use _bfd_elf_strtab_offset to finalize sh_name section header fields.
	(_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
	instead of _bfd_stringtab_size.
	(prep_headers): Change shstrtab type.
	Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
2001-11-07 16:50:38 +00:00
Alan Modra 1d761fc593 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
bad symtab segfault.  Formatting and warning fixes.  Improve
	error message for internationalisation.
2001-11-07 04:07:09 +00:00
Alan Modra df05402949 daily update 2001-11-06 23:00:06 +00:00
H.J. Lu f8deed93c6 2001-11-06 H.J. Lu (hjl@gnu.org)
* elflink.h (elf_link_input_bfd): Complain relocs against
	discarded sections.
2001-11-06 17:49:38 +00:00
Alan Modra 0a2a5e0f3c daily update 2001-11-05 23:00:07 +00:00
Alan Modra 9a03cc54f7 daily update 2001-11-04 23:08:47 +00:00
Alan Modra 5a26231798 daily update 2001-11-03 23:00:04 +00:00
Alan Modra 7fda6dbc17 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order. 2001-11-03 03:18:34 +00:00
Alan Modra 49fd28c1db daily update 2001-11-02 23:00:06 +00:00
H.J. Lu d918dd357c 2001-11-02 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (mips_elf_calculate_relocation): Don't create
	dynamic relocation for symbols defined in regular objects when
	creating executables.
2001-11-02 19:46:59 +00:00
Nick Clifton 3c62831e20 Add translations 2001-11-02 19:09:06 +00:00
Nick Clifton b8819ab2f8 Add comment 2001-11-02 16:29:15 +00:00
Nick Clifton 21da9f89f2 Initialize subspace_sections. 2001-11-02 16:19:54 +00:00
H.J. Lu 95f7d9f7b7 2001-11-02 H.J. Lu (hjl@gnu.org)
* coffgen.c (coff_object_p): Return 0 if the header is too big.
2001-11-02 15:47:24 +00:00
Hans-Peter Nilsson 12e1f53eb8 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
information.  Save bfd arch and mach values.  Restore on error.
2001-11-02 13:12:56 +00:00
Alan Modra a8d02d6673 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
(allocate_PIC_calls): New function.
	(allocate_dynrelocs): Don't allocate pic_call plt entries here.
	(elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
	(elf32_hppa_finish_dynamic_symbol): Remove dead code.
2001-11-02 10:37:04 +00:00
Hans-Peter Nilsson 4a15251e58 Fix cutnpasto in last entry 2001-11-02 07:22:37 +00:00
Hans-Peter Nilsson 72209a1fb6 * elf32-cris.c (cris_elf_grok_prstatus): New function.
(cris_elf_grok_prstatus): New function.
	(elf_backend_grok_prstatus): Define.
	(elf_backend_grok_psinfo): Define.
2001-11-02 07:20:24 +00:00
Alan Modra e90bf65af7 daily update 2001-11-01 23:00:04 +00:00
Alan Modra 86c76c7be0 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
prediction bits.
2001-11-01 05:35:10 +00:00
Chris Demetriou afdbd6d03b [ bfd/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@demetriou.com>

	* elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
	relocations properly.

[ gas/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded
	PIC code, assume pointers the same size as GPRs.
	(macro): In M_LA_AB handling for embedded PIC code, support
	"la $treg,foo-bar($breg)".  In load/store handling
	(label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)"
	which is used by the compiler for switch statements.
	In load/store double multi-instruction macro handling
	(label ldd_std) add a comment that no special handling
	is currently done for embedded PIC.
	(mips_ip): In 'o' (16-bit offset) case, only accept 16
	bit offsets.

[ gas/testsuite/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/empic.s: Undo damage inflicted on 2000-12-02.
	* gas/mips/empic.d: Likewise.
	* gas/mips/elempic.d: Likewise (it was copied into other files).
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.

	* gas/mips/empic2.s: New test to check new 'la' and 'lw' (and
	related ops) syntax, test loads with large offsets.
	* gas/mips/emcic2.d: Likewise.
	* gas/mips/mips.exp: Run the new test on ELF platforms.
2001-11-01 01:33:47 +00:00
Alan Modra 0a299a95a8 daily update 2001-10-31 23:00:35 +00:00
H.J. Lu 2cd533b769 2001-10-31 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_output_extsym): Don't clear the visibility
	field for relocateable.
2001-10-31 16:42:48 +00:00
Alan Modra 4e12ff7fc2 Revert previous delta, instead do this.
* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
	.plt relocs in DT_RELASZ.
2001-10-31 15:32:09 +00:00
Alan Modra 4578e0a726 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Set DT_RELASZ
whenever DT_PLTRELSZ.
2001-10-31 14:58:14 +00:00
Nick Clifton 7649aa5088 Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu targets 2001-10-31 09:50:09 +00:00
Nick Clifton a53ecf01a5 Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec. 2001-10-31 09:01:50 +00:00
Hans-Peter Nilsson ed73733d7d Remove #if 0 around bfd_mmo_mmix_vec 2001-10-31 03:08:59 +00:00
Hans-Peter Nilsson e06fcc8615 Split file by ^L:s as in original submitted patch 2001-10-31 03:07:48 +00:00
Alan Modra 6180d2b004 daily update 2001-10-30 23:01:01 +00:00
Nick Clifton 3c3bdf30e4 Add MMIX support 2001-10-30 15:20:14 +00:00
Nick Clifton f5ffc9190a If the LMA for a segment is known, use it for matching sections to segments.
Use the LMA when adjusting for inter-section alignment padding.
2001-10-30 11:40:28 +00:00
Nick Clifton e0e8c97fe9 Set the LMA based on the p_paddr of the segment that contains it. 2001-10-30 11:34:46 +00:00
Alan Modra 3109ff8fb4 daily update 2001-10-29 23:00:04 +00:00
Kazu Hirata 5b74f489cb * README: Fix a typo. 2001-10-29 22:29:59 +00:00
Kazu Hirata fe03258071 * bfdsumm.texi: Fix a typo. 2001-10-29 22:26:12 +00:00
Alan Modra cdf1fe3060 daily update, a bit late.. 2001-10-29 04:00:48 +00:00
Alan Modra 04820a4664 daily update 2001-10-27 23:00:06 +00:00
Nick Clifton 07d8a8910a Change footer to refer to FSF. Change subtitle to refer to original creation date. 2001-10-27 07:31:26 +00:00
Alan Modra a05798b13e daily update 2001-10-27 00:00:04 +00:00
Alan Modra aaaaf2ae5d daily update 2001-10-26 00:00:04 +00:00
Richard Henderson 0b6488e20b * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
timestamp to time_t for ctime.
2001-10-25 06:33:56 +00:00
Alan Modra cc7e8be27e daily update 2001-10-25 00:00:03 +00:00
Hans-Peter Nilsson 908d94bfcd * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
unsigned, increasing index.
2001-10-24 03:39:54 +00:00
Alan Modra db328227fa daily update 2001-10-24 00:00:35 +00:00
H.J. Lu 1b58be7e74 2001-10-23 H.J. Lu <hjl@gnu.org>
* elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
	m != NULL before accessing it.
2001-10-23 20:24:23 +00:00
Alan Modra ce757d1518 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
	doesn't accept BFD_RELOC_* on some targets, eg. hppa.

	* elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
	(hppa_link_hash_newfunc): Likewise.
	(elf32_hppa_finish_dynamic_symbol): Likewise.
	(allocate_dynrelocs): Always allocate .got relocs if shared.
	(elf32_hppa_relocate_section): Output them too.  Similarly
	consolidate .plt reloc code, and no longer initialise .plt
	when a reloc is output.
	(elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
	when no reloc is output.

	From Herbert Xu <herbert@gondor.apana.org.au>
	* elf32-hppa.c (final_link_relocate): Call bfd_set_error for
	unreachable branches.
2001-10-23 03:55:24 +00:00
Alan Modra 806203e6cb daily update 2001-10-23 00:00:04 +00:00
H.J. Lu ca51bffffb 2001-10-22 H.J. Lu <hjl@gnu.org>
* configure.in (WIN32LIBADD): Use -L../libiberty for
	mips*-*-linux*.
	* configure: Rebuild.
2001-10-22 18:45:35 +00:00
H.J. Lu 78be1d6e75 2001-10-21 H.J. Lu <hjl@gnu.org>
* configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
	if shared library is enabled only for Linux hosts.
	* configure: Rebuild.
2001-10-22 00:40:48 +00:00
Alan Modra c85828c515 daily update 2001-10-22 00:00:04 +00:00
H.J. Lu 1b90af266c 2001-10-21 H.J. Lu <hjl@gnu.org>
* configure.in (WIN32LIBADD): Check if PICFLAG is defined in
	../libiberty/Makefile instead of $enable_shared.
	* configure: Rebuild.
2001-10-21 17:14:08 +00:00
H.J. Lu ebe7507a64 2001-10-21 H.J. Lu <hjl@gnu.org>
* elf32-cris.c (cris_reloc_type_lookup): Use int for index.
2001-10-21 07:23:24 +00:00
H.J. Lu 3969176296 2001-10-20 H.J. Lu <hjl@gnu.org>
* configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
	if shared library is enabled.
	* configure: Rebuild.
2001-10-21 06:51:03 +00:00
Alan Modra 7ba87d746b daily update 2001-10-21 00:00:04 +00:00
H.J. Lu 6a7805b5c0 2001-10-20 H.J. Lu <hjl@gnu.org>
* elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
2001-10-20 23:16:17 +00:00
Alan Modra e1a0bf5185 daily update 2001-10-20 00:00:06 +00:00
H.J. Lu e0740195c7 2001-10-19 H.J. Lu <hjl@gnu.org>
* elfcode.h (elf_object_p): Don't clear D_PAGED if the section
	size is empty.
2001-10-19 16:29:12 +00:00
H.J. Lu 7595d19387 2001-10-18 H.J. Lu <hjl@gnu.org>
* elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2001-10-19 02:11:04 +00:00
Alan Modra 6c5108aec9 daily update 2001-10-19 00:00:04 +00:00
Jakub Jelinek 25263aad5c * section.c (_bfd_strip_section_from_output): Don't count
SEC_EXCLUDE sections as references.  Set SEC_EXCLUDE.
2001-10-18 08:22:44 +00:00
Alan Modra c080b94227 daily update 2001-10-18 00:00:04 +00:00
Alan Modra 973ffd6335 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
Elf_Internal_Shdr.contents now that it's no longer a PTR.
	* elf-m10300.c (mn10300_elf_relax_section): Likewise.
	* elf32-h8300.c (elf32_h8_relax_section): Likewise.
	* elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
	* elf32-sh.c (sh_elf_relax_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relax_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
	* elf.c (setup_group): Warning fixes.
	* elflink.h (elf_link_sort_relocs): Likewise.
	* pdp11.c (slurp_reloc_table): Likewise.
2001-10-17 12:01:05 +00:00
Jeff Holcomb df22989b95 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
* elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
        casts.
2001-10-17 01:44:10 +00:00
Alan Modra fe68b33ddb daily update 2001-10-17 00:00:04 +00:00
H.J. Lu 1e09179fb7 2001-10-15 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
	for relocations against discarded link-once section.
2001-10-16 06:33:52 +00:00
Alan Modra f45a6ffc19 daily update 2001-10-16 00:00:05 +00:00
Alan Modra cf5c0c5bc6 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
bfd_reloc_outofrange and similar errors.
2001-10-15 12:58:48 +00:00
Alan Modra 1e370bd243 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
rather than ind->weakdef.
	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
	* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
	* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
2001-10-15 09:45:48 +00:00
Alan Modra bbd7ec4a06 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
counts for aliases instead of aborting.
	* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.

	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
	to -1 for non-function symbols.
	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
	* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
	* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
	* elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
	plt.offset instead of plt.refcount when setting to -1.
2001-10-15 07:28:45 +00:00
Alan Modra 616f309768 daily update 2001-10-15 01:16:16 +00:00
Alan Modra 07a796b857 daily update 2001-10-14 00:00:05 +00:00
Alan Modra 7e295ae4db daily update 2001-10-13 00:00:11 +00:00
Nick Clifton 6a360bf4f9 Treat R_ARM_THM_PC22 like R_ARM_PC24. 2001-10-12 11:16:21 +00:00
Alan Modra d4b77c5671 daily update 2001-10-12 00:00:09 +00:00
Alan Modra b58266b5a9 daily update 2001-10-11 00:00:06 +00:00
Jakub Jelinek 290394d607 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
relocations against the same symbol in .rel{,a}.dyn section.
2001-10-10 19:32:02 +00:00
Kazu Hirata 08da05b004 * aout-encap.c: Fix comment typos.
* aoutx.h: Likewise.
	* archive.c: Likewise.
	* bout.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* coffcode.h: Likewise.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
	* coff-mips.c: Likewise.
	* ecoff.c: Likewise.
	* elf32-m32r.c: Likewise.
	* libcoff-in.h: Likewise.
	* libecoff.h: Likewise.
	* libxcoff.h: Likewise.
	* nlm32-i386.c: Likewise.
	* pdp11.c: Likewise.
	* section.c: Likewise.
	* som.c: Likewise.
	* som.h: Likewise.
	* bfd-in2.h: Regenerate.
	* libcoff.h: Likewise.
2001-10-10 12:08:29 +00:00
Alan Modra 079e9a2ffe * elf.c (elf_map_symbols): Don't create new section symbols; Use
existing section syms.  Update comments.
	(copy_private_bfd_data): Formatting fixes.
	(elfcore_grok_win32pstatus): Likewise.
	(swap_out_syms): Likewise.  Remove unnecessary level of braces.
2001-10-10 11:19:54 +00:00
Alan Modra f42a25be0a daily update 2001-10-10 00:00:08 +00:00
Alan Modra 945906ff86 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
"group_name".
	(elf_group_name): Define.
	(elf_next_in_group): Define.
	* elf.c: Make use of elf_group_name and elf_next_in_group throughout.
	(setup_group): Don't use sec->lineno for SHT_GROUP section to store
	first member section; Instead use elf_next_in_group.
	(bfd_section_from_shdr): Likewise.
	(set_group_contents): Likewise.  Use elf_section_syms, not sec->symbol.
2001-10-09 13:12:19 +00:00
Alan Modra dbb410c3e2 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
"next_in_group".  Fix gp and gp_size comments.
	* elf.c (union elf_internal_group): New.
	(setup_group): New function.
	(_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
	Call setup_group for SHF_GROUP sections.
	(bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
	(elf_fake_sections): Set header type for SEC_GROUP, and header
	flags for sections in a group.
	(set_group_contents): New function.
	(_bfd_elf_compute_section_file_positions): Call it.
	(assign_section_numbers): Set sh_link for SHT_GROUP.
	* elflink.h (gc_mark_hook): Handle section groups.
	* elfxx-target.h: Add SEC_GROUP to applicable_flags.
	* section.c (SEC_GROUP): Define.
	(struct sec): Comment fixes.
	* bfd-in2.h: Regenerate.

	* elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
	out of function args.
	(_bfd_elf_canonicalize_reloc): Similarly.
	(_bfd_elf_get_symtab): Here too.
	(_bfd_elf_canonicalize_dynamic_symtab): And here.
	* elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
	bfd_bread, and remove unnecessary cast.
2001-10-09 06:05:17 +00:00
Aldy Hernandez 24c603fab2 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf. 2001-10-08 19:11:36 +00:00
Alan Modra 7f0b3a8f8d daily update 2001-10-07 00:00:06 +00:00
Stephane Carrez 3f5864e1f4 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
compilation unit.
2001-10-06 10:01:09 +00:00
Alan Modra aec2f56188 * bfd.c (bfd_assert): Report bfd version.
(_bfd_abort): Likewise.
2001-10-06 07:40:44 +00:00
Alan Modra 50b4d48631 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
section sym values.  Instead replace any relocs against them with
	relocs against STN_UNDEF, which has a zero value.
2001-10-06 07:25:40 +00:00
Alan Modra fb9ceeac4e * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
relocs.
2001-10-06 06:41:47 +00:00
Alan Modra 55e369b374 daily update 2001-10-06 00:00:07 +00:00
Jeff Law 1761749581 * som.h (som_exec_data): New field "version_id".
* som.c (som_object_setup): Record the version_id if it
        exists.
        (som_prep_headers): Do not initialize version_id here.
        (som_finish_writing): Initialize version_id here.
2001-10-05 21:55:12 +00:00
Thiemo Seufer 7e766c3b49 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
according to the MIPS/SGI ELF64 ABI Draft.
	(mips_elf_sort_hash_table): Typo.
2001-10-05 16:14:39 +00:00
Alan Modra 5abe4e058f daily update 2001-10-05 00:00:06 +00:00
Alan Modra 8ea52284ab Fix a comment typo in last commit. 2001-10-04 16:18:32 +00:00
Alan Modra 58e3d09d2a * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
copying flags if this is a weakdef.
2001-10-04 16:09:03 +00:00
Alan Modra d828d54ea4 somehow missed committing this.
* dep-in.sed: Remove symcat.h from dependencies.
2001-10-04 15:37:38 +00:00
Alan Modra a90b9fca6f * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
packing.
2001-10-04 12:30:26 +00:00
Alan Modra 3a6b859720 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
to 1 rather than 0 to avoid confusing copy_indirect_symbol.
	(mips_elf_sort_hash_table_f): Compare got.offset against 1.
2001-10-04 05:50:29 +00:00
Alan Modra b13c7b49d6 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
	backends we configure.  Run "make dep-am".
	(install-data-local): Install symcat.h.
	* dep-in.sed: Remove symcat.h from dependencies.
	* Makefile.in: Regenerate.
2001-10-04 05:40:43 +00:00
Alan Modra ad681e7b5f daily update 2001-10-04 00:03:26 +00:00
Alan Modra 8bd621d883 Add support for -z nocopyreloc. 2001-10-03 15:11:48 +00:00
Thiemo Seufer 1e2be829b6 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
(elf_backend_default_use_rela_p): New define.
2001-10-03 14:12:12 +00:00
Alan Modra 57c7194e0e * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
change.
2001-10-03 13:16:18 +00:00
Alan Modra 87b632fc07 bfd/ChangeLog
* configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
	* configure: Regenerate.
	* Makefile.am (BFD_H_FILES): Add version.h.
	* Makefile.in: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.

bfd/doc/ChangeLog
	* Makefile.am (BFD_H_DEP): Add ../version.h.
	* Makefile.in: Regenerate.
2001-10-03 12:29:10 +00:00
Alan Modra 0a991dfe0d * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
elf_backend_copy_indirect_symbol so that backend has a chance to
	copy other necessary fields.
	* elf-bfd.h (struct elf_backend_data): Update description of
	elf_backend_copy_indirect_symbol.
	* elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
	copying flags if this is a weakdef.
	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
	(elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
	than bfd_link_hash_lookup.
	* elf32-i386 (elf_i386_adjust_dynamic_symbol): Don't do copy
	reloc processing for weakdefs.
	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2001-10-03 08:33:18 +00:00
Alan Modra 7997c6eaf4 daily update 2001-10-03 02:02:26 +00:00
Nick Clifton ea04a8f6ec Fix (for the last time, I hope) handling of R_ARC_B22_PCREL. 2001-10-02 14:28:42 +00:00
Alan Modra a33d1f7775 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
result of ELF64_R_TYPE to enum before using in a switch.
	(ppc64_elf_gc_mark_hook): Likewise.
	(ppc64_elf_gc_sweep_hook): Likewise.
	(ppc64_elf_reloc_type_class): Likewise.
2001-10-02 09:22:46 +00:00
Alan Modra 8c96f6f4c8 * Makefile.in: Regenerate. 2001-10-02 05:59:30 +00:00
Alan Modra e43d48ccc3 * version.h: New file.
* bfd-in.h: (BFD_VERSION): Substitute bfd_version.
	(BFD_VERSION_DATE): Define.
	(BFD_VERSION_STRING): Define.
	* configure.in: AC_SUBST bfd_version, bfd_version_date and
	bfd_version_string.
	(AC_OUTPUT <bfd-in3.h>): Depend on version.h.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* Makefile.am: Run "make dep-am"
	* Makefile.in: Regenerate.

	* bfd-in.h: Include "symcat.h".
	(CONCAT4): Redefine as for old CAT4.
	* aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
	Add warning regarding whitespace.
	* aout-cris.c: Likewise.
	* aout-ns32k.c: Likewise.
	* aout-sparcle.c: Likewise.
	* aout-tic30.c: Likewise.
	* aout0.c: Likewise.
	* armnetbsd.c: Likewise.
	* demo64.c: Likewise.
	* elf-bfd.h: Likewise.
	* gen-aout.c: Likewise.
	* host-aout.c: Likewise.
	* hp300bsd.c: Likewise.
	* hp300hpux.c: Likewise.
	* i386aout.c: Likewise.
	* i386bsd.c: Likewise.
	* i386dynix.c: Likewise.
	* i386freebsd.c: Likewise.
	* i386linux.c: Likewise.
	* i386lynx.c: Likewise.
	* i386mach3.c: Likewise.
	* i386netbsd.c: Likewise.
	* libaout.h: Likewise.
	* m68k4knetbsd.c: Likewise.
	* m68klinux.c: Likewise.
	* m68klynx.c: Likewise.
	* m68knetbsd.c: Likewise.
	* m88kmach3.c: Likewise.
	* mipsbsd.c: Likewise.
	* newsos3.c: Likewise.
	* ns32knetbsd.c: Likewise.
	* pc532-mach.c: Likewise.
	* pdp11.c: Likewise.
	* riscix.c: Likewise.
	* sparclinux.c: Likewise.
	* sparclynx.c: Likewise.
	* sparcnetbsd.c: Likewise.
	* sunos.c: Likewise.
	* targets.c: Likewise.
	* vaxnetbsd.c: Likewise.
	* vms-hdr.c: Likewise.
2001-10-02 05:58:41 +00:00
Alan Modra 4eef72c77d bfd/
* bfd-in.h: Remove comments regarding generated files.
	* libbfd-in.h: Likewise.
	* libcoff-in.h: Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Likewise.
	* libcoff.h: Likewise.
bfd/doc/
	* header.sed: New file, adds header to generated files.
	* Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and
	bfd.h, using above.  Add missing elf.c dependecy for libbfd.h.
	* Makefile.in: Regenerate.
2001-10-01 14:03:36 +00:00
Hans-Peter Nilsson 146be91a2b * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
partial_inplace, matching assembler output.  Set src_mask to
	all ones.
	(sh_elf_relocate_section): Delete misplaced comment.
	For relocatable linking against section symbol, call
	_bfd_relocate_contents for partial_inplace relocs and adjust
	rel->r_addend for others.
	<case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
	bfd_get_32, not at rel->r_addend.
2001-10-01 00:16:27 +00:00