Commit Graph

1637 Commits

Author SHA1 Message Date
Alan Modra 4ca8c9918e daily update 2002-03-09 23:00:04 +00:00
Alan Modra f8df66b8a2 daily update 2002-03-08 23:00:10 +00:00
Alan Modra b136a9a81a daily update 2002-03-07 23:00:05 +00:00
H.J. Lu aa066ac86a 2002-03-07 H.J. Lu (hjl@gnu.org)
* coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
	as the type for bfd_reloc_val.
2002-03-07 18:11:20 +00:00
Alan Modra d132f12d12 daily update 2002-03-06 23:00:03 +00:00
Alan Modra faef23a1a9 daily update 2002-03-05 23:00:06 +00:00
Jeff Law 1bf425384c 2002-02-26 John David Anglin <dave@hiauly1.hia.nrc.ca>
* bfd/elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
	(elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
	(elf_hppa_final_link_relocate): Correct relocations for indirect
	references to local data through the DLT.  Fix .opd creation for
	local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
	relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
	R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
	"Processor-Specific ELF for PA_RISC, Version 1.43" document.
	Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
	* bfd/elf32-hppa.c (final_link_relocate): Revise relocation selectors
	as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2002-03-05 17:55:55 +00:00
Jakub Jelinek 86eaf01e5d * merge.c (_bfd_merge_sections): Don't segfault if there
is nothing to merge due to GC.
2002-03-05 12:19:08 +00:00
Alan Modra 5f6aa755b6 typo fix 2002-03-05 05:26:02 +00:00
Alan Modra 039cc25f06 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
symbols that have been forced local.
2002-03-05 05:25:13 +00:00
Alan Modra c44233aab3 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
to output forced local syms for non-shared link.
	(elf_link_output_extsym): Tweak condition for calling backend
	adjust_dynamic_symbol so that previous behaviour is kept.
2002-03-05 05:18:41 +00:00
Alan Modra 69b5fcecc0 daily update 2002-03-04 23:00:05 +00:00
H.J. Lu 25e2787005 2002-03-04 H.J. Lu <hjl@gnu.org>
* elf.c (bfd_section_from_shdr): Handle special sections,
	.init_array, .fini_array and .preinit_array.
	(elf_fake_sections): Likewise.

	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
	DT entry only if the section is in output for .init_array,
	.fini_array and .preinit_array. Complain about .preinit_array
	section in DSO.
	(elf_bfd_final_link): Warn zero size for .init_array,
	.fini_array and .preinit_array sections.

	* elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
	SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
	(elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
	.preinit_array.
2002-03-04 20:41:55 +00:00
Alan Modra bb2a49f247 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
* configure: Regenerate.
2002-03-04 01:16:53 +00:00
Alan Modra 55b7b3553c daily update 2002-03-03 23:00:04 +00:00
Alan Modra d87d25fb0b daily update 2002-03-02 23:00:04 +00:00
Tom Rix 38487e5ed3 Replace immediate howto type initializers with symbolic. 2002-03-02 13:23:57 +00:00
Richard Henderson 30831527a4 * elflink.h (size_dynamic_sections): If section named
".preinit_array" exists, create DT_PREINIT_ARRAY and
        DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
        ".init_array" and ".fini_array".
        (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
        DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
        DT_FINI_ARRAY.
2002-03-02 01:24:50 +00:00
Alan Modra b709a56406 daily update 2002-03-01 23:00:06 +00:00
Alan Modra 728a51ce47 daily update 2002-02-27 23:00:06 +00:00
Alan Modra 400322688f daily update 2002-02-26 23:00:05 +00:00
Alan Modra c8e5ddc83f * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
dynsyms.
2002-02-25 23:31:22 +00:00
Alan Modra 4bcb061667 daily update 2002-02-25 23:00:05 +00:00
Alan Modra 1c5b6bf8e6 * elf64-hppa.h: Update copyright date. 2002-02-25 05:09:11 +00:00
Alan Modra 96e0dda4c4 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
(ppc64_elf_relocate_section): Don't generate power4 style branch
	hints for *_BRTAKEN and *_BRNTAKEN relocs.
2002-02-25 03:44:16 +00:00
Alan Modra 089fef2345 daily update 2002-02-24 23:00:05 +00:00
Alan Modra b483e0a43f daily update 2002-02-23 23:00:05 +00:00
Alan Modra 7e10950aff daily update 2002-02-22 23:00:05 +00:00
David O'Brien 0a6958db0e The "2002-02-05 Alan Modra <amodra@bigpond.net.au>" commit also affected
elf32-i386.c
2002-02-22 20:36:12 +00:00
Jakub Jelinek 0fb19cbc9a * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
last patch.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2002-02-22 10:03:03 +00:00
Alan Modra 26144e7f66 daily update 2002-02-21 23:00:05 +00:00
Andreas Jaeger c434dee664 * elf64-x86-64.c: Major rework that introduces all recent changes
to the x86-64 backend.  Get a closer match to elf32-i386.
	(struct elf64_x86_64_dyn_relocs): Rename from
	elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
	all users.
	(struct elf64_x86_64_link_hash_table): Add short cuts to some
	sections.
	(link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
	remove casts, initialize new hash members.
	(create_got_section): New.
	(elf64_x86_64_create_dynamic_sections): New.
	(elf64_x86_64_copy_indirect_symbol): New.
	(elf64_x86_64_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.  Cache
	pointer to "sreloc" section in elf_section_data. Tweak condition
	under which .got created.  Report files with bad relocation
	section names.
	(elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
	Reference count possible .plt entries.  Don't deallocate .got and
	.relgot space here.
	(elf64_x86_64_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.
	(WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
	(allocate_dynrelocs): New.
	(readonly_dynrelocs): New.
	(elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
	Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
	Zero out the dynamic allocated content space.
	(elf64_x86_64_discard_copies): Removed.
	(elf64_x86_64_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.
	(elf64_x86_64_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 relocate_section.  Expand
	SHN_UNDEF comment.  Move expressions out of function calls.
	Replace BFD_ASSERT with abort.
	(bfd_elf64_bfd_final_link): Removed.
	(elf_backend_copy_indirect_symbol): Define.
2002-02-21 15:31:53 +00:00
Tom Rix ff3a6ee3fd XCOFF booke tests. Fix tlbre, tlbwe ppc WS field. 2002-02-21 03:57:36 +00:00
Alan Modra 5d6044d74a daily update 2002-02-20 23:00:04 +00:00
Alan Modra a68d41fb45 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
little endian.
2002-02-20 12:42:38 +00:00
Alan Modra 7230504575 daily update 2002-02-19 23:00:03 +00:00
Martin Schwidefsky befc3abbed 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
	(bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
	* bfd-in2.h: Regenerate.
	* cpu-s390.c (arch_info_struct): Use renamed architecture defines.
	Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
	with "s390:64-bit".
	* elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
	(elf_s390_reloc_type_lookup): Likewise.
	(elf_s390_check_relocs): Likewise.
	(elf_s390_gc_sweep_hook): Likewise.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_object_p): Use renamed architecture define.
	* elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2002-02-19 18:22:16 +00:00
Frank Ch. Eigler 6eeeec9bb2 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
* syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
2002-02-19 16:33:04 +00:00
Jakub Jelinek 0bb2d96afe * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
absptr -> pcrel optimization for shared libs.
	Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
	library cannot be converted to pcrel.
	(_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
	relative.
	* elf32-i386.c (elf_i386_relocate_section): If
	_bfd_elf_section_offset returned -2, skip, but make sure the
	relocation is installed.
	* elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
	* elf64-sparc.c	(sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Handle
	_bfd_elf_section_offset returning -2 the same way as -1.
	* elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
	* elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
	and BFD_ASSERT.
	* elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2002-02-19 12:40:32 +00:00
Tom Rix 69f284c74e Add support for -brtl, run time linking, to AIX ld. 2002-02-19 05:01:40 +00:00
Alan Modra e7a13aba80 daily update 2002-02-18 23:00:06 +00:00
Alan Modra 82bd7b59c9 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
(struct ppc_link_hash_table): Add sfpr.
	(ppc64_elf_link_hash_table_create): Init it.
	(ppc64_elf_create_dynamic_sections): Split creation of .stub and
	.glink out to..
	(create_linkage_sections): ..here.  Make .sfpr too.
	(ppc64_elf_check_relocs): Call create_linkage_sections, and set
	dynobj early.
	(MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
	(ppc64_elf_func_desc_adjust): Look for missing ._savef* and
	._restf* functions, and create as needed.
	(func_desc_adjust): Only force_local for shared libs.

	* emulparams/elf64ppc.sh (OTHER_TEXT_SECTIONS): Define.
2002-02-18 12:40:28 +00:00
Nick Clifton ef1355e8a0 Bump version number to 2.12.90 2002-02-18 12:16:55 +00:00
Alan Modra 61e90e2c28 daily update 2002-02-17 23:00:04 +00:00
Hans-Peter Nilsson dfa36a690b * mmo.c: Correct and improve comments.
(mmo_write_chunk): Store trailing byte in bfd buffer; don't
	zero-pad.  Use input to fill up non-empty bfd buffer.
	(mmo_flush_chunk): New function.
	(mmo_write_loc_chunk): Add parameter last_vmap, all callers
	changed.  Don't emit location specifier if VMA is same as
	*LAST_VMAP after omitting leading zero contents.  Call
	mmo_flush_chunk before emitting location specifier.
	(mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
	with mmo_write_loc_chunk calls.
	(mmo_internal_write_section): Call mmo_flush_chunk after
	mmo_write_chunk.
	(mmo_write_symbols_and_terminator): Move :Main to first position
	in symbol array.  Add faked one if it does not exist if there are
	other symbols.  Don't add it if there are no symbols at all.  Move
	out test for value of :Main from symbol loop.  Rename table
	fakemain to maintable and variable mainsym to fakemain.
2002-02-17 21:18:33 +00:00
Alan Modra 5d6e06d90f daily update 2002-02-16 23:00:05 +00:00
Alan Modra c00812a2c8 daily update 2002-02-15 23:00:03 +00:00
Richard Henderson ccf00ab6a1 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
section with no got matches any got.  Simplify error generaion.
2002-02-15 21:26:05 +00:00
Alan Modra fd96f80fc8 Support arbitrary length fill patterns.
* linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
	(_bfd_default_link_order): Remove bfd_fill_link_order code.
	Call default_data_link_order.
	(default_fill_link_order): Delete.
	(default_data_link_order): New function.
	* elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
	of bfd_fill_link_order with bfd_data_link_order.
	* elf64-alpha.c (elf64_alpha_final_link): Likewise.
	* elf64-mips.c (mips_elf64_final_link): Likewise.
2002-02-15 02:10:35 +00:00
Alan Modra 88eaccc28e * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
Correct value returned in "end" for "0x<non-hex>".
2002-02-15 00:20:17 +00:00