Commit Graph

3984 Commits

Author SHA1 Message Date
H.J. Lu 3f65f59941 Don't optimize relocation against _DYNAMIC
bfd/

	* elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
	_DYNAMIC.
	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.

ld/testsuite/

	* ld-i386/i386.exp: Run mov1a, mov1b.
	* ld-x86-64/x86-64.exp: Run mov1a, mov1b, mov1c, mov1d.

	* ld-i386/mov1.s: New file.
	* ld-i386/mov1a.d: Likewise.
	* ld-i386/mov1b.d: Likewise.
	* ld-x86-64/mov1.s: Likewise.
	* ld-x86-64/mov1a.d: Likewise.
	* ld-x86-64/mov1b.d: Likewise.
	* ld-x86-64/mov1c.d: Likewise.
	* ld-x86-64/mov1d.d: Likewise.
2012-09-01 02:50:14 +00:00
H.J. Lu daa6760707 Convert mov to lea in size_dynamic_sections
bfd/

	* elf32-i386.c (elf_i386_convert_mov_to_lea): New.
	(elf_i386_size_dynamic_sections): Use it on input sections.
	(elf_i386_relocate_section): Don't convert
	"mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols here.

	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
	(elf_x86_64_size_dynamic_sections): Use it on input sections.
	(elf_x86_64_relocate_section): Don't convert
	"mov foo@GOTPCREL(%rip), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols.

ld/testsuite/

	* ld-i386/i386.exp: Run lea1d, lea1f, lea1f.
	* ld-x86-64/x86-64.exp: Run lea1g, lea1h, lea1i, lea1j, lea1k,
	lea1l.

	* ld-ifunc/ifunc-13-i386.d: Remove R_386_RELATIVE entry.

	* ld-i386/lea1d.d: New file.
	* ld-i386/lea1e.d: Likewise.
	* ld-i386/lea1f.d: Likewise.
	* ld-x86-64/lea1g.d: Likewise.
	* ld-x86-64/lea1h.d: Likewise.
	* ld-x86-64/lea1i.d: Likewise.
	* ld-x86-64/lea1j.d: Likewise.
	* ld-x86-64/lea1k.d: Likewise.
	* ld-x86-64/lea1l.d: Likewise.
2012-08-31 20:41:41 +00:00
H.J. Lu 80d873266d Convert mov to lea for loading local function address
bfd/

	* elf32-i386.c (elf_i386_relocate_section): Convert
	"mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
	for local symbols.

	* elf64-x86-64.c (elf_x86_64_relocate_section): Convert
	"mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
	for local symbols.

ld/testsuite/

	* ld-i386/i386.exp: Run lea1a, lea1b, lea1c.
	* ld-x86-64/x86-64.exp: Run lea1a, lea1b, lea1c, lea1d, lea1e,
	lea1f.

	* ld-i386/lea1.s: New file.
	* ld-i386/lea1a.d: Likewise.
	* ld-i386/lea1b.d: Likewise.
	* ld-i386/lea1c.d: Likewise.
	* ld-x86-64/lea1.s: Likewise.
	* ld-x86-64/lea1a.d: Likewise.
	* ld-x86-64/lea1b.d: Likewise.
	* ld-x86-64/lea1c.d: Likewise.
	* ld-x86-64/lea1d.d: Likewise.
	* ld-x86-64/lea1e.d: Likewise.
	* ld-x86-64/lea1f.d: Likewise.
2012-08-31 04:26:17 +00:00
H.J. Lu 11cba4accf Provide __executable_start for PIE
ld/

	PR ld/14525
	* scripttempl/elf.sc: Also provide __executable_start for PIE.

ld/testsuite/

	PR ld/14525
	* ld-elf/elf.exp: Run pr14525.

	* ld-elf/pr14525.c: New.
	* ld-elf/pr14525.out: Likewise.
2012-08-31 02:52:14 +00:00
Maciej W. Rozycki a521a3297b * ld-elf/export-class.sd: New test.
* ld-elf/export-class.vd: New test.
	* ld-elf/export-class-def.s: New test source.
	* ld-elf/export-class-dep.s: New test source.
	* ld-elf/export-class-lib.s: New test source.
	* ld-elf/export-class-ref.s: New test source.
	* ld-elf/export-class-lib.ver: New test version script.
	* ld-elf/export-class.exp: New test script.
	* ld-arm/arm-export-class.rd: New test.
	* ld-arm/arm-export-class.xd: New test.
	* ld-arm/export-class.exp: New test script.
	* ld-i386/i386-export-class.rd: New test.
	* ld-i386/i386-export-class.xd: New test.
	* ld-i386/export-class.exp: New test script.
	* ld-mips-elf/mips-32-export-class.rd: New test.
	* ld-mips-elf/mips-32-export-class.xd: New test.
	* ld-mips-elf/mips-64-export-class.rd: New test.
	* ld-mips-elf/mips-64-export-class.xd: New test.
	* ld-mips-elf/export-class.exp: New test script.
	* ld-powerpc/powerpc-32-export-class.rd: New test.
	* ld-powerpc/powerpc-32-export-class.xd: New test.
	* ld-powerpc/powerpc-64-export-class.rd: New test.
	* ld-powerpc/powerpc-64-export-class.xd: New test.
	* ld-powerpc/export-class.exp: New test script.
	* ld-x86-64/x86-64-64-export-class.rd: New test.
	* ld-x86-64/x86-64-x32-export-class.rd: New test.
	* ld-x86-64/export-class.exp: New test script.
2012-08-28 20:29:19 +00:00
H.J. Lu 92a289b380 Use failif on ld-elf/exclude3 tests
* ld-elf/exclude3a.d: Remove target and use failif.

	* ld-elf/exclude3b.d: Change target to *-*-linux* *-*-gnu* and
	use failif

	* ld-elf/exclude3d.d: Removed.
2012-08-24 18:24:52 +00:00
H.J. Lu 5cc5186427 Add Solaris/x86-64 support to eh[1-4] test
* ld-elf/elf.exp: Add Solaris/x86-64 support to eh[1-4] test.
2012-08-24 18:20:40 +00:00
Matthew Gretton-Dann bca3892142 * bfd/elf32-arm.c (v8): New array.
(tag_cpu_arch_combine): Add support for ARMv8 attributes.
	(elf32_arm_merge_eabi_attributes): Likewise.
	(VFP_VERSION_COUNT): New define.
	* binutils/readelf.c (arm_attr_tag_CPU_arch): Update for ARMv8.
	(arm_attr_tag_FP_arch): Likewise.
	(arm_attr_tag_Advanced_SIMD_arch): Likewise.
	* gas/config/tc-arm.h (arm_ext_v8): New variable.
	(fpu_vfp_ext_armv8): Likewise.
	(fpu_neon_ext_armv8): Likewise.
	(fpu_crypto_ext_armv8): Likewise.
	(arm_archs): Add armv8-a.
	(arm_extensions): Add crypto, fp, and simd.
	(arm_fpus): Add fp-armv8, neon-fp-armv8, crypto-neon-fp-armv8.
	(cpu_arch_ver): Add support for ARMv8.
	(aeabi_set_public_sttributes): Likewise.
	* gas/doc/c-arm.texi (ARM Options): Document new architecture and
	extension options for ARMv8.
	* gas/testsuite/gas/arm/attr-march-all.d: Update for change in expected
	output.
	* gas/testsuite/gas/arm/attr-mfpu-vfpv4-d16.d: Likewise.
	* gas/testsuite/gas/arm/attr-mfpu-vfpv4.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a+crypto.d: New testcase.
	* gas/testsuite/gas/arm/attr-march-armv8-a+fp.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a+simd.d: Likewise.
	* gas/testsuite/gas/arm/attr-march-armv8-a.d: Likewise.
	* include/elf/arm.h (TAG_CPU_ARCH_V8): New define.
	(MAX_TAG_CPU_ARCH): Update.
	* include/opcode/arm.h (ARM_EXT_V8): New define.
	(FPU_VFP_EXT_ARMV8): Likewise.
	(FPU_NEON_EXT_ARMV8): Likewise.
	(FPU_CRYPTO_EXT_ARMV8): Likewise.
	(ARM_AEXT_V8A): Likewise.
	(FPU_VFP_ARMV8): Likwise.
	(FPU_NEON_ARMV8): Likewise.
	(FPU_CRYPTO_ARMV8): Likewise.
	(FPU_ARCH_VFP_ARMV8): Likewise.
	(FPU_ARCH_NEON_VFP_ARMV8): Likewise.
	(FPU_ARCH_CRYPTO_NEON_VFP_ARMV8): Likewise.
	(ARM_ARCH_V8A): Likwise.
	(ARM_ARCH_V8A_FP): Likewise.
	(ARM_ARCH_V8A_SIMD): Likewise.
	(ARM_ARCH_V8A_CRYPTO): Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Add new testcases.
	* ld/testsuite/ld-arm/attr-merge-vfp-3.d: Update for change in expected
	output.
	* ld/testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-4.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-5.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-7.d: New testcase.
	* ld/testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-armv8-hard.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-vfp-armv8.s: Likewise.
2012-08-24 07:50:38 +00:00
Nick Clifton da2bb5602c Move aarch64 announcement into 2.23 section. 2012-08-22 07:35:36 +00:00
Kai Tietz ee8206a9d3 PR ld/14326
* scripttempl/pe.sc: Add _etext symbol.
2012-08-17 16:33:03 +00:00
Nick Clifton 3e4fe8ac14 oops - accidentally omitted from previous delta 2012-08-14 12:10:12 +00:00
Nick Clifton 63a79b61fd Updated Ukranian translations. 2012-08-14 11:59:05 +00:00
Nick Clifton b9b2ae8bbf PR ld/14265
* script-sections.cc (Sections_element::output_section_name): Add
	keep return parameter.
	(Output_section_element::match_name): Add keep return parameter.
	Return the value of the keep_ member.
	* script-sections.h (class Output_section): Update
	output_section_name prototype.
	* layout.cc (Layout::keep_input_section): New public member
	function.
	(Layout::choose_output_section): Pass keep parameter to
	output_section_name.
	* layout.h (class Layout): Add keep_input_section.
	* object.cc (Sized_relobj_file::do_layout): Check for kept input
	sections.
	* testsuite/Makefile.am: Add a test.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/pr14265.c: Source file for the test.
	* testsuite/pr14265.t: Linker script for the test.
	* testsuite/pr14265.sh: Shell script for the test.

	* ld-gc/gc.exp: Add a new test.
	* ld-gc/pr14265.c: Source file for the new test.
	* ld-gc/pr14265.t: Linker script for the new test.
	* ld-gc/pr14265.d: Expected symbol dump.
2012-08-14 08:31:57 +00:00
Maciej W. Rozycki 9b11fa1a85 * ld-mips-elf/export-class-call16-o32.dd: New test.
* ld-mips-elf/export-class-call16-o32-irix.dd: New test.
	* ld-mips-elf/export-class-call16-o32.gd: New test.
	* ld-mips-elf/export-class-call16-n32.dd: New test.
	* ld-mips-elf/export-class-call16-n32.gd: New test.
	* ld-mips-elf/export-class-call16-n64.dd: New test.
	* ld-mips-elf/export-class-call16-n64.gd: New test.
	* ld-mips-elf/export-class-call16-def.s: New test source.
	* ld-mips-elf/export-class-call16-o32.s: New test source.
	* ld-mips-elf/export-class-call16-n32.s: New test source.
	* ld-mips-elf/export-class-call16-n64.s: New test source.
	* ld-mips-elf/export-class-call16.ld: New test linker script.
	* ld-mips-elf/mips-elf.exp: Run the new tests.
2012-08-13 19:52:59 +00:00
Nick Clifton 7ae2b96118 oops, aciidental commit 2012-08-13 14:54:15 +00:00
Nick Clifton a06ea96464 Add support for 64-bit ARM architecture: AArch64 2012-08-13 14:52:54 +00:00
Nick Clifton 3c892704a9 Updated Vietnamese translation. 2012-08-09 14:46:44 +00:00
Nick Clifton a988325c24 * config/tc-i386.c (lex_got): Provide implementation for PE
format.

	* gas/i386/secrel.s: Add test of <symbol>@SECREL32.
	* gas/i386/secrel.d: Add expected disassembly.

	* scripttempl/pe.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.
	* scripttempl/pep.sc (R_TLS): Add .tls$AAA and .tls$ZZZ.

	* archive.c (_bfd_delete_archive_data): New function.
	* libbfd-in.h (_bfd_delete_archive_data): Declare.
	* libbfd.h: Rebuild.
	* opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
2012-08-07 13:47:19 +00:00
Nick Clifton 5125d2b040 Updated Ukranian and Japanese translations. 2012-08-07 10:37:31 +00:00
Maciej W. Rozycki 889acb80ac * ld-mips-elf/dyn-sec64.ld: Use HIDDEN to define _gp.
* ld-mips-elf/eh-frame5.ld: Likewise.
	* ld-mips-elf/got-dump-1.ld: Likewise.
	* ld-mips-elf/got-dump-2.ld: Likewise.
	* ld-mips-elf/got-page-1.ld: Likewise.
	* ld-mips-elf/mips-dyn.ld: Likewise.
	* ld-mips-elf/mips-lib.ld: Likewise.
	* ld-mips-elf/mips16-pic-1.ld: Likewise.
	* ld-mips-elf/no-shared-1.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-1.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-3a.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-3b.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-4b.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-5b.ld: Likewise.
	* ld-mips-elf/pic-and-nonpic-6.ld: Likewise.
	* ld-mips-elf/reloc-2.ld: Likewise.
	* ld-mips-elf/reloc-estimate-1.ld: Likewise.
	* ld-mips-elf/stub-dynsym-1.ld: Likewise.
	* ld-mips-elf/tls-hidden3.ld: Likewise.
	* ld-mips-elf/mips16-pic-2.ad: Update accordingly.
	* ld-mips-elf/pic-and-nonpic-3b.ad: Likewise.
	* ld-mips-elf/pic-and-nonpic-4b.ad: Likewise.
	* ld-mips-elf/pic-and-nonpic-5b.ad: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n32.ad: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n64.ad: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-o32.ad: Likewise.
	* ld-mips-elf/eh-frame5.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-1.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-2.d: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.d: Likewise.
	* ld-mips-elf/tlsdyn-o32.d: Likewise.
	* ld-mips-elf/pic-and-nonpic-3a.dd: Likewise.
	* ld-mips-elf/pic-and-nonpic-3b.dd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n32.dd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n64.dd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-o32.dd: Likewise.
	* ld-mips-elf/tls-multi-got-1.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-1.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-2.got: Likewise.
	* ld-mips-elf/tlsdyn-o32-3.got: Likewise.
	* ld-mips-elf/tlsdyn-o32.got: Likewise.
	* ld-mips-elf/tlslib-o32-ver.got: Likewise.
	* ld-mips-elf/tlslib-o32.got: Likewise.
	* ld-mips-elf/mips16-pic-2.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-1.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-3b.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-4b.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-5b.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n32.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-n64.nd: Likewise.
	* ld-mips-elf/pic-and-nonpic-6-o32.nd: Likewise.
	* ld-mips-elf/tls-multi-got-1.r: Likewise.
	* ld-mips-elf/pic-and-nonpic-3b.rd: Likewise.
	* ld-mips-elf/pic-and-nonpic-4b.rd: Likewise.
	* ld-mips-elf/mips-elf.exp: Likewise.
2012-08-06 22:50:07 +00:00
Maciej W. Rozycki 43b5366be5 * ld-mips-elf/gp-hidden.rd: New test.
* ld-mips-elf/gp-hidden.sd: New test.
	* ld-mips-elf/gp-hidden-lib.rd: New test.
	* ld-mips-elf/gp-hidden-ver.rd: New test.
	* ld-mips-elf/gp-hidden-64.rd: New test.
	* ld-mips-elf/gp-hidden-lib-64.rd: New test.
	* ld-mips-elf/gp-hidden-ver-64.rd: New test.
	* ld-mips-elf/gp-hidden.s: New test source.
	* ld-mips-elf/gp-hidden-lib.s: New test source.
	* ld-mips-elf/gp-hidden-ver.s: New test source.
	* ld-mips-elf/gp-hidden-ver.ver: New test version script.
	* ld-mips-elf/mips-elf.exp: Run the new tests.
2012-08-06 22:45:18 +00:00
Maciej W. Rozycki 9e8082845f ld/
* emulparams/elf32bmip.sh: Make _gp hidden.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emulparams/elf32mipswindiss.sh: Likewise.
	* scripttempl/mips.sc: Likewise.

	ld/testsuite/
	* ld-mips-elf/rel32-o32.d: Adjust section VMAs after the removal
	of _gp from the global scope.
	* ld-mips-elf/rel32-n32.d: Likewise.
	* ld-mips-elf/rel64.d: Likewise.
2012-08-06 22:40:36 +00:00
Maciej W. Rozycki eb8476a6e2 bfd/
* elflink.c (bfd_elf_record_link_assignment): Remove --defsym
	symbols special case.

	ld/
	* ldexp.h (etree_union): Add defsym member to the assign member
	structure.
	(exp_assign): Add hidden argument to prototype.
	* ldexp.c (exp_fold_tree_1): Use the defsym member to handle
	--defsym symbols.
	(exp_assop): Add defsym argument, initialize the defsym member
	of the assign structure.
	(exp_assign): Handle hidden symbols.
	(exp_defsym): Update to use the defsym argument to exp_assop.
	(exp_provide): Update to handle the defsym argument to exp_assop.
	* ldlex.l (HIDDEN): New token.
	* ldgram.y (HIDDEN): Likewise.
	(assignment, section): Update calls to exp_assign.
	* ldctor.c (ldctor_build_sets): Likewise.
	* mri.c (mri_format): Likewise.
	* ldlang.c (lang_insert_orphan, lang_leave_overlay): Likewise.
	(open_input_bfds): Remove --defsym symbols special case.
	* emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Update
	call to exp_assign.
	* emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
	* emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
	* emultempl/spuelf.em (spu_place_special_section): Likewise.
	* emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets):
	Likewise.
	* ld.texinfo (Assigning Values to Symbols): Add HIDDEN.
	(HIDDEN): New subsection.
2012-08-06 22:27:52 +00:00
Maciej W. Rozycki 99262e37ef gas/testsuite/
* gas/mips/mips.exp: Set has_newabi for all Linux targets.
	* gas/mips/cfi-n64-1.d: Adjust for targets that do not infer the
	ISA from the ABI.
	* gas/mips/elf-rel-got-n32.d: Likewise.
	* gas/mips/elf-rel-got-n64.d: Likewise.
	* gas/mips/elf-rel-xgot-n32.d: Likewise.
	* gas/mips/elf-rel-xgot-n64.d: Likewise.
	* gas/mips/elf-rel18.d: Likewise.
	* gas/mips/elf-rel28-n32.d: Likewise.
	* gas/mips/elf-rel28-n64.d: Likewise.
	* gas/mips/jal-newabi.d: Likewise.
	* gas/mips/ldstla-n64-shared.d: Likewise.
	* gas/mips/ldstla-n64-sym32.d: Likewise.
	* gas/mips/ldstla-n64.d: Likewise.
	* gas/mips/macro-warn-1-n32.d: Likewise.
	* gas/mips/macro-warn-2-n32.d: Likewise.
	* gas/mips/n32-consec.d: Likewise.

	ld/testsuite/
	* ld-mips-elf/mips-elf.exp: Set has_newabi for all Linux targets.
	Adjust abi_asflags for targets that do not infer the ISA from the
	ABI.
	* ld-mips-elf/eh-frame1-n32.d: Adjust for targets that do not
	infer the ISA from the ABI.
	* ld-mips-elf/eh-frame1-n64.d: Likewise.
	* ld-mips-elf/eh-frame2-n32.d: Likewise.
	* ld-mips-elf/eh-frame2-n64.d: Likewise.
	* ld-mips-elf/elf-rel-got-n32-embed.d: Likewise.
	* ld-mips-elf/elf-rel-got-n32.d: Likewise.
	* ld-mips-elf/elf-rel-got-n64-embed.d: Likewise.
	* ld-mips-elf/elf-rel-got-n64-linux.d: Likewise.
	* ld-mips-elf/elf-rel-got-n64.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n32-embed.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n32.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64-embed.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
	* ld-mips-elf/elf-rel-xgot-n64.d: Likewise.
	* ld-mips-elf/emit-relocs-1.d: Likewise.
	* ld-mips-elf/got-page-2.d: Likewise.
	* ld-mips-elf/no-shared-1-n32.d: Likewise.
	* ld-mips-elf/no-shared-1-n64.d: Likewise.
	* ld-mips-elf/rel32-n32.d: Likewise.
	* ld-mips-elf/rel64.d: Likewise.
	* ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
	* ld-mips-elf/relax-jalr-n32.d: Likewise.
	* ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
	* ld-mips-elf/relax-jalr-n64.d: Likewise.
	* ld-mips-elf/reloc-1-n32.d: Likewise.
	* ld-mips-elf/reloc-1-n64.d: Likewise.
	* ld-mips-elf/textrel-1.d: Likewise.
2012-08-06 21:28:45 +00:00
Maciej W. Rozycki cde00cbbb9 * ld-mips-elf/reloc-1-n32.d: Add -EB to GAS flags.
* ld-mips-elf/mips-elf.exp: Update GAS flags in reloc test 6.
2012-08-06 21:18:50 +00:00
Maciej W. Rozycki ef2b5578f6 gas/testsuite/
* gas/mips/mips.exp: Set has_newabi for mips*-sde-elf* too.
	* gas/mips/elf-rel-got-n32.s: Adjust padding.
	* gas/mips/elf-rel-got-n64.s: Likewise.
	* gas/mips/elf-rel23.s: Likewise.
	* gas/mips/elf-rel28.s: Likewise.
	* gas/mips/n32-consec.s: Likewise.
	* gas/mips/elf-rel-xgot-n32.d: Adjust output expected.
	* gas/mips/elf-rel-xgot-n64.d: Likewise.
	* gas/mips/elf-rel23.d: Likewise.
	* gas/mips/elf-rel23a.d: Likewise.
	* gas/mips/elf-rel23b.d: Likewise.
	* gas/mips/elf-rel28-n32.d: Likewise.

	ld/testsuite/
	* lib/ld-lib.exp (run_dump_test): Implement the EXTRA_OPTIONS
	argument and the "dump" keyword.
	* ld-mips-elf/emit-relocs-1a.s: Make section alignment uniform
	across targets.
	* ld-mips-elf/emit-relocs-1b.s: Likewise.
	* ld-mips-elf/jalbal.s: Adjust padding.
	* ld-mips-elf/elf-rel-got-n32-embed.d: New test.
	* ld-mips-elf/elf-rel-got-n64-embed.d: New test.
	* ld-mips-elf/elf-rel-xgot-n32-embed.d: New test.
	* ld-mips-elf/elf-rel-xgot-n64-embed.d: New test.
	* ld-mips-elf/elf-rel-got-n32.d: Remove -melf32btsmipn32.
	* ld-mips-elf/elf-rel-got-n64.d: Remove -melf64btsmip.  Adjust
	output.
	* ld-mips-elf/elf-rel-got-n64-linux.d: Remove -melf64btsmip.
	* ld-mips-elf/elf-rel-xgot-n32.d: Remove -melf32btsmipn32.
	Adjust output.
	* ld-mips-elf/elf-rel-xgot-n64.d: Remove -melf64btsmip.  Adjust
	output.
	* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
	* ld-mips-elf/reloc-1-n64.d: Remove -melf64btsmip.
	* ld-mips-elf/mips-elf.exp: Set has_newabi for mips*-sde-elf*
	too.  Move tool flags from o32_as_flags and o32_ld_flags
	variables into abi_asflags and abi_ldflags arrays.  Adjust test
	cases run to use them.  Run the new tests.
2012-08-06 21:05:54 +00:00
Maciej W. Rozycki a22a803903 bfd/
* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
	PLT slots for local symbols.

	ld/testsuite/
	* ld-vax-elf: New directory.
	* ld-vax-elf/plt-local-lib.dd: New test.
	* ld-vax-elf/plt-local-lib.ld: New test linker script.
	* ld-vax-elf/plt-local-lib.s: New test source.
	* ld-vax-elf/plt-local.dd: New test.
	* ld-vax-elf/plt-local.ld: New test linker script.
	* ld-vax-elf/plt-local.s: New test source.
	* ld-vax-elf/plt-local-hidden-pic.s: New test source.
	* ld-vax-elf/plt-local-rehidden-pic.s: New test source.
	* ld-vax-elf/vax-elf.exp: New test script.
2012-08-05 22:45:20 +00:00
Maciej W. Rozycki 8b5b2228f8 * lib/ld-lib.exp (at_least_gcc_version): Accept more version
number formats; avoid throwing exceptions in any case.
2012-08-03 22:28:41 +00:00
Maciej W. Rozycki 3bdf9505db bfd/
* elfxx-mips.c (mips_elf_perform_relocation): Update the
	cross-mode jump message.

	ld/testsuite/
	* ld-mips-elf/mode-change-error-1.d: Update the error message.
2012-08-03 22:14:21 +00:00
Maciej W. Rozycki a7508e4b9f * ld-mips-elf/got-vers-1.rd: Fix a typo. 2012-08-02 18:37:43 +00:00
H.J. Lu c83ebfa0aa Move testsuite entry to testsuite/ChangeLog 2012-08-01 16:01:17 +00:00
James Lemke 8fbf7334de gas/ChangeLog:
2012-08-01  James Lemke  <jwlemke@codesourcery.com>

	* gas/dwarf2dbg.c (out_set_addr): Allow for non-constant value of
	DWARF2_LINE_MIN_INSN_LENGTH
	* gas/config/tc-ppc.c (ppc_dwarf2_line_min_insn_length): Declare
	and initialize.
	(md_apply_fix): Branch addr can be a multiple of 2 or 4.
	* gas/config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): Now a
	variable reference.

gas/testsuite/ChangeLog:
2012-08-01  James Lemke  <jwlemke@codesourcery.com>

	* gas/cfi/cfi-ppc-1.d: Allow for code alignment of 2 or 4.

ld/ChangeLog:
2012-08-01  James Lemke  <jwlemke@codesourcery.com>

	* ld/testsuite/ld-gc/pr13683.d: XFAIL for powerpc*-*-eabivle.
2012-08-01 13:46:59 +00:00
H.J. Lu c2821c3e55 Properly handle by_none 2012-08-01 01:07:38 +00:00
H.J. Lu b2e4da5a83 Don't call compare_section in case of by_none
PR ld/14156
	* ldlang.c (wild_sort): Don't call compare_section in case of
	by_none.

	* scripttempl/elf.sc: Add SORT_NONE to .init and .fini sections.
	* scripttempl/elf32msp430.sc: Likewise.
	* scripttempl/elf32msp430_3.sc: Likewise.
	* scripttempl/elfd10v.sc: Likewise.
	* scripttempl/elfd30v.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
2012-08-01 01:03:47 +00:00
H.J. Lu 4b7e639504 Update PR ld/14156 tests
* ld-elf/fini0.s: Indent global directive.
	* ld-elf/foo0.s: Likewise.
	* ld-elf/init0.s: Likewise.

	* ld-elf/pr14156c.t: Keep text section.
2012-07-31 20:45:01 +00:00
Nick Clifton a6dc81d2ab Updated translations 2012-07-30 08:43:46 +00:00
Mike Frysinger c4dd807e7b bfd: update to AC_INIT
Move the package name/version from AM_INIT_AUTOMAKE to AC_INIT per recent
autotools guidelines.  We use recent versions of both, so it shouldn't be
a problem.

This sets PACKAGE_xxx variables correctly, and makes the output of:
	./configure --version
actually useful:
	bfd configure 2.22.52

Changing the other dirs to use AC_INIT would require a bit of m4 trickery
that I don't feel like getting into, and they all use BFD_VERSION anyways,
so there isn't much point.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-07-27 16:30:57 +00:00
Tristan Gingold af18cb5940 binutils/
2012-07-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.23.

gas/
2012-07-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.23.

ld/
2012-07-27  Tristan Gingold  <gingold@adacore.com>

	* NEWS: Add marker for 2.23.
2012-07-27 08:13:03 +00:00
Nick Clifton 054565943a PR ld/14397
* elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
	if a required section is missing from the linker script.

	* ld-arm/arm-elf.exp: Add tests of linking without .rel.plt.
	* ld-arm/arm-no-rel-plt.out: Linker script without .rel.plt section.
	* ld-arm/arm-no-rel-plt.out: Expected output.
2012-07-26 13:43:24 +00:00
Eric B. Weddington 43315eb701 2012-07-24 Jan Waclawek <konfera@efton.sk>
PR ld/14058
	* emultempl/avrelf.em (avr_elf_after_allocation): Call
	elf32_avr_size_stubs with is_prealloc_run as TRUE.
2012-07-24 22:23:21 +00:00
Hans-Peter Nilsson 15e539f42a * ld-elf/foo0.s: Use ARM-compatible .section syntax.
* ld-elf/foo1.s: Likewise.
	* ld-elf/foo2.s: Likewise.
	* ld-elf/foo3.s: Likewise.
	* ld-elf/foon.s: Likewise.
2012-07-13 21:43:16 +00:00
Andreas Krebbel 470b557aaf 2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* elf64-s390.c: Include elf-s390-common.c.
	(R_390_IRELATIVE): New reloc.
	(elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
	(RELA_ENTRY_SIZE): New macro.
	(elf_s390_link_hash_entry): New fields ifunc_resolver_address and
	*ifunc_resolver_section.
	(struct plt_entry): New struct.
	(struct elf_s390_obj_tdata): New field local_plt.
	(elf_s390_local_plt): New macro.
	(struct elf_s390_link_hash_table): New field irelifunc.
	(ELF64): New macro.
	(link_hash_newfunc): Initialize new fields.
	(elf_s390_check_relocs): Handle IFUNC symbols.
	(elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
	symbols.
	(allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
	IFUNC symbols.
	(elf_s390_size_dynamic_sections): Handle IFUNC symbols.
	(elf_s390_relocate_section): Likewise.
	(elf_s390_finish_dynamic_symbol): Likewise.
	(elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
	(elf_s390_finish_ifunc_symbol): New function.
	(elf_s390_gc_sweep_hook): Handle local plt entries.
	(elf_backend_add_symbol_hook): Define.
	* elf32-s390.c: See elf64-s390.c changes.
	* elf-s390-common.c: New file.
	* bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
	* libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
	BFD_RELOC_390_IRELATIVE.
	* reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* elf/s390.h (START_RELOC_NUMBERS): Define R_390_IRELATIVE reloc.

2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* emulparams/elf_s390.sh (IREL_IN_PLT): Define.
	* emulparams/elf64_s390.sh (IREL_IN_PLT): Define.
2012-07-13 15:47:27 +00:00
Nick Clifton cd6f1cf350 PR ld/14357
* ldmain.c (trace_file_tries): Rename to 'verbose'.
	* ldfile.c: Likewise.
	* ldlang.c: Likewise.
	* ldmain.h: Likewise.
	* lexsup.c: Likewise.
	* emultempl/elf32.em: Likewise.
	* emultemp/spuelf.em: Likewise.
	* pe-dll.c (pe_dll_generate_implib): Only print creation message
	in verbose mode.
2012-07-13 13:20:27 +00:00
H.J. Lu eda680f805 Add SORT_NONE and don't sort sort .init/.fini sections
ld/

	PR ld/14156
	* NEWS: Mention SORT_NONE.

	* ld.h (sort_type): Add by_none.

	* ld.texinfo: Document SORT_NONE.

	* ldgram.y: Handle SORT_NONE.

	* ldlang.c (update_wild_statements): Handle by_none.  Don't
	sort .init/.fini sections.

	* ldlex.l: Add SORT_NONE.

ld/testsuite/

	PR ld/14156
	* ld-elf/fini0.s: New file.
	* ld-elf/fini1.s: Likewise.
	* ld-elf/fini2.s: Likewise.
	* ld-elf/fini3.s: Likewise.
	* ld-elf/finin.s: Likewise.
	* ld-elf/foo0.s: Likewise.
	* ld-elf/foo1.s: Likewise.
	* ld-elf/foo2.s: Likewise.
	* ld-elf/foo3.s: Likewise.
	* ld-elf/foon.s: Likewise.
	* ld-elf/init0.s: Likewise.
	* ld-elf/init1.s: Likewise.
	* ld-elf/init2.s: Likewise.
	* ld-elf/init3.s: Likewise.
	* ld-elf/initn.s: Likewise.
	* ld-elf/pr14156a.d: Likewise.
	* ld-elf/pr14156b.d: Likewise.
	* ld-elf/pr14156c.d: Likewise.
	* ld-elf/pr14156c.t: Likewise.
2012-07-10 06:50:57 +00:00
H.J. Lu bc9ad2e430 Add testcases for PR ld/14323
PR ld/14323
	* ld-elf/pr14323-1.c: New.
	* ld-elf/pr14323-2.c: Likewise.

	* ld-elf/shared.exp (build_tests): Add libpr14323-2.so.
	(run_tests): Add pr14323.
2012-07-10 04:51:53 +00:00
H.J. Lu 90c984fc53 Properly handle indirect symbols
2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3351
	* elflink.c (_bfd_elf_update_dynamic_flags): New.
	(_bfd_elf_merge_symbol): Update both real and indirect symbol
	dynamic flags.
	(_bfd_elf_add_default_symbol): Make the real symbol dynamic if
	the indirect symbol is defined in a shared library.
	(elf_link_add_object_symbols): Likewise.  If the indirect
	symbol has been forced local, don't make the real symbol
	dynamic.
	(elf_link_check_versioned_symbol): Check indirect symbol.
	(elf_link_output_extsym): Use real symbol definition when
	reporting indirect symbol error.  Check version info for
	dynamic versioned symbol.

2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3351
	* ld-elf/indirect.exp: New file.
	* ld-elf/indirect1a.c: Likewise.
	* ld-elf/indirect1b.c: Likewise.
	* ld-elf/indirect1c.c: Likewise.
	* ld-elf/indirect2.c: Likewise.
	* ld-elf/indirect3.out: Likewise.
	* ld-elf/indirect3a.c: Likewise.
	* ld-elf/indirect3b.c: Likewise.
	* ld-elf/indirect3c.c: Likewise.
	* ld-elf/indirect4.out: Likewise.
	* ld-elf/indirect4a.c: Likewise.
	* ld-elf/indirect4b.c: Likewise.
	* ld-elf/indirect4c.c: Likewise.
2012-07-03 14:44:35 +00:00
Roland McGrath 35aeab69a0 ld/testsuite/
* ld/testsuite/ld-i386/tlsbin-nacl.rd: Update for symbol table changes.
	* ld/testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise.
	* ld/testsuite/ld-i386/tlsdesc-nacl.rd: Likewise.
	* ld/testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise.
	* ld/testsuite/ld-i386/tlsnopic-nacl.rd: Likewise.
	* ld/testsuite/ld-i386/tlspic-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise.
	* ld/testsuite/ld-x86-64/tlspic-nacl.rd: Likewise.
2012-07-02 18:20:31 +00:00
H.J. Lu 9aec843417 Replace __end_SECNAME with __stop_SECNAME
* ld.texinfo: Replace __end_SECNAME with __stop_SECNAME.
2012-07-02 16:29:07 +00:00
H.J. Lu a47edf2745 Add a test for weak alias
* ld-elf/data2.c: New file.
	* ld-elf/weakdef1.c: Likewise.

	* ld-elf/shared.exp: Add tests for libdata2 and weakdef1.
2012-07-02 14:40:19 +00:00
Nick Clifton 2a995fc189 * scripttempl/alphavms.sc: Add .debug_macro section.
* scripttempl/elf.sc: Likewise.
	* scripttempl/elf64hppa.sc: Likewise.
	* scripttempl/elf_chaos.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
	* scripttempl/ia64vms.sc: Likewise.
	* scripttempl/armbpabi.sc: Add .debug_pubtypes, .debug_ranges and
	.debug_macro sections.
	* scripttempl/avr.sc: Likewise.
	* scripttempl/elf32cr16.sc: Likewise.
	* scripttempl/elf32crx.sc: Likewise.
	* scripttempl/elf32msp430.sc: Likewise.
	* scripttempl/elf32msp430_3.sc: Likewise.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elfd30v.sc: Likewise.
	* scripttempl/elfi370.sc: Likewise.
	* scripttempl/elfm68hc11.sc: Likewise.
	* scripttempl/elfm68hc12.sc: Likewise.
	* scripttempl/elfxgate.sc: Likewise.
	* scripttempl/i386beos.sc: Likewise.
	* scripttempl/i386go32.sc: Likewise.
	* scripttempl/ip2k.sc: Likewise.
	* scripttempl/iq2000.sc: Likewise.
	* scripttempl/mep.sc: Likewise.
	* scripttempl/mmo.sc: Likewise.
	* scripttempl/v850.sc: Likewise.
	* scripttempl/xstormy16.sc: Likewise.
2012-06-29 07:58:46 +00:00