Commit Graph

4294 Commits

Author SHA1 Message Date
Alan Modra e245874365 bfd/
* elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
	plt-thread-safe.
gold/
	* powerpc.cc (Target_powerpc::do_relax): Default shared libs to
	plt-thread-safe.
ld/testsuite/
	* ld-powerpc/tlsso.d: Adjust for plt-thread-safe stubs.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlstocso.d: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
2013-01-15 06:13:26 +00:00
Alan Modra 4d490e4206 * ld-plugin/lto-16a.d: Match powerpc64 function symbol type.
* ld-plugin/lto-16b.d: Likewise.
	* ld-plugin/lto-17a.d: Likewise.
	* ld-plugin/lto-17b-2.d: Likewise.
2013-01-15 05:05:26 +00:00
Alan Modra 0d705e9f94 * ld.texinfo (-Tldata-segment): Describe.
* ldlex.h (OPTION_TLDATA_SEGMENT): New enum value.
	* lexsup.c (ld_options): Add -Tldata-segment.
	(parse_args): Handle OPTION_TLDATA_SEGMENT.
	* scripttempl/elf.sc: Support LARGE_DATA_ADDR.
2013-01-14 13:37:10 +00:00
Alan Modra d6391ce5a6 * ld-elf/pr14926.d: Disable for d10v, msp, xstormy.
* ld-elf/sec-to-seg.exp: Choose correct variant output to suit
	updated microblaze page size.
2013-01-14 13:23:05 +00:00
Nick Clifton 2624489484 oops - omitted from previous delta 2013-01-11 09:53:22 +00:00
H.J. Lu e4492aa0d8 Remove trailing white spaces in ld
* deffilep.y: Remove trailing white spaces.
	* elf-hints-local.h: Likewise.
	* ldexp.c: Likewise.
	* ldlang.h: Likewise.
	* ldmisc.c: Likewise.
	* ldwrite.c: Likewise.
	* pe-dll.c: Likewise.
	* emulparams/criself.sh: Likewise.
	* emulparams/crislinux.sh: Likewise.
	* emulparams/elf32_tic6x_le.sh: Likewise.
	* emulparams/elf32bmipn32-defs.sh: Likewise.
	* emulparams/elf32mb_linux.sh: Likewise.
	* emulparams/elf32mep.sh: Likewise.
	* emulparams/elf32microblaze.sh: Likewise.
	* emulparams/elf32ppc.sh: Likewise.
	* emulparams/elf64_s390.sh: Likewise.
	* emulparams/elf64alpha.sh: Likewise.
	* emulparams/elf_s390.sh: Likewise.
	* emulparams/elf_x86_64.sh: Likewise.
	* emulparams/tic80coff.sh: Likewise.
	* emultempl/aix.em: Likewise.
	* emultempl/avrelf.em: Likewise.
	* emultempl/cr16elf.em: Likewise.
	* emultempl/pe.em: Likewise.
	* emultempl/pep.em: Likewise.
	* emultempl/spuelf.em: Likewise.
	* emultempl/tic6xdsbt.em: Likewise.
2013-01-10 20:08:03 +00:00
Nick Clifton a3c629886c * common.h: Fix case of "Meta".
* metag.h: New file.

	* dis-asm.h (print_insn_metag): New declaration.

	* metag.h: New file.

	* Makefile.am: Add Meta.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.in: Add Meta.
	* disassemble.c: Add Meta support.
	* metag-dis.c: New file.

	* Makefile.am: Add Meta.
	* Makefile.in: Regenerate.
	* archures.c (bfd_mach_metag): New.
	* bfd-in2.h: Regenerate.
	* config.bfd: Add Meta.
	* configure: Regenerate.
	* configure.in: Add Meta.
	* cpu-metag.c: New file.
	* elf-bfd.h: Add Meta.
	* elf32-metag.c: New file.
	* elf32-metag.h: New file.
	* libbfd.h: Regenerate.
	* reloc.c: Add Meta relocations.
	* targets.c: Add Meta.

	* Makefile.am: Add Meta.
	* Makefile.in: Regenerate.
	* config/tc-metag.c: New file.
	* config/tc-metag.h: New file.
	* configure.tgt: Add Meta.
	* doc/Makefile.am: Add Meta.
	* doc/Makefile.in: Regenerate.
	* doc/all.texi: Add Meta.
	* doc/as.texiinfo: Document Meta options.
	* doc/c-metag.texi: New file.

	* gas/metag/labelarithmetic.d: New file.
	* gas/metag/labelarithmetic.s: New file.
	* gas/metag/metacore12.d: New file.
	* gas/metag/metacore12.s: New file.
	* gas/metag/metacore21-invalid.l: New file.
	* gas/metag/metacore21-invalid.s: New file.
	* gas/metag/metacore21.d: New file.
	* gas/metag/metacore21.s: New file.
	* gas/metag/metacore21ext.d: New file.
	* gas/metag/metacore21ext.s: New file.
	* gas/metag/metadsp21-invalid.l: New file.
	* gas/metag/metadsp21-invalid.s: New file.
	* gas/metag/metadsp21.d: New file.
	* gas/metag/metadsp21.s: New file.
	* gas/metag/metadsp21ext.d: New file.
	* gas/metag/metadsp21ext.s: New file.
	* gas/metag/metafpu21.d: New file.
	* gas/metag/metafpu21.s: New file.
	* gas/metag/metafpu21ext.d: New file.
	* gas/metag/metafpu21ext.s: New file.
	* gas/metag/metag.exp: New file.
	* gas/metag/tls.d: New file.
	* gas/metag/tls.s: New file.

	* Makefile.am: Add Meta.
	* Makefile.in: Regenerate.
	* configure.tgt: Add Meta.
	* emulparams/elf32metag.sh: New file.
	* emultempl/metagelf.em: New file.

	* ld-elf/merge.d: Mark Meta as xfail.
	* ld-gc/start.d: Skip this test on Meta.
	* ld-gc/personality.d: Skip this test on Meta.
	* ld-metag/external.s: New file.
	* ld-metag/metag.exp: New file.
	* ld-metag/pcrel.d: New file.
	* ld-metag/pcrel.s: New file.
	* ld-metag/shared.d: New file.
	* ld-metag/shared.r: New file.
	* ld-metag/shared.s: New file.
	* ld-metag/stub.d: New file.
	* ld-metag/stub.s: New file.
	* ld-metag/stub_pic_app.d: New file.
	* ld-metag/stub_pic_app.r: New file.
	* ld-metag/stub_pic_app.s: New file.
	* ld-metag/stub_pic_shared.d: New file.
	* ld-metag/stub_pic_shared.s: New file.
	* ld-metag/stub_shared.d: New file.
	* ld-metag/stub_shared.r: New file.
	* ld-metag/stub_shared.s: New file.

	* binutils/readelf.c: (guess_is_rela): Add EM_METAG.
	(dump_relocations): Add EM_METAG.
	(get_machine_name): Correct case for Meta.
	(is_32bit_abs_reloc): Add support for Meta ADDR32 reloc.
	(is_none_reloc): Add support for Meta NONE reloc.
2013-01-10 09:49:22 +00:00
Alan Modra 134960cc27 * emulparams/elf_x86_64.sh (LARGE_BSS_AFTER_BSS): Define.
* emulparams/elf32_x86_64.sh: Likewise.
	* emulparams/elf_k1om.sh: Likewise.
	* emulparams/elf_l1om.sh: Likewise.
	* scripttempl/elf.sc (LARGE_BSS): Define rather than appending to
	OTHER_BSS_SECTIONS.  Substitute in script.
2013-01-09 05:51:32 +00:00
Thomas Schwinge 98dbe4a783 ld/testsuite/
* ld-i386/export-class.exp: Restore (and reword) comment about
	excluded targets.
2013-01-08 10:24:46 +00:00
Alan Modra 34d560337b * scripttempl/elf.sc (RODATA_ADDR): Typo fix. 2013-01-08 09:23:07 +00:00
Alan Modra 98e385126e fix typo 2013-01-08 06:33:12 +00:00
Alan Modra d5c8b1f856 * emultempl/elf32.em (gld${EMULATION_NAME}_check_ld_so_conf): Replace
"name" param with a bfd_link_needed_list pointer.  Update caller.
	(gld${EMULATION_NAME}_check_ld_elf_hints): Likewise.
2013-01-08 06:10:39 +00:00
Alan Modra cc382d466c * Makefile.am (ALL_EMULATION_SOURCES): Correct eavrxmega entries.
* Makefile.in: Regenerate.
2013-01-08 02:02:34 +00:00
H.J. Lu add2432034 Add fuse-ld= for GCC linker option compatibility
* lexsup.c (ld_options): Add fuse-ld= for GCC linker option
	compatibility.
2013-01-07 16:58:59 +00:00
Nick Clifton 7ca01ed925 * ld.texinfo: Replace @ with @@ when it is part of the text.
Correct ordering of M68HC11 entry.

	* doc/binutils.texi: Fix ordering of top level nodes.
	Replace erroneous uses of @itemx with @item.

	* bfd.texinfo: Replace @ with @@ when it is part of the text.
2013-01-07 12:11:13 +00:00
Nick Clifton e407c74b5b * archures.c: Add support for MIPS r5900
* bfd-in2.h: Add support for MIPS r5900
	* config.bfd: Add support for Sony Playstation 2
	* cpu-mips.c: Add support for MIPS r5900
	* elfxx-mips.c: Add support for MIPS r5900 (extension of r4000)

	* config/tc-mips.c: Add support for MIPS r5900
	Add M_LQ_AB and M_SQ_AB to support large values for instructions lq and sq.
	* config/tc-mips.c (can_swap_branch_p, get_append_method): Detect some conditional short loops to fix a bug on the r5900 by NOP in the branch delay slot.
	* config/tc-mips.c (M_MUL): Support 3 operands in multu on r5900.
	* config/tc-mips.c (M_TRUNCWS): Support trunc.w.s on r5900 in MIPS ISA I.
	* config/tc-mips.c (s_mipsset): Force 32 bit floating point on r5900.
	* configure.in: Detect CPU type when target string contains r5900 (e.g. mips64r5900el-linux-gnu).

	* config/tc-mips.c (mips_ip): Check parameter range of instructions mfps and mtps on r5900.

	* elf/mips.h: Add MIPS machine variant number for r5900 which is compatible with old Playstation 2 software.
	* opcode/mips.h: Add support for r5900 instructions including lq and sq.

	* configure.tgt: Support ELF files for Sony Playstation 2 (for ps2dev and ps2sdk).
	* emulparams/elf32lr5900n32.sh: Create linker script for Sony Playstation 2 ELF files using MIPS ABI n32.
	* emulparams/elf32lr5900.sh: Create linker script for Sony Playstation 2 ELF files using MIPS ABI o32.
	* Makefile.am: Add linker scripts for Sony Playstation 2 ELF files.

	* opcodes/mips-dis.c: Add names for CP0 registers of r5900.
	* opcodes/mips-opc.c: Add M_SQ_AB and M_LQ_AB to support larger range for instructions sq and lq.

	* opcodes/mips-opc.c: Add support for MIPS r5900 CPU.
	Add support for 128 bit MMI (Multimedia Instructions).
	Add support for EE instructions (Emotion Engine).
	Disable unsupported floating point instructions (64 bit and undefined compare operations).
	Enable instructions of MIPS ISA IV which are supported by r5900.
	Disable 64 bit co processor instructions.
	Disable 64 bit multiplication and division instructions.
	Disable instructions for co-processor 2 and 3, because these are not supported (preparation for later VU0 support (Vector Unit)).
	Disable cvt.w.s because this behaves like trunc.w.s and the correct execution can't be ensured on r5900.
	Add trunc.w.s using the opcode encoding of cvt.w.s on r5900. This will confuse less developers and compilers.
2013-01-04 17:22:53 +00:00
Yufeng Zhang fb098a1efc opcodes/
2013-01-04  Yufeng Zhang  <yufeng.zhang@arm.com>

	* aarch64-opc.c (aarch64_print_operand): Change to print
	AARCH64_OPND_IMM_MOV in hexadecimal in the instruction and in decimal
	in comment.
	* aarch64-tbl.h (aarch64_opcode_table): Remove the 'F_PSEUDO' flag
	from the opcode entries of OP_MOV_IMM_LOG, OP_MOV_IMM_WIDEN and
	OP_MOV_IMM_WIDE.

gas/testsuite/

2013-01-04  Yufeng Zhang  <yufeng.zhang@arm.com>

	* gas/aarch64/int-insns.d: Update.
	* gas/aarch64/mov.d: Update.
	* gas/aarch64/reloc-insn.d: Update.

ld/testsuite/

2013-01-04  Yufeng Zhang  <yufeng.zhang@arm.com>

	* ld-aarch64/emit-relocs-264.d: Append the '-Mno-aliases' option to
	the objdump directive.
	* ld-aarch64/emit-relocs-266.d: Ditto.
	* ld-aarch64/emit-relocs-268.d: Ditto.
	* ld-aarch64/emit-relocs-269.d: Ditto.
	* ld-aarch64/emit-relocs-270.d: Ditto.
	* ld-aarch64/emit-relocs-271.d: Ditto.
	* ld-aarch64/emit-relocs-272.d: Ditto.
2013-01-04 14:59:33 +00:00
H.J. Lu 6265840747 Update copyright year to 2013
binutils/

2013-01-02  H.J. Lu  <hongjiu.lu@intel.com>

	* version.c (print_version): Update copyright year to 2013.

gas/

2013-01-02  H.J. Lu  <hongjiu.lu@intel.com>

	* as.c (parse_args): Update copyright year to 2013.

ld/

2013-01-02  H.J. Lu  <hongjiu.lu@intel.com>

	* ldver.c (ldversion): Update copyright year to 2013.

opcodes/

2013-01-02  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-gen.c (process_copyright): Update copyright year to 2013.
2013-01-02 17:15:38 +00:00
H.J. Lu 4e5f3f9d1d Rotate binutils ChangeLog for 2013 2013-01-02 17:06:32 +00:00
Hans-Peter Nilsson 349028aae4 * ld-scripts/pr14962.d: Don't run for mmix-knuth-mmixware. Add
comment punctuation.
2012-12-30 20:15:07 +00:00
H.J. Lu a5479e5ff4 Properly adjust h->plt.refcount
bfd/

	PR ld/14980
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly
	adjust h->plt.refcount.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

	PR ld/14980
	* ld-ifunc/ifunc-14c.s: New file.
	* ld-ifunc/ifunc-14e-i386.d: Likewise.
	* ld-ifunc/ifunc-14e-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14f-i386.d: Likewise.
	* ld-ifunc/ifunc-14f-x86-64.d: Likewise.
2012-12-21 18:15:22 +00:00
Roland McGrath 9d5777a34c ld/
* ld.texinfo (Options): Describe -Trodata-segment.
	* ldlex.h (enum option_values): Add OPTION_TRODATA_SEGMENT.
	* lexsup.c (ld_options, parse_args): Handle -Trodata-segment.
	* scripttempl/elf.sc (RODATA_ADDR, SHLIB_RODATA_ADDR): Wrap
	SEGMENT_START("rodata-segment", ...) + SIZEOF_HEADERS around the value.
2012-12-18 20:42:43 +00:00
Alan Modra 8d708c8cad PR ld/14962
* ld-scripts/pr14962.d, * ld-scripts/pr14962.t,
	* ld-scripts/pr14962a.s, * ld-scripts/pr14962b.s: New test.
	* ld-scripts/expr.exp: Run it.
2012-12-18 13:38:10 +00:00
Roland McGrath b3adb10f86 ld/testsuite/
* ld-elf/elf.exp (stack exec, stack size): Run for *-*-nacl* targets.
	* ld-i386/export-class.exp: Run for i?86-*-nacl* targets.
2012-12-17 19:32:52 +00:00
H.J. Lu 4cf0f7850b Remove the leading zero
* ld-elf/var1.d: Remove the leading zero.
2012-12-17 17:20:07 +00:00
Nick Clifton 5bf135a788 Add copyright notices 2012-12-17 16:56:12 +00:00
H.J. Lu 387894ff90 Update PR ld/14962 testcase 2012-12-17 15:37:40 +00:00
H.J. Lu 06fc0e2238 Add a testcase for PR ld/14962
PR ld/14962
	* ld-elf/var1.d: New file.
	* ld-elf/var1.s: Likewise.
	* ld-elf/var1.t: Likewise.
2012-12-17 14:53:35 +00:00
Alan Modra 4194268f43 PR ld/14962
* ldexp.h (struct ldexp_control): Add "assign_name".
	* ldexp.c (fold_name <NAME>): Compare and clear assign_name on match.
	(exp_fold_tree_1): Remove existing code testing for self assignment.
	Instead set and test expld.assign_name.
	* ldlang.c (scan_for_self_assignment): Delete.
	(print_assignment): Instead set and test expld.assign_name.
2012-12-17 00:16:49 +00:00
H.J. Lu 73bcf23385 Also check local IFUNC references
bfd/

	PR ld/14968
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check
	local IFUNC references.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

	PR ld/14968
	* ld-ifunc/ifunc-18a-i386.d: New file.
	* ld-ifunc/ifunc-18a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-18a.s: Likewise.
	* ld-ifunc/ifunc-18b-i386.d: Likewise.
	* ld-ifunc/ifunc-18b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-18b.s: Likewise.
	* ld-ifunc/ifunc-19a-i386.d: Likewise.
	* ld-ifunc/ifunc-19a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-19a.s: Likewise.
	* ld-ifunc/ifunc-19b-i386.d: Likewise.
	* ld-ifunc/ifunc-19b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-19b.s: Likewise.
2012-12-16 20:31:08 +00:00
Thomas Schwinge 6b00ac5ace Fix copy'n'paste-o. 2012-12-15 10:34:14 +00:00
Thomas Schwinge 9cc420b64c ld/testsuite/
* ld-elf/elf.exp (stack exec, stack size): Run for any GNU target.
	* ld-elf/maxpage3c.d: Run for any x86 GNU target.
	* ld-elf/maxpage4.d: Likewise.
	* ld-elf/maxpage5.d: Likewise.
	* ld-i386/export-class.exp: Likewise.
2012-12-15 10:28:17 +00:00
Yufeng Zhang 83a2341852 ld/testsuite/
2012-12-13  Yufeng Zhang  <yufeng.zhang@arm.com>

	* ld-elf/indirect.exp: Disable if -shared is not supported.
	* lib/ld-lib.exp (check_shared_lib_support): Add aarch64*-*-elf and
	arm*-*-elf to the exclude list.
2012-12-14 11:58:59 +00:00
H.J. Lu 5ca5bb3545 Check local IFUNC calls
bfd/

2012-12-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14956
	* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local
	IFUNC calls.
	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.

ld/testsuite/

2012-12-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14956
	* ld-ifunc/ifunc-14-i386.d: Renamed to ...
	* ld-ifunc/ifunc-14a-i386.d: This.

	* ld-ifunc/ifunc-14-x86-64.d: Renamed to ...
	* ld-ifunc/ifunc-14a-x86-64.d: This.

	* ld-ifunc/ifunc-14b-i386.d: New file.
	* ld-ifunc/ifunc-14b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14c-i386.d: Likewise.
	* ld-ifunc/ifunc-14c-x86-64.d: Likewise.
	* ld-ifunc/ifunc-14d-i386.d: Likewise.
	* ld-ifunc/ifunc-14d-x86-64.d: Likewise.
2012-12-13 21:07:16 +00:00
Roland McGrath 8634c1b4cb ld/
* emulparams/elf_nacl.sh (nacl_rodata_addr): New shell function.
	(RODATA_ADDR, SHLIB_RODATA_ADDR): Use it to base the calculation
	on SEGMENT_START("text-segment", ...) rather than ... alone.
	* Makefile.am (earmelf_nacl.c, earmelfb_nacl.c): Add missing
	dependency on $(srcdir)/emulparams/elf_nacl.sh.
	* Makefile.in: Regenerate.
2012-12-11 22:23:14 +00:00
Nick Clifton 752937aa0c Add copyright notices 2012-12-10 12:48:03 +00:00
H.J. Lu 861b2eaac2 Use "readelf -S --wide" on ld-elf/pr14926.d
* ld-elf/pr14926.d: Use "readelf -S --wide".
2012-12-07 22:30:19 +00:00
H.J. Lu 7708f7ef37 Mention PRs in ChangeLog entries for LTO tests 2012-12-07 19:56:25 +00:00
H.J. Lu af55061b18 Add LTO tests
* ld-plugin/dummy.c: New file.
	* ld-plugin/dummy.s: Likewise.
	* ld-plugin/lto-11.out: Likewise.
	* ld-plugin/lto-11a.c: Likewise.
	* ld-plugin/lto-11b.c: Likewise.
	* ld-plugin/lto-11c.c: Likewise.
	* ld-plugin/lto-12.out: Likewise.
	* ld-plugin/lto-12a.c: Likewise.
	* ld-plugin/lto-12b.c: Likewise.
	* ld-plugin/lto-12c.c: Likewise.
	* ld-plugin/lto-13.out: Likewise.
	* ld-plugin/lto-13a.c: Likewise.
	* ld-plugin/lto-13b.c: Likewise.
	* ld-plugin/lto-13c.c: Likewise.
	* ld-plugin/lto-14.out: Likewise.
	* ld-plugin/lto-14a.c: Likewise.
	* ld-plugin/lto-14b.c: Likewise.
	* ld-plugin/lto-14c.c: Likewise.
	* ld-plugin/lto-15.out: Likewise.
	* ld-plugin/lto-15a.c: Likewise.
	* ld-plugin/lto-15b.c: Likewise.
	* ld-plugin/lto-16a.c: Likewise.
	* ld-plugin/lto-16a.d: Likewise.
	* ld-plugin/lto-16b.c: Likewise.
	* ld-plugin/lto-16b.d: Likewise.
	* ld-plugin/lto-17a.c: Likewise.
	* ld-plugin/lto-17a.d: Likewise.
	* ld-plugin/lto-17b-1.d: Likewise.
	* ld-plugin/lto-17b-2.d: Likewise.
	* ld-plugin/lto-17b.c: Likewise.
	* ld-plugin/lto-1a.c: Likewise.
	* ld-plugin/lto-1b.c: Likewise.
	* ld-plugin/lto-2.c: Likewise.
	* ld-plugin/lto-3.d: Likewise.
	* ld-plugin/lto-3.out: Likewise.
	* ld-plugin/lto-3a.c: Likewise.
	* ld-plugin/lto-3b.c: Likewise.
	* ld-plugin/lto-3c.c: Likewise.
	* ld-plugin/lto-3r.d: Likewise.
	* ld-plugin/lto-5.d: Likewise.
	* ld-plugin/lto-5.out: Likewise.
	* ld-plugin/lto-5a.c: Likewise.
	* ld-plugin/lto-5b.c: Likewise.
	* ld-plugin/lto-5r.d: Likewise.
	* ld-plugin/lto-6.c: Likewise.
	* ld-plugin/lto-7.out: Likewise.
	* ld-plugin/lto-7a.c: Likewise.
	* ld-plugin/lto-7b.c: Likewise.
	* ld-plugin/lto-7c.c: Likewise.
	* ld-plugin/lto-7d.c: Likewise.
	* ld-plugin/lto-8.out: Likewise.
	* ld-plugin/lto-8a.c: Likewise.
	* ld-plugin/lto-8b.c: Likewise.
	* ld-plugin/lto-9.cc: Likewise.
	* ld-plugin/lto-9.d: Likewise.
	* ld-plugin/lto.exp: Likewise.
	* ld-plugin/pr12696-1.cc: Likewise.
	* ld-plugin/pr12758a.s: Likewise.
	* ld-plugin/pr12758b.c: Likewise.
	* ld-plugin/pr12760a.c: Likewise.
	* ld-plugin/pr12760b.c: Likewise.
	* ld-plugin/pr12942.out: Likewise.
	* ld-plugin/pr12942a.cc: Likewise.
	* ld-plugin/pr12942a.h: Likewise.
	* ld-plugin/pr12942b.cc: Likewise.
	* ld-plugin/pr12942c.cc: Likewise.
	* ld-plugin/pr12975.c: Likewise.
	* ld-plugin/pr12975.d: Likewise.
	* ld-plugin/pr12975.t: Likewise.
	* ld-plugin/pr12982.c: Likewise.
	* ld-plugin/pr12982.d: Likewise.
	* ld-plugin/pr13066.cc: Likewise.
	* ld-plugin/pr13066.out: Likewise.
	* ld-plugin/pr13183.d: Likewise.
	* ld-plugin/pr13183a.c: Likewise.
	* ld-plugin/pr13183b.c: Likewise.
	* ld-plugin/pr13201.c: Likewise.
	* ld-plugin/pr13201.out: Likewise.
	* ld-plugin/pr13229.cc: Likewise.
	* ld-plugin/pr13229.d: Likewise.
	* ld-plugin/pr13244.c: Likewise.
	* ld-plugin/pr13244.d: Likewise.
	* ld-plugin/pr13287.cc: Likewise.
	* ld-plugin/run-ie.c: Likewise.
	* ld-plugin/run-ie.out: Likewise.
2012-12-07 19:23:50 +00:00
H.J. Lu c413941892 Add plugin visibility test
* ld-plugin/func1p.c: New file.
	* ld-plugin/func2i.c: Likewise.
	* ld-plugin/func3h.c: Likewise.

	* ld-plugin/plugin.exp (plugin_extra_elf_tests): Add plugin
	visibility test.
2012-12-07 19:14:41 +00:00
H.J. Lu 3bd58fbe75 Add check_lto_available
* lib/ld-lib.exp (check_lto_available): New.  Check if compiler
	supports LTO.
2012-12-07 17:56:09 +00:00
H.J. Lu 741e012828 Properly check linker warnings
* lib/ld-lib.exp (run_cc_link_tests): Properly check linker
	warnings.
2012-12-07 17:53:04 +00:00
H.J. Lu d52a4dca58 Pass -rc to ar
* lib/ld-lib.exp (ar_simple_create): Pass -rc to ar.
2012-12-07 17:51:35 +00:00
H.J. Lu 133c2bb257 Add a testase for PR ld/14926
PR ld/14926
	* ld-elf/pr14926.d: New file.
	* ld-elf/pr14926.s: Likewise.
2012-12-07 12:32:50 +00:00
Alan Modra 71f058efca * ld-elf/comm-data.exp: Revert last change.
* ld-elf/comm-data5.d: xfail frv-linux.
2012-12-07 06:00:06 +00:00
Alan Modra 2eb64a9f4b * ld-elf/shared.exp (libneeded1a.so): Override any system
supplied --as-needed or --add-needed flag.
2012-12-07 05:26:39 +00:00
H.J. Lu 8fbb09e83e Extend --copy-dt-needed-entries to creating DSO
ld/

	PR ld/14915
	* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Also
	check DT_NEEDED entries when creating shared object with
	--copy-dt-needed-entries.

ld/testsuite/

	PR ld/14915
	* ld-elf/shared.exp (build_tests): Test --add-needed,
	--copy-dt-needed-entries, --no-add-needed and
	--no-copy-dt-needed-entries with -shared.
	Add tests for --no-add-needed and --no-copy-dt-needed-entries
	with -shared.
2012-12-06 00:25:19 +00:00
Alan Modra 5c3ab52b3b * ld-elf/comm-data4.d, ld-elf/comm-data4.s: New test.
* ld-elf/comm-data5.d, ld-elf/comm-data5.s: New test.
	* ld-elf/comm-data.exp: Run them.
2012-12-06 00:10:41 +00:00
Alan Modra 79056107ed Add x86_64-*-rdos. 2012-12-05 05:48:19 +00:00
H.J. Lu 63406f0ab7 Add tests for --add-needed/--copy-dt-needed-entries
* ld-elf/shared.exp (build_tests): Build libneeded1b.so,
	libneeded1a.so and libneeded1c.o.
	(run_tests): Test --add-needed and --copy-dt-needed-entries.
	Add tests for --no-add-needed and --no-copy-dt-needed-entries.

	* ld-elf/needed1.out: New file.
	* ld-elf/needed1a.c: Likewise.
	* ld-elf/needed1b.c: Likewise.
	* ld-elf/needed1c.c: Likewise.
2012-12-04 17:44:43 +00:00
Maciej W. Rozycki bb555ef860 * ld-mips-elf/attr-gnu-4-45.d: Add missing "readelf" keyword.
Update dump according to current output.
2012-12-03 16:26:30 +00:00
Maciej W. Rozycki 6ae68ba390 bfd/
* elf32-mips.c (bfd_elf32_mkobject): New macro.
	* elf64-mips.c (bfd_elf64_mkobject): Likewise.
	* elfn32-mips.c (bfd_elf32_mkobject): Likewise.
	* elfxx-mips.h (_bfd_mips_elf_mkobject): New prototype.
	* elfxx-mips.c (mips_elf_obj_tdata): New struct.
	(mips_elf_tdata): New macro.
	(_bfd_mips_elf_mkobject): New function.
	(mips_elf_merge_obj_attributes): Report the originating input BFD
	on attribute conflicts.

	ld/testsuite/
	* ld-mips-elf/attr-gnu-4-12.d: Update the warning message.
	* ld-mips-elf/attr-gnu-4-13.d: Likewise.
	* ld-mips-elf/attr-gnu-4-14.d: Likewise.
	* ld-mips-elf/attr-gnu-4-15.d: Likewise.
	* ld-mips-elf/attr-gnu-4-21.d: Likewise.
	* ld-mips-elf/attr-gnu-4-23.d: Likewise.
	* ld-mips-elf/attr-gnu-4-24.d: Likewise.
	* ld-mips-elf/attr-gnu-4-25.d: Likewise.
	* ld-mips-elf/attr-gnu-4-31.d: Likewise.
	* ld-mips-elf/attr-gnu-4-32.d: Likewise.
	* ld-mips-elf/attr-gnu-4-34.d: Likewise.
	* ld-mips-elf/attr-gnu-4-35.d: Likewise.
	* ld-mips-elf/attr-gnu-4-41.d: Likewise.
	* ld-mips-elf/attr-gnu-4-42.d: Likewise.
	* ld-mips-elf/attr-gnu-4-43.d: Likewise.
	* ld-mips-elf/attr-gnu-4-45.d: Likewise.
	* ld-mips-elf/attr-gnu-4-51.d: Likewise.
2012-12-03 16:17:48 +00:00
Maciej W. Rozycki 20696deded bfd/
* elfxx-mips.c (mips_elf_merge_obj_attributes): Correct messages
	for the -mdouble-float and -msingle-float cases throughout; make
	all the messages report the output file consistently on the
	left-hand side.

	ld/testsuite/
	* ld-mips-elf/attr-gnu-4-12.d: Adjust the warning expected
	according to changes to BFD.
	* ld-mips-elf/attr-gnu-4-14.d: Likewise.
	* ld-mips-elf/attr-gnu-4-31.d: Likewise.
	* ld-mips-elf/attr-gnu-4-32.d: Likewise.
	* ld-mips-elf/attr-gnu-4-34.d: Likewise.
	* ld-mips-elf/attr-gnu-4-41.d: Likewise.
2012-12-03 15:57:44 +00:00
H.J. Lu d82184d782 Improve plugin error handling
ld/

	PR ld/14904
	* ldmain.c (main): Don't check plugin_load_plugins return.

	* lexsup.c (parse_args): Don't check plugin_opt_plugin return.

	* plugin.c (dlerror): New.  Defined if HAVE_DLFCN_H isn't
	defined.
	(plugin_opt_plugin): Change return type to void.  Stop on
	dlopen error and report error with dlerror ().
	(plugin_load_plugins): Change return type to void.  Stop on
	dlsym error and report error with dlerror ().  Don't use
	set_plugin_error.
	(plugin_call_cleanup): Issue an error for each plugin.

	* plugin.h (plugin_opt_plugin): Change return type to void.
	(plugin_load_plugins): Likewise.

ld/testsuite/

	PR ld/14904
	* ld-plugin/plugin-2.d: Update expected error message.
	* ld-plugin/plugin-4.d: Likewise.
2012-12-03 14:34:06 +00:00
Roland McGrath 1438a3ee10 ld/testsuite/
* ld-elf/ehdr_start.s: Put reference in .rodata section, not .data.
2012-11-30 21:14:02 +00:00
Joern Rennecke f204ddb8a8 * scripttempl/epiphany_4x4.sc, emulparams/elf32epiphany_4x4.sh: Add.
* emultempl/epiphanyelf_4x4.em: Likewise.
        * configure.tgt: Add elf32epiphany_4x4 support.
        * Makefile.am: Likewise.
        * Makefile.in: Regenerate.
2012-11-30 18:28:38 +00:00
Maciej W. Rozycki e63962bcf0 * Makefile.in: Regenerate. 2012-11-29 11:03:13 +00:00
Roland McGrath 6595185552 binutils/testsuite/
* lib/binutils-common.exp (is_zlib_supported): New function.
	* lib/utils-lib.exp (run_dump_test): If as options include
	--compress-debug-sections and zlib is not available, report
	the test as unsupported.
	* binutils-all/compress.exp: Bail out if zlib is not available.
	* binutils-all/objdump.exp (objdump compressed debug):
	Mark unsupported if zlib is not available.
	* binutils-all/readelf.exp (readelf_compressed_wa_test): Likewise.

gas/testsuite/
	* lib/gas-defs.exp (run_dump_test): If as options include
	--compress-debug-sections and zlib is not available, report
	the test as unsupported.

ld/testsuite/
	* ld-elf/compress.exp: Bail out if zlib is not supported.
	* lib/ld-lib.exp (run_dump_test): If as options include
	--compress-debug-sections and zlib is not available, report
	the test as unsupported.
2012-11-27 17:26:11 +00:00
Roland McGrath 2a64e9e88d ld/testsuite/
* ld-elf/flags1.d: Add *-*-nacl* to xfail list.
	* ld-elf/orphan-region.d: Likewise.
2012-11-27 17:20:29 +00:00
Nick Clifton 11e7fd744a PR ld/14776
* ld.texinfo: Fix spelling mistakes.
2012-11-27 17:04:30 +00:00
Roland McGrath e2caaa1f59 ld/
* emultempl/aarch64elf.em (gld${EMULATION_NAME}_before_parse):
	Copy last elf32.em here too.
	* emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
	* emultempl/mmixelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
	* emultempl/scoreelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
2012-11-26 23:26:35 +00:00
Alan Modra 776fc41826 include/opcode/
* ppc.h (ppc_parse_cpu): Update prototype.
opcodes/
	* ppc-dis.c (ppc_parse_cpu): Add "sticky" param.  Track bits
	set from ppc_opts.sticky in it.  Delete "retain_mask".
	(powerpc_init_dialect): Choose default dialect from info->mach
	before parsing -M options.  Handle more bfd_mach_ppc variants.
	Update common default to power7.
gas/
	* config/tc-ppc.c (sticky): New var.
	(md_parse_option, ppc_machine): Update ppc_parse_cpu calls.
gas/testsuite/
	* gas/ppc/astest2.d: Pass -Mppc to objdump.
ld/testsuite/
	* ld-powerpc/plt1.d: Update for default "at" branch hints.
	* ld-powerpc/tlsexe.d: Likewise.
	* ld-powerpc/tlsexetoc.d: Likewise.
	* ld-powerpc/tlsopt1.d: Likewise.
	* ld-powerpc/tlsopt1_32.d: Likewise.
	* ld-powerpc/tlsopt2.d: Likewise.
	* ld-powerpc/tlsopt2_32.d: Likewise.
	* ld-powerpc/tlsopt4.d: Likewise.
	* ld-powerpc/tlsopt4_32.d: Likewise.
	* ld-powerpc/tlsso.d: Likewise.
	* ld-powerpc/tlstocso.d: Likewise.
2012-11-23 03:28:13 +00:00
H.J. Lu f1d8578513 Set output maxpagesize when rewriting program header
bfd/

	PR binutils/14493
	* elf.c (copy_elf_program_header): When rewriting program
	header, set the output maxpagesize to the maximum alignment
	of input PT_LOAD segments.

2012-11-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/14493
	* ld-elf/maxpage5.d: New file.
	* ld-elf/maxpage5.s: Likewise.
	* ld-elf/maxpage5.t: Likewise.
2012-11-21 21:31:18 +00:00
Roland McGrath 4724d37ec2 ld/
* ld.h (ld_config_type): New flag member separate_code.
	* emultempl/elf32.em
	(gld${EMULATION_NAME}_before_parse): Set it based on $SEPARATE_CODE.
	* ldlang.c (ldlang_override_segment_assignment): If it's set, then
	always return TRUE when SEC_CODE differs between the sections.
2012-11-21 19:56:38 +00:00
Roland McGrath e0799d78b1 * ld-elf/comm-data.exp: Add XFAIL for arm*-*-* targets, referring
to PR ld/13802.
2012-11-21 19:31:24 +00:00
H.J. Lu 2ddda9905b Run more tests on x86_64-*-linux-gnu*/i?86-*-linux-gnu
* ld-elf/discard1.d: Run on x86_64-*-linux-gnu*.
	* ld-elf/discard2.d: Likewise.
	* ld-elf/discard3.d: Likewise.
	* ld-elf/eh6.d: Likewise.
	* ld-elf/maxpage3c.d: Run on i?86-*-linux-gnu.
	* ld-elf/maxpage4.d: Likewise.
2012-11-21 13:53:23 +00:00
H.J. Lu dda8ddc56f Remove ref_dynamic_nonweak added by accident
bfd/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14862
	* elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
	added by accident.
	(elf_link_add_object_symbols): Don't set nor check
	ref_dynamic_nonweak.

ld/testsuite/

2012-11-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14862
	* ld-elf/shared.exp (build_tests): Build libpr14862-1.o and
	libpr14862.so.
	(run_tests): Test pr14862.

	* ld-elf/pr14862-1.c: New file.
	* ld-elf/pr14862-2.c: Likewise.
	* ld-elf/pr14862.map: Likewise.
	* ld-elf/pr14862.out: Likewise.
2012-11-20 22:17:27 +00:00
H.J. Lu b039ef0457 Implement ELF linker -z global option
ld/

	* ld.texinfo: Document "-z global".

	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Support
	"-z global".
	(gld${EMULATION_NAME}_list_options): Likewise.

ld/testsuite/

	* ld-elf/global1.d: New file.
2012-11-20 22:16:05 +00:00
Maxim Kuvyrkov 3d3163562c Fix typo. 2012-11-16 04:01:14 +00:00
Maxim Kuvyrkov 507dcd87bd Port lib32 arangement from Debian.
* emulparams/elf_i386.sh: Include lib32 directories in library search
	path.
2012-11-16 04:00:41 +00:00
Simon Baldwin 24a0971372 * ldmain.c (main): Add start_sbrk set to sbrk(0) on entry.
On exit, compute data size as the delta between current
	sbrk(0) and start_sbrk.
2012-11-15 10:49:02 +00:00
Michael Eager 2f3f7f33ee Files missing from previous commit. 2012-11-09 22:43:28 +00:00
Nick Clifton de863c7475 2012-11-09 Nick Clifton <nickc@redhat.com>
* Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
	(ALL_MACHINES_CFILES): Add cpu-v850-rh850.c.
	* archures.c (bfd_arch_info): Add bfd_v850_rh850_arch.
	* config.bfd: Likewise.
	* configure.in: Add bfd_elf32_v850_rh850_vec.
	* cpu-v850.c: Update printed description.
	* cpu-v850_rh850.c: New file.
	* elf32-v850.c (v850_elf_check_relocs): Add support for RH850 ABI
	relocs.
	(v850_elf_perform_relocation): Likewise.
	(v850_elf_final_link_relocate): Likewise.
	(v850_elf_relocate_section): Likewise.
	(v850_elf_relax_section): Likewise.
	(v800_elf_howto_table): New.
	(v850_elf_object_p): Add support for RH850 ABI values.
	(v850_elf_final_write_processing): Likewise.
	(v850_elf_merge_private_bfd_data): Likewise.
	(v850_elf_print_private_bfd_data): Likewise.
	(v800_elf_reloc_map): New.
	(v800_elf_reloc_type_lookup): New.
	(v800_elf_reloc_name_lookup): New.
	(v800_elf_info_to_howto): New.
	(bfd_elf32_v850_rh850_vec): New.
	(bfd_arch_v850_rh850): New.
	* targets.c (_bfd_targets): Add bfd_elf32_v850_rh850_vec.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.

	* readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI.
	(guess_is_rela): Add EM_V800.
	(dump_relocations): Likewise.
	(get_machine_name): Update EM_V800.
	(get_machine_flags): Add support for RH850 ABI flags.
	(is_32bit_abs_reloc): Add support for RH850 ABI reloc.

	* config/tc-v850.c (v850_target_arch): New.
	(v850_target_format): New.
	(set_machine): Use v850_target_arch.
	(md_begin): Likewise.
	(md_show_usage): Document new switches.
	(md_parse_option): Add -mgcc-abi, -mrh850-abi, -m8byte-align and
	-m4byte-align.
	* config/tc-v850.c (TARGET_ARCH) Use v850_target_arch.
	(TARGET_FORMAT): Use v850_target_format.
	* doc/c-v850.texi: Document new options.

	* v850.h: Add RH850 ABI values.

	* Makefile.am: (ALL_EMULATION_SOURCES): Add ev850_rh850.c.
	* Makefile.in: Regenerate.
	* configure.tgt (v850*-*-*): Make v850_rh850 the default
	emulation. Add vanilla v850 as an extra emulation.
	* emulparams/v850_rh850.sh: New file.
	* scripttempl/v850_rh850.sc: New file.

	* configure.in: Add bfd_v850_rh850_arch.
	* configure: Regenerate.
	* disassemble.c (disassembler): Likewise.
2012-11-09 17:36:19 +00:00
Nick Clifton 708e2187a3 2012-11-09 Nick Clifton <nickc@redhat.com>
* elf32-rx.c (describe_flags): New function.  Returns a buffer
	containing a description of the E_FLAG_RX_... values set.
	(rx_elf_merge_private_bfd_data): Use it.
	(rx_elf_print_private_bfd_data): Likewise.
	(elf32_rx_machine): Skip EF_RX_CPU_RX check.
	(elf32_rx_special_sections): Define.
	(elf_backend_special_sections): Define.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* readelf.c (get_machine_flags): Add support for E_FLAG_RX_ABI.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* config/obj-elf.c (obj_elf_change_section): Allow init array
	sections to have the SHF_EXECINSTR attribute for the RX target.
	* config/tc-rx.c (elf_flags): Initialise with E_FLAG_RX_ABI.
	(enum options): Add OPTION_USES_GCC_ABI and OPTION_USES_RX_ABI.
	(md_longopts): Add -mgcc-abi and -mrx-abi.
	(md_parse_option): Add support for OPTION_USES_GCC_ABI and
	OPTION_USES_RX_ABI.
	* doc/as.texinfo (RX Options): Add mention of remaining RX
	options.
	* doc/c-rx.texi: Document -mgcc-abi and -mrx-abi.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* rx.h (EF_RX_CPU_RX): Add comment.
	(E_FLAG_RX_ABI): Define.

2012-11-09  Nick Clifton  <nickc@redhat.com>

	* emultempl/rxelf.em (no_flag_mismatch_warnings): Initialise to
	true.
	(PARSE_AND_LIST_LONGOPTS): Add flag-mismatch-warnings.
	(PARSE_AND_LIST_ARG_CASES): Add support for
	--flag-mismatch-warnings.
2012-11-09 17:00:44 +00:00
Michael Eager f23200ada9 Add microblazeel target support to bfd, gas and ld.
binutils/bfd/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * config.bfd: Add microblazeel-*-*
          * configure.in: Likewise.
          * configure: Regenerate.
          * elf32-microblaze.c (microblaze_elf_relocate_section):
            Add endian awareness.
            (microblaze_elf_merge_private_bfd_data): New.
            (microblaze_bfd_write_imm_value_32): New.
            (microblaze_bfd_write_imm_value_64): New.
            (microblaze_elf_relax_section): Add endian awareness.
            (microblaze_elf_add_symbol_hook): Define TARGET_LITTLE_NAME,
            TARGET_LITTLE_SYM and bfd_elf32_bfd_merge_private_bfd_data.
          * targets.c: Add bfd target bfd_elf32_microblazeel_vec.

binutils/gas/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * tc-microblaze.c (md_longopts): Define OPTION_EB and
            OPTION_EL for target.
            (md_parse_option): Likewise.
          * tc-microblaze.h: Set elf32-microblazeel if not
            target_big_endian for TARGET_FORMAT.
          * configure.tgt: Add microblazeel and set endian per target.

binutils/gas/testsuite/Changelog

 2012-11-09  David Holsgrove  <david.holsgrove@xilinx.com>

          * gas/microblaze/endian.exp: New file - endian
            testcase for microblaze / microblazeel.
          * gas/microblaze/endian.s: Likewise.
          * gas/microblaze/endian_be.d: Likewise.
          * gas/microblaze/endian_le.d: Likewise.
          * gas/microblaze/endian_le_elf.d: Likewise.
          * gas/microblaze/reloc_sym.d: Update to accept targets
            other than elf32-microblaze.
          * gas/microblaze/special_reg.d: Likewise.

binutils/ld/Changelog

 2012-11-09  Edgar E. Iglesias <edgar.iglesias@gmail.com>

          * Makefile.am: Add eelf32microblazeel.c and eelf32mbel_linux.c.
          * Makefile.in: Regenerated.
          * configure.tgt: Add microblazeel and set endian per target.
          * emulparams/elf32mb_linux.sh: Add OUTPUT_FORMAT.
          * emulparams/elf32microblaze.sh: Likewise.
          * emulparams/elf32mbel_linux.sh: New file.
          * emulparams/elf32microblazeel.sh: Likewise.
2012-11-09 16:25:12 +00:00
H.J. Lu 5bb3703f01 Remove trailing redundant `;'
bfd/

	* aout-tic30.c (MY_final_link_callback): Remove trailing
	redundant `;'.
	* coff-h8500.c (extra_case): Likewise.
	(bfd_coff_reloc16_get_value): Likewise.
	* dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Likewise.
	* elf.c (_bfd_elf_slurp_version_tables): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_perform_relocation): Likewise.
	* opncls.c (bfd_calc_gnu_debuglink_crc32): Likewise.
	* plugin.c (add_symbols): Likewise.
	* reloc.c (bfd_check_overflow): Likewise.
	* vms-lib.c (_bfd_vms_lib_archive_p): Likewise.

binutils/

	* coffgrok.c (coff_grok): Remove trailing redundant `;'.
	* resrc.c (open_input_stream): Likewise.

gas/

	* config/atof-ieee.c (gen_to_words): Remove trailing redundant
	`;'.
	* config/atof-vax.c (flonum_gen2vax): Likewise.
	* config/tc-d10v.c (write_2_short): Likewise.
	* config/tc-i386-intel.c (i386_intel_simplify): Likewise.
	* config/tc-s390.c (tc_s390_force_relocation): Likewise.
	* config/tc-v850.c (md_parse_option): Likewise.
	* config/tc-xtensa.c (find_address_of_next_align_frag): Likewise.
	* dwarf2dbg.c (out_header): Likewise.
	* symbols.c (dollar_label_name): Likewise.
	(fb_label_name): Likewise.

ld/

	* testplug.c (record_add_file): Remove trailing redundant `;'.

opcodes/

	* aarch64-opc.h (gen_mask): Remove trailing redundant `;'.
	* ia64-gen.c (fetch_insn_class): Likewise.
2012-11-09 08:29:34 +00:00
Sean Keys 178df8af8d 2012-11-07 James Murray <jsm@jsm-net.demon.co.uk>
* ld-m68hc11/movw.d: New test for 16bit relocate.
	* ld-m68hc11/movw.s: Source for test.
2012-11-07 20:35:02 +00:00
Alan Modra d17dce5567 * configure.in: Apply 2012-09-10 change to config.in here. 2012-11-05 10:45:32 +00:00
Nathan Sidwell 07e15f8731 * emultempl/elf32.em: Print stacksize help. 2012-11-01 14:26:47 +00:00
Alan Modra aa4c331959 * ldlang.c (insert_pad): Correct output section size calculation.
(lang_size_sections_1): Likewise for lang_data_statement and
	lang_reloc_statement.
2012-11-01 04:15:07 +00:00
Nick Clifton 65f4dd4721 oops accidentally omitted from previous delta 2012-10-31 08:42:11 +00:00
Nick Clifton 3bfcb6528e bfd:
* elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
        display the new ARM hard-float/soft-float ABI flags for EABI_VER5
        (elf32_arm_post_process_headers): Add the hard-float/soft-float
        ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.

binutils:
        * readelf.c (decode_ARM_machine_flags): Recognise and display the
        new ARM hard-float/soft-float ABI flags for EABI_VER5. Split out
        the code for EABI_VER4 and EABI_VER5 to allow this.

elfcpp:
        * arm.h: New enum for EABI soft- and hard-float flags.

gold:
        * gold.cc (Target_arm::do_adjust_elf_header): Add the
        hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC
        in EABI_VER5.

include:
        * elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
        (EF_ARM_ABI_FLOAT_HARD): Likewise.

ld/testsuite:
        * ld-arm/eabi-hard-float.s: New test source.
        * ld-arm/eabi-soft-float.s: New test source.
        * ld-arm/eabi-hard-float.d: New test.
        * ld-arm/eabi-soft-float.d: New test.
        * ld-arm/eabi-soft-float-ABI4.d: New test.
        * ld-arm/eabi-soft-float-r.d: New test.
        * ld-arm/arm-elf.xp: Use the new tests.

binutils:
	PR binutils/14779
	* configure.in: Add checks for wchar.h and mbstate_t.
	* config.in: Regenerate.
	* configure: Regenerate.
	* readelf.c: Conditionally include wchar.h.
	(print_symbol): Conditionally use mbstate_t.
2012-10-30 12:44:58 +00:00
Alan Modra ce23608fa2 binutils/
* dlltool.c (INIT_SEC_DATA): Move.
	(secdata <DLLTOOL_PPC>): Use here too.
binutils/testsuite/
	* binutils-all/copy-3.d: Exclude all cygwin and mingw targets,
	and rs6000.
gas/
	* config/tc-ppc.c (ppc_znop): Remove unused vars.
ld/
	* configure.tgt (powerpcle-pe,winnt,cygwin): Add deffilep.o
	and pe-dll.o.
2012-10-29 10:09:34 +00:00
Alan Modra ed6b7ef4bc * ld-powerpc/powerpc.exp: Modify emulation option passed to ld
when little-endian.
	* ld-powerpc/apuinfo-nul.rd: Update for le output.
	* ld-powerpc/apuinfo.rd: Likewise.
	* ld-powerpc/plt1.d: Likewise.
	* ld-powerpc/relax.d: Likewise.
	* ld-powerpc/relaxr.d: Likewise.
	* ld-powerpc/sdadyn.d: Likewise.
	* ld-powerpc/tls.d: Likewise.
	* ld-powerpc/tls.g: Likewise.
	* ld-powerpc/tls.t: Likewise.
	* ld-powerpc/tls32.d: Likewise.
	* ld-powerpc/tls32.g: Likewise.
	* ld-powerpc/tls32.t: Likewise.
	* ld-powerpc/tlsexe.d: Likewise.
	* ld-powerpc/tlsexe.g: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsexe.t: Likewise.
	* ld-powerpc/tlsexe32.d: Likewise.
	* ld-powerpc/tlsexe32.g: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsexe32.t: Likewise.
	* ld-powerpc/tlsexetoc.d: Likewise.
	* ld-powerpc/tlsexetoc.g: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlsexetoc.t: Likewise.
	* ld-powerpc/tlsmark.d: Likewise.
	* ld-powerpc/tlsmark32.d: Likewise.
	* ld-powerpc/tlsopt1.d: Likewise.
	* ld-powerpc/tlsopt1_32.d: Likewise.
	* ld-powerpc/tlsopt2.d: Likewise.
	* ld-powerpc/tlsopt2_32.d: Likewise.
	* ld-powerpc/tlsopt3.d: Likewise.
	* ld-powerpc/tlsopt3_32.d: Likewise.
	* ld-powerpc/tlsopt4.d: Likewise.
	* ld-powerpc/tlsopt4_32.d: Likewise.
	* ld-powerpc/tlsso.d: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso.t: Likewise.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.g: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlsso32.t: Likewise.
	* ld-powerpc/tlstoc.d: Likewise.
	* ld-powerpc/tlstoc.g: Likewise.
	* ld-powerpc/tlstoc.t: Likewise.
	* ld-powerpc/tlstocso.d: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-powerpc/tlstocso.t: Likewise.
	* ld-powerpc/tocopt.out: Likewise.
2012-10-29 09:25:53 +00:00
H.J. Lu 9361f82f3a Remove address check if HIDDEN_UNDEF_TEST is defined
* ld-elfvsb/main.c (main_visibility_checkcom): Remove address
	check for visibility_def if HIDDEN_UNDEF_TEST is defined.
	(main_visibility_checkweak): Remove address check for
	visibility_func if HIDDEN_UNDEF_TEST is defined.
2012-10-25 03:59:37 +00:00
Alan Modra c38b984508 * ld-scripts/empty-aligned.d: Revert last change. Allow more
than one header, just not two PT_LOAD.
	* ld-elf/stack.s: Use .long 0 rather than nops.
2012-10-24 23:22:48 +00:00
H.J. Lu 4f9d22a0b1 Move disable_target_specific_optimizations to bfd_link_info
include/

	* bfdlink.h (bfd_link_info): Add
	disable_target_specific_optimizations.

ld/

	* ld.h (command_line): Remove
	disable_target_specific_optimizations.
	(RELAXATION_DISABLED_BY_DEFAULT): Removed.
	(RELAXATION_DISABLED_BY_USER): Likewise.
	(RELAXATION_ENABLED): Likewise.
	(DISABLE_RELAXATION): Likewise.
	(ENABLE_RELAXATION): Likewise.

	* ldmain.c (main): Updated.

	* ldmain.h (RELAXATION_DISABLED_BY_DEFAULT): New macro.
	(RELAXATION_DISABLED_BY_USER): Likewise.
	(RELAXATION_ENABLED): Likewise.
	(DISABLE_RELAXATION): Likewise.
	(ENABLE_RELAXATION): Likewise.
2012-10-24 11:09:28 +00:00
Nathan Sidwell 04c3a75556 bfd/
* bfd-in.h (bfd_elf_stack_segment_size): Declare.
	* bfd-in2.h: Rebuilt.
	* elfxx-target.h (elf_backend_stack_align): New.
	(elfNN_bed): Add it.
	* elf-bfd.h (struct elf_backend_data): Add stack_align field.
	* elf.c (bfd_elf_map_sections_to_segments): Pay attention to
	stack_align and stacksize for PT_GNU_STACK segment.
	(assign_file_positions_for_non_load_sections): Set p_memsz for
	PT_GNU_STACK segment.
	(copy_elf_program_header): Copy PT_GNU_STACK size.
	* elflink.c (bfd_elf_stack_segment_size): New function, taken from
	uclinux backends.
	(bfd_elf_size_dynamic_sections): Determine
	PT_GNU_STACK requirements after calling backend.  Pay attention to
	stacksize.
	* elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_bfinfdpic_modify_program_headers): Delete.
	(elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-frv.c (frvfdpic_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_frvfdpic_modify_program_headers): Delete.
	(elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-lm32.c (lm32_elf_always_size_sections): Leave
	PT_GNU_STACK creation to underlying elf support.  Check
	__stacksize here for backwards compatibility, and set it if
	needed.
	(lm32_elf_modify_segment_map): Delete.
	(lm32_elf_modify_program_headers): Delete.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_segment_map): Don't override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-sh.c (sh_elf_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(sh_elf_modify_program_headers): Delete.
	(sh_elf_copy_private_data): Don't copy PT_GNU_STACK
	here.
	(elf_backend_stack_align): Override.
	(elf_backend_modify_program_headers): Don't override.
	* elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
	bfd_elf_stack_segment_size.
	(elf32_tic6x_modify_program_headers): Delete.
	(elf32_tic6x_copy_private_data): Delete.
	(elf_backend_stack_align): Override.
	(bfd_elf32_bfd_copy_private_bfd_data): Don't override.
	(elf_backend_modify_program_headers): Don't override.

	include/
	* bfdlink.h (struct bfd_link_info): Add stacksize option.

	ld/
	* ld.texinfo (stack-size): New option.
	* emultempl/elf32.em: Add stack-size option.

	ld/testsuite/
	* ld-elf/binutils.exp: Add -z stack-size=0.
	* ld-elf/elf.exp: Add stack-exec and stack-size tests.
	* ld-elf/orphan-region.d: Add stack-size option. Remove xfail.
	* ld-elf/stack-exec.rd: New.
	* ld-elf/stack-size.rd: New.
	* ld-elf/stack.s: New.
	* ld-scripts/empty-aligned.d: Add stack-size option.
	* ld-sh/fdpic-stack-set.d: New.
	* ld-tic6x/shlib-1.rd: Remove __stacksize symbol.
	* ld-tic6x/shlib-1b.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
2012-10-23 09:33:56 +00:00
Alan Modra 0e86e20e04 include/
PR ld/14426
	* bfdlink.h (bfd_link_info): Add ignore_hash.
ld/
	PR ld/14426
	* ldlex.h (option_values): Add OPTION_IGNORE_UNRESOLVED_SYMBOL.
	* lexsup.c (parse_args): Likewise.
	(ld_options): Describe --ignore-unresolved-symbol.
	* ldmain.h (add_ignoresym): Declare.
	* ldmain.c (add_ignoresym): New function, extracted from..
	(undefined_symbol): ..here.  Return if the symbol is in ignore_hash.
	(constructor_callback): Don't use global link_info here.
	(reloc_overflow): Likewise.
2012-10-22 13:33:49 +00:00
Alan Modra a8f9d13eda * plugin.c (plugin_load_plugins): Warning fix. 2012-10-22 04:54:25 +00:00
Kai Tietz 8d55a8a051 Add missed file on my last commit 2012-10-18 20:40:39 +00:00
Kai Tietz a29a8af823 ChangeLog bfd
2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
	Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
	* coff-x86_64.c: Likewise.
	* coffcode.h (DOT_ZDEBUG): New define.
	(sec_to_styp_flags): Check for .zdebug.
	(styp_to_sec_flags): Likewise.
	* coffgen.c (make_a_section): Handle .debug_* section
	compression/decompression flags.
	* cofflink.c (mark_relocs): Ignore relocations
	for a section, which isn't marked as used.
	(_bfd_coff_link_input_bfd): Add support of compressed
	debug sections.
	* compress.c (decompress_contents): Loop as long
	as there is input available and there is room for
	output.
	* bfd/pe-arm.c: Add .zdebug_ partial match entry.
	* pe-i386.c: Likewise.
	* pe-x86_64.c: Likewise.
	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
	data-directories as this might destroy content.

        * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
        define as coff_find_nearest_line_discriminator.
        * libcoff-in.h (coff_find_nearest_line_discriminator): New
        * libcoff.h: Regenerated.
        * coff-x86_64.c: Likewise.
        * coffgen.c (coff_find_nearest_line_discriminator): New function.
        prototype.

ChangeLog binutils

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	* objdump.c (dump_bfd): Call dump headers after
	call of slurp_symtab.

ChangeLog ld

2012-10-18  Kai Tietz  <ktietz@redhat.com>

	PR binutils/14067
	* NEWS: Menition new feature.
	* scripttempl/pep.sc: Add zdebug sections.
	* scripttempl/pe.sc: L
2012-10-18 17:42:29 +00:00
Yufeng Zhang bb3f9ed8ba Fixed AArch64 TLS relocation resolution.
bfd/

	* elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
	R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
	R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
	R_AARCH64_TLSLE_ADD_TPREL_HI12.
	(elf64_aarch64_tlsdesc_howto_table): Fix shift value for
	R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
	(elf64_aarch64_final_link_relocate): Add signed_addend when resolving
	AARCH64_TLSLE_*_TPREL_* relocations.

	ld/testsuite/

	* ld-aarch64/tlsle-symbol-offset.s: New file.
	* ld-aarch64/tlsle-symbol-offset.d: New file.
	* ld-aarch64/aarch64-elf.exp: Add tlsle-symbol-offset test.
2012-10-16 16:36:50 +00:00
Alan Modra c19a889118 * ld-scripts/sane1.d: Sort output from nm. Allow for other symbols in
output.
2012-10-08 00:22:45 +00:00
Steve Ellcey c76b75fd82 2012-09-19 Steve Ellcey <sellcey@mips.com>
* configure.tgt: Add mips*-mti-elf* target.
2012-09-19 20:14:26 +00:00
Richard Earnshaw 287904cecb 2012-09-19 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
* ld-aarch64/emit-relocs-309-low.d: Replace symbol with regexp.
	* ld-aarch64/emit-relocs-309-up.d: Likewise.
2012-09-19 08:51:15 +00:00
Alan Modra 602f5faf49 * ld-scripts/assign-loc.d: New file. Test for assigning absolute
symbol to location counter.
	* ld-scripts/assign-loc.t: New file.  Linker script for above test.
	* ld-scripts/expr.exp: Add new assignment test.
2012-09-19 02:51:09 +00:00
H.J. Lu 37a9e49a28 Properly handle common symbol and weak function
bfd/

	PR ld/14591
	* elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
	if the old symbol is weak.

	* elf32-sh-symbian.c (sh_symbian_relocate_section): Update
	_bfd_elf_merge_symbol call.

	* elflink.c (_bfd_elf_merge_symbol): Add an argument to return
	if the old symbol is weak.
	(_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
	call.
	(elf_link_add_object_symbols): Don't update symbol type from a
	weak definition.  Update symbol type from a common symbol when
	overriding a weak symbol.

ld/testsuite/

	PR ld/14591
	* ld-elf/comm-data.exp (run_ld_link_tests): Add comm-data3a and
	comm-data3b tests.

	* ld-ifunc/ifunc.exp (run_ld_link_exec_tests): New.

	* ld-elf/comm-data3.sd: New file.
	* ld-elf/comm-data3a.s: Likewise.
	* ld-elf/comm-data3b.s: Likewise.
	* ld-ifunc/ifunc-17a-i386.d: Likewise.
	* ld-ifunc/ifunc-17a-x86-64.d: Likewise.
	* ld-ifunc/ifunc-17a.s: Likewise.
	* ld-ifunc/ifunc-17b-i386.d: Likewise.
	* ld-ifunc/ifunc-17b-x86-64.d: Likewise.
	* ld-ifunc/ifunc-17b.s: Likewise.
	* ld-ifunc/ifunc-common-1.out: Likewise.
	* ld-ifunc/ifunc-common-1a.c: Likewise.
	* ld-ifunc/ifunc-common-1b.c: Likewise.
2012-09-19 00:53:30 +00:00
H.J. Lu cb5ab6c82c Assemble all sources files in each test
* ld-elf/shared.exp (build_cxx_tests): Move out the commented out
	test.

	* lib/ld-lib.exp (run_ld_link_exec_tests): Assemble all sources
	files in each test.
2012-09-17 19:51:25 +00:00
Alan Modra c05f749ea6 * ld.texinfo (Expression Section): Correct description of
conversions for a binary operation involving an absolute symbol
	and a number.
2012-09-16 22:21:00 +00:00
David Edelsohn 5220435761 * configure: Regenerate. 2012-09-15 00:04:44 +00:00
Anthony Green e202fa84e7 Bi-endian patches for moxie 2012-09-13 22:24:51 +00:00
DJ Delorie 7c0e90d28c * emulparams/elf32rx.sh (OTHER_READONLY_SECTIONS): Add W_* sections. 2012-09-12 21:28:04 +00:00
Richard Earnshaw f41aef5f6e 2012-09-11 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
bfd/

	* bfd-in2.h: Regenerated.
	* elf64-aarch64.c
	(elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
	(elf64_aarch64_reloc_map): Add reloc entry.
	(aarch64_resolve_relocation): Likewise.
	(bfd_elf_aarch64_put_addend): Likewise.
	(aarch64_reloc_got_type): Likewise.
	(elf64_aarch64_final_link_relocate): Likewise.
	(lf64_aarch64_check_relocs): Likewise.
	(elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
	reloc.
	* libbfd.h: Regenerated.
	* reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.

	gas/

	* config/tc-aarch64.c
	(reloc_table): Add reloc to table entry.
	(parse_address_main): Add support for #:<reloc_op>:<symbol>.
	(parse_operands): Check for unused reloc.
	(md_apply_fix): New case for reloc.
	(aarch64_force_relocation): Likewise.

	gas/testsuite

	* gas/aarch64/reloc-insn.d
	(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test.
	* gas/aarch64/reloc-insn.s
	(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc.

	include/

	* elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.

	ld/testsuite

	* ld-aarch64/aarch64-elf.exp: New reloc tests.
	* ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test
	failure (lower bound overflow).
	* ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test
	success (lower bound).
	* ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test
	failure (upper bound overflow).
	* ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test
	success (upper bound).
	* ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
2012-09-12 16:25:51 +00:00
Alan Modra 00716ab174 * config.in: Disable sanity check for kfreebsd. 2012-09-10 22:30:57 +00:00
H.J. Lu 6d2920c847 Regenerate binutils configure
bfd/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

binutils/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

etc/

2010-11-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.in (install-strip): New target.

gas/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

gold/

2012-09-09  Alan Modra  <amodra@gmail.com>

	* target.h (Target::gc_mark_symbol, do_gc_mark_symbol): New functions.

gprof/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

intl/

2010-06-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/44621

ld/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.

libiberty/

2011-08-28  H.J. Lu  <hongjiu.lu@intel.com>

	* argv.c (dupargv): Replace malloc with xmalloc.  Don't check

opcodes/

2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* configure: Regenerated.
2012-09-10 17:00:44 +00:00
Alan Modra ffda88b480 * configure.tgt (powerpc-*-elf, et al): Define targ_extra_libpath.
Correct whitespace.
	(powerpcle-*-elf, et al): Likewise.  Correct targ_extra_emuls.
2012-09-10 14:35:07 +00:00
Iain Sandoe c008817b74 * configure.tgt (powerpc-*-elf, et al): Define targ64_extra_emuls
and targ64_extra_libpath.
        (powerpcle-*-elf, et al): Likewise.
2012-09-10 09:59:07 +00:00
Hans-Peter Nilsson 2e0a763211 * ld-mmix/sec-1.d, ld-mmix/sec-3.d: Force end-of-section symbols
to be emitted and checked.
	* ld-mmix/data-1.s, ld-mmix/orph-.d, ld-mmix/orph-awp.d,
	ld-mmix/orph-d-a.d, ld-mmix/orph-d-awn.d, ld-mmix/orph-d-awp.d,
	ld-mmix/orph-d-awpe.d, ld-mmix/orph-d.d, ld-mmix/orph-dc-ap.d,
	ld-mmix/orph-dc-awp.d, ld-mmix/orph-dc.d, ld-mmix/tm-ae.s,
	ld-mmix/tm-ape.s, ld-mmix/tm-awne.s, ld-mmix/tm-awpe.s,
	ld-mmix/tm-d-ap.s, ld-mmix/tm-d-awp.s, ld-mmix/tm-d.s,
	ld-mmix/tm-e.s, ld-mmix/tm-orph1.s: New test files.
2012-09-09 16:31:12 +00:00
Hans-Peter Nilsson a9ae0bdaba * emultempl/mmo.em (mmo_place_orphan): Rewrite to also attach
orphan sections to .data and .bss output sections, not just .text.
	When giving up on finding a suitable output section, attach to any
	output section other than .MMIX.reg_contents, if it exists.
	* scripttempl/mmo.sc: Move output debug sections to just before
	.MMIX.reg_contents.  Add .gnu.attributes.  Add new . = . NOP
	assignments and move end-of-section provide-symbols after them
	to force the end-of-section symbols to the address after orphan
	placement.  Add SORT_NONE to .init and .fini sections.
2012-09-09 16:30:40 +00:00
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
Roland McGrath dc60a23811 ld/testsuite/
* ld-arm/arm-elf.exp (armelftests_common): Add a test that gets
	arm-lib.so built so armeabitests_common can use it.
	(unresolved-1-dyn): Exclude this test for [istarget "arm*-*-nacl*"].
2012-06-28 16:31:57 +00:00
H.J. Lu a61fdf08f5 Remove redundant statement
* ldlang.c (update_wild_statements): Remove redundant statement.
2012-06-28 12:53:29 +00:00
Roland McGrath c200d65dfe ld-elf/ehdr_start.d (target): Add *-*-nacl*. 2012-06-27 01:26:33 +00:00
Alan Modra 6b585b735f * ld-elf/ehdr_start.s: Use data rather than rodata.
* ld-elf/ehdr_start.d: Run on linux and gnu targets only.
2012-06-27 01:18:09 +00:00
Roland McGrath 33c5d473e2 * ld-elf/ehdr_start.d (ld): Add explicit -e _start.
(notarget): Add arm*-*-eabi* cris-*-*.
2012-06-25 22:36:21 +00:00
Alan Modra 47e2e72998 * ldlang.c (load_symbols): Close file and set flags.loaded
after parsing script file.
	(open_input_bfds): Don't segv on closed script.
2012-06-25 01:49:08 +00:00
H.J. Lu 9e48fe0e38 Replace -linux-gnux32 with -linux-gnu 2012-06-24 21:47:45 +00:00
H.J. Lu 0c77920e10 Enable elf_k1om for x86_64-*-linux-gnux32
* configure.tgt: Enable elf_k1om for x86_64-*-linux-gnux32.
	Remove x32 in tdir_i386linux and tdir_elf_i386.
2012-06-24 18:52:17 +00:00
Roland McGrath 62655c7b8b bfd/
* elf.c (assign_file_positions_for_non_load_sections): Define
	__ehdr_start symbol if it's referenced and there's a PT_LOAD
	segment that covers both the file and program headers.

ld/
	* NEWS: Mention __ehdr_start.

ld/testsuite/
	* ld-elf/ehdr_start.s: New file.
	* ld-elf/ehdr_start.d: New file.
2012-06-22 16:52:33 +00:00
Alan Modra d9476c5a34 ld/
* ldlang.c (lang_insert_orphan): Don't make __start_<sec> symbol
	absolute, and remove unnecessary alignment.
ld/testsuite/
	* ld-gc/start.d: Update.
2012-06-21 03:33:00 +00:00
Hans-Peter Nilsson 5d5bf76dad Trim last, empty, line 2012-06-18 06:19:02 +00:00
Hans-Peter Nilsson a4a48c20d1 * ld-cris/dso-pltdis1.d, ld-cris/dso-pltdis2.d, dsofng.s
dsofn4g.s: New tests.
2012-06-18 06:17:36 +00:00
Hans-Peter Nilsson c7232d92d2 * ld-cris/tls-e-tpoffgotcomm1.d: New test. 2012-06-17 16:56:37 +00:00
Hans-Peter Nilsson 608129cf17 * ld-cris/tls-e-tpiecomm1.d, ld-cris/tls-e-tpiecomm1.s: New test.
* ld-cris/tls-dso-tpoffgotcomm1.d,
	ld-cris/tls-dso-tpoffgotcomm1.s: Ditto.
2012-06-17 07:29:55 +00:00
Alan Modra d2667025dd ld/
* ldlang.h (lang_output_section_statement_type): Add after_end field.
	(lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete.
	(section_for_dot): Declare.
	* ldlang.c (lang_size_sections_1): Correct comment.
	(current_section): Move earlier.
	(current_assign, prefer_next_section): New static vars.
	(lang_do_assignments_1): Add found_end param.  Detect _end
	assignment to set found_end.  Set os->after_end.  Set above statics.
	(lang_do_assignments): Adjust lang_do_assignments_1 call.  Init
	vars.
	(section_for_dot): New function.
	(lang_set_startof): Don't make an absolute symbol.
	(lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete.
	* ldexp.c (new_rel_from_abs): Use section_for_dot.
	* emultempl/lnk960.em (symbol_at_beginning_of): New function.
	(symbol_at_end_of): Likewise.
	(lnk960_after_allocation): Use them.
	* scripttempl/elf.sc: Precede OTHER_GOT_SYMBOLS with . = .; and
	likewise before __bss_start.

ld/testsuite/
Update far too many tests.
2012-06-15 15:13:41 +00:00
H.J. Lu 6611f2e124 Handle link_info.pie in ld plugin
* plugin.c (set_tv_header): Handle link_info.pie.
2012-06-14 23:44:38 +00:00
Nick Clifton fdbe2eb720 * ld-arm/arm-app-abs32.d; Update expected disassembly in line with
improved architecture detection.
	* ld-arm/arm-app.d: Likewise.
	* ld-arm/arm-lib-plt32.d: Likewise.
	* ld-arm/arm-lib.d: Likewise.
	* ld-arm/arm-static-app.d: Likewise.
	* ld-arm/armthumb-lib.d: Likewise.
	* ld-arm/farcall-mixed-app-v5.d: Likewise.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-lib-v4t.d: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/mixed-app-v5.d: Likewise.
	* ld-arm/mixed-app.d: Likewise.
	* ld-arm/mixed-lib.d: Likewise.
	* ld-arm/tls-app.d: Likewise.
	* ld-arm/tls-descrelax-be32.d: Likewise.
	* ld-arm/tls-descrelax.d: Likewise.
	* ld-arm/tls-descseq.d: Likewise.
	* ld-arm/tls-gdesc-got.d: Likewise.
	* ld-arm/tls-gdesc.d: Likewise.
	* ld-arm/tls-gdierelax.d: Likewise.
	* ld-arm/tls-gdierelax2.d: Likewise.
	* ld-arm/tls-gdlerelax.d: Likewise.
	* ld-arm/tls-lib-loc.d: Likewise.
	* ld-arm/tls-lib.d: Likewise.
	* ld-arm/tls-thumb1.d: Likewise.
2012-06-13 14:15:59 +00:00
H.J. Lu 8981c88a1e Abort if PT_GNU_RELRO segment doesn't fit in PT_LOAD segment
bfd/

	PR bfd/14207
	* elf.c (assign_file_positions_for_non_load_sections): Abort if
	PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.

ld/testsuite/

	PR ld/14207
	* ld-x86-64/x86-64.exp: Run pr14207.

	* ld-x86-64/pr14207.d: New file.
	* ld-x86-64/pr14207.s: Likewise.
2012-06-12 12:55:11 +00:00
H.J. Lu 17d6eea5d5 Don't hardcode .got.plt into DATA_SEGMENT_RELRO_END evaluation
ld/

	PR ld/14215
	* ldexp.c (fold_name <SIZEOF, ALIGNOF>): Allow forward section
	references.
	* emulparams/elf32_x86_64.sh (SEPARATE_GOTPLT): Depend on size of
	.got.plt.
	* emulparams/elf32mb_linux.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf32tilegx.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf32tilepro.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf64tilegx.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf_k1om.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf_l1om.sh (SEPARATE_GOTPLT): Likewise.
	* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Likewise.

ld/testsuite/

	PR ld/14215
	* ld-i386/i386.exp: Run pr14215.
	* ld-x86-64/x86-64.exp: Likewise.

	* ld-i386/pr14215.d: New file.
	* ld-i386/pr14215.s: Likewise.
	* ld-x86-64/pr14215.d: Likewise.
	* ld-x86-64/pr14215.s: Likewise.
2012-06-11 13:23:51 +00:00
Nick Clifton fef632e18b PR 13697
* scripttempl/avr.sc (.data): Keep it.
2012-06-07 16:53:10 +00:00
Alan Modra ffbc01ccf0 bfd/
* elflink.c (elf_link_input_bfd): Provide a file symbol for
	each input file with local syms, if the input lacks such.
	(bfd_elf_final_link): Add a file symbol to mark end of locals
	for which we can associate with input files.
	(struct elf_final_link_info): Add filesym_count field.
	(struct elf_outext_info): Add need_second_pass and second_pass.
	(elf_link_output_extsym): Detect symbols defined in the output
	file, emit them on second pass over locals.
ld/testsuite/
Update to suit added STT_FILE symbols.
2012-06-06 10:50:18 +00:00
Alan Modra 1564a22fcf * ld-mmix/bpo-9.d: Update.
* ld-mmix/bpo-10.d: Update.
	* ld-mmix/bpo-11.d: Update.
	* ld-mmix/sec-7m.d: Update.
2012-06-06 06:12:35 +00:00
Andreas Schwab 959a202ebc gprof/
* Makefile.am (TEXINFO_TEX): Remove $(top_srcdir) prefix.
	* Makefile.in: Regenerate.

ld/
	* Makefile.am (TEXINFO_TEX): Remove $(top_srcdir) prefix.
	* Makefile.in: Regenerate.
2012-06-02 10:19:24 +00:00
H.J. Lu 145fa769e6 Revert the last change 2012-06-01 02:28:32 +00:00
H.J. Lu 2d376810dc Move linker test entry to ld/testsuite/ChangeLog 2012-05-31 18:21:37 +00:00
H.J. Lu 653c23d819 Add missing "foo" after ".global"
2012-05-31  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-ifunc/ifunc-13a-x86-64.s: Add missing "foo" after ".global".
	* ld-ifunc/ifunc-15-x86-64.s: Likewise.
2012-05-31 17:16:54 +00:00
H.J. Lu 65db8fa586 Fix ChangeLog entry 2012-05-31 17:03:18 +00:00
Nick Clifton ea52a08872 * readelf.c (process_section_headers): Correct bug in previous
delta - display full section type in wide mode.

	* ld-tic6x/shlib-1b.rd: Revert previous delta.
	* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-1.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
2012-05-30 14:33:12 +00:00
Alan Modra 6d8bf25d7e * ldlang.h (lang_output_section_statement_type): Rename
"section_relative_symbol" field to "update_dot".
	* ldlang.c: Update all uses.
	(strip_excluded_output_sections): Don't test update_dot_tree here..
	(lang_leave_overlay): ..set update_dot here.
2012-05-30 04:19:11 +00:00
Nick Clifton d5531c88ee * ld-tic6x/shlib-1b.rd: Update expected readelf output.
* ld-tic6x/shlib-1rb.rd: Likewise.
	* ld-tic6x/shlib-1.rd: Likewise.
	* ld-tic6x/shlib-1r.rd: Likewise.
	* ld-tic6x/shlib-app-1b.rd: Likewise.
	* ld-tic6x/shlib-app-1rb.rd: Likewise.
	* ld-tic6x/shlib-app-1.rd: Likewise.
	* ld-tic6x/shlib-app-1r.rd: Likewise.
	* ld-tic6x/shlib-noindex.rd: Likewise.
	* ld-tic6x/static-app-1b.rd: Likewise.
	* ld-tic6x/static-app-1rb.rd: Likewise.
	* ld-tic6x/static-app-1.rd: Likewise.
	* ld-tic6x/static-app-1r.rd: Likewise.
2012-05-29 15:48:18 +00:00
Nick Clifton 7bfd842d05 * read.c (read_symbol_name): New function. Reads a symbol names.
Allows escape codes in names.
	(s_comm_internal): Use read_symbol_name.
	(s_globl, s_lsym, s_set, s_weakref): Likewise.
	* doc/as.texinfo: Document support for multibyte characters in
	symbol names.

	* gas/elf/syms.s: New test - checks the generation of multibyte
	symbol names.
	* gas/elf/syms.d: New file - expected readelf output.
	* gas/elf/elf.exp: Add syms.

	* readelf.c (print_symbol): Display multibyte characters in symbol
	names.
	(process_section_headers): Use print_symbol.

	* ld-ifunc/ifunc-13a-i386.s: Fix use of .global directive.
	* ld-ifunc/ifunc-15a-i385.s: Likewise.
2012-05-28 14:20:19 +00:00
Alan Modra e54e67a9e9 PR ld/14170
* ld-elf/pr14170a.s: Put foo, bar address in .data.
	* ld-elf/elf.exp: Don't run pr14170 test on hppa64-hpux.  Ignore
	tic6x warnings.
2012-05-28 04:08:53 +00:00
H.J. Lu de687b11fb Add a test for PR ld/14170
PR ld/14170
	* ld-elf/elf.exp: Add a test for PR ld/14170.

	* ld-elf/pr14170a.s: New file.
	* ld-elf/pr14170b.s: Likewise.
	* ld-elf/pr14170b.s: Likewise.
2012-05-27 14:45:41 +00:00
Alan Modra f05eb3b73c ld/
* ldlex.h (enum option_values): Move from..
	* lexsup.c: ..here.
	* emultempl/ppc32elf.em: Include ldlex.h.
	(PARSE_AND_LIST_ARGS_CASES): Disable optimisations when
	--traditional-format.
	* emultempl/ppc64elf.em: Likewise.
ld/testsuite/
	* ld-srec/srec.exp: Remove powerpc64 flag setting.
2012-05-26 11:13:20 +00:00
Alan Modra 9cf8b46e48 PR ld/13909
* emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Handle
	multiple .eh_frame sections attached to bfd.
2012-05-25 01:13:59 +00:00
Cary Coutant 18bbc1c5f0 ld/
* scripttempl/armbpabi.sc: Match .data.rel.ro.* sections more
	carefully.  Fix typo where .rela.data.rel.ro matches
	.rel.data.rel.ro.
	* scripttempl/mep.sc: Likewise.
	* scripttempl/elf.sc: Match .data.rel.ro.* sections more carefully.
	* scripttempl/elf64hppa.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
2012-05-24 01:04:53 +00:00
H.J. Lu 5d196efc83 Don't skip ld-elf/eh[1-4].d for x32
* ld-elf/eh1.d: Don't skip x86_64-*-linux-gnux32.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.
2012-05-22 21:52:07 +00:00
H.J. Lu 0adaa71ed6 Adjust ld-x86-64/ilp32-11.s for NACL
* ld-x86-64/ilp32-11.s Add ".space 0x1000" before func.
	(func): Make it global and hidden.
	* ld-x86-64/ilp32-11.d: Updated.
2012-05-22 21:42:50 +00:00
Roland McGrath dfc8a1a285 ld/testsuite/
* ld-elf/eh4.d: Revert last change.
	Loosen CFI-matching regexps so they match x86_64-*-nacl* variant too.
2012-05-22 18:42:37 +00:00
Roland McGrath ec44c212df ld/testsuite/
* ld-x86-64/pr12570a.d (name): Distinguish it from pr12570b.d case.
	Loosen CFI-matching regexp so it matches x86_64-*-nacl* variant too.
	* ld-x86-64/pr12570b.d: Likewise.
	* ld-x86-64/x86-64.exp: Revert last change.
2012-05-22 18:22:03 +00:00
H.J. Lu 45bb49c554 Skip/xfail x86_64-*-nacl* for eh4/pr12570a tests
* ld-elf/eh4.d: Skip x86_64-*-nacl*.

	* ld-x86-64/x86-64.exp: Xfail pr12570a for x86_64-*-nacl*.
2012-05-22 16:57:51 +00:00
H.J. Lu e4de50d447 Revert the change for PR ld/r13909
bfd/

	PR ld/13909
	* elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
	last change.
	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.

ld/testsuite/

2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/13909
	* ld-i386/i386.exp: Revert the last change.
	* ld-x86-64/x86-64.exp: Likewise.

	* ld-i386/dummy.s: Removed.
	* ld-i386/pr13909.d: Likewise.
	* ld-x86-64/pr13909.d: Likewise.
2012-05-22 15:55:01 +00:00
H.J. Lu 5d4f7eb2f0 Create PLT eh_frame section if there is .eh_frame section
bfd/

	PR ld/13909
	* elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
	eh_frame section if there is an input .eh_frame section.
	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.

ld/testsuite/

	PR ld/13909
	* ld-i386/i386.exp: Run pr13909.
	* ld-x86-64/x86-64.exp: Likewise.

	* ld-i386/dummy.s: New file.
	* ld-i386/pr13909.d: Likewise.
	* ld-x86-64/pr13909.d: Likewise.
2012-05-22 14:46:44 +00:00
H.J. Lu 2fe0fd0638 Always create PLT eh_frame section for i386/x86-64
bfd/

2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14105
	* elf32-i386.c (elf_i386_create_dynamic_sections): Always
	create PLT eh_frame section with SEC_LINKER_CREATED.
	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.

ld/testsuite/

2012-05-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/14105
	* ld-elf/eh4.d: Add PLT eh_frame.

	* ld-i386/i386.exp: Run pr12570a and pr12570b.
	* ld-x86-64/x86-64.exp: Likewise.

	* ld-i386/pr12570a.d: New file.
	* ld-i386/pr12570a.s: Likewise.
	* ld-i386/pr12570b.s: Likewise.
	* ld-i386/pr12570b.s: Likewise.
	* ld-x86-64/pr12570a.d: Likewise.
	* ld-x86-64/pr12570a.s: Likewise.
	* ld-x86-64/pr12570b.d: Likewise.
	* ld-x86-64/pr12570b.s: Likewise.
2012-05-22 14:05:21 +00:00
Alan Modra f06b801f66 * ld-elf/elf.exp (note-3.so): xfail tic6x due to non-pic warnings. 2012-05-19 10:39:07 +00:00
Alan Modra 94caa96637 bfd/
* elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
	(has_tls_reloc, has_tls_get_addr_call): Move back to..
	* elf32-ppc.c: ..here.
	(ppc_elf_section_flags, elf_backend_section_flags): Delete.
	(ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
opcodes/
	* ppc-dis.c: Don't include elf32-ppc.h, do include elf/ppc.h.
	(get_powerpc_dialect): Detect VLE sections from ELF sh_flags.
ld/testsuite/
	* ld-powerpc/vle.ld: New.
	* ld-powerpc/powerpc.exp (vle reloc tests): Link using vle.ld.
2012-05-19 06:58:48 +00:00
H.J. Lu 220cf8092f Don't make _DYNAMIC/_GLOBAL_OFFSET_TABLE_ absolute
bfd/

	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
	_DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
	* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.

ld/testsuite/

	* ld-i386/tlsdesc-nacl.rd: Update for dynamic sym changes.
	* ld-i386/tlsdesc.rd: Likewise.
	* ld-i386/tlsgdesc-nacl.rd: Likewise.
	* ld-i386/tlsgdesc.rd: Likewise.
	* ld-i386/tlsnopic-nacl.rd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlspic-nacl.rd: Likewise.
	* ld-i386/tlspic.rd: Likewise.
	* ld-x86-64/tlsdesc-nacl.rd: Likewise.
	* ld-x86-64/tlsdesc.rd: Likewise.
	* ld-x86-64/tlsgdesc-nacl.rd: Likewise.
	* ld-x86-64/tlsgdesc.rd: Likewise.
	* ld-x86-64/tlspic-nacl.rd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
2012-05-18 22:26:18 +00:00
Alan Modra 9ff2f2af64 * ld-tic6x/mvk-reloc-local-r.d: Adjust for signed addend.
* ld-tic6x/unwind-6.d: Typo fix.
2012-05-18 05:55:23 +00:00
Alan Modra 397b19d7ce * ld-elf/init-mixed.c: Include config.h first. 2012-05-18 02:05:23 +00:00
H.J. Lu 046e56f784 Expect addend as signed
binutils/testsuite/

	* binutils-all/hppa/objdump.exp: Expect addend as signed.

gas/testsuite/

	* gas/all/weakref1.d: Expect addend as signed.
	* gas/arm/pic_vxworks.d: Likewise.
	* gas/arm/wince.d: Likewise.
	* gas/h8300/h8300.exp: Likewise.
	* gas/i386/sub.d: Likewise.
	* gas/mips/ecoff@ld.d: Likewise.
	* gas/mips/ecoff@sd.d: Likewise.
	* gas/mips/l_d-n32.d: Likewise.
	* gas/mips/l_d-n64.d: Likewise.
	* gas/mips/l_d.d: Likewise.
	* gas/mips/ld-n32.d: Likewise.
	* gas/mips/ld-n64.d: Likewise.
	* gas/mips/ld.d: Likewise.
	* gas/mips/mips1@l_d.d: Likewise.
	* gas/mips/mips1@ld-forward.d: Likewise.
	* gas/mips/mips1@ld.d: Likewise.
	* gas/mips/mips1@s_d.d: Likewise.
	* gas/mips/s_d-n32.d: Likewise.
	* gas/mips/s_d-n64.d: Likewise.
	* gas/mips/s_d.d: Likewise.
	* gas/mips/sd-n32.d: Likewise.
	* gas/mips/sd-n64.d: Likewise.
	* gas/mips/sd.d: Likewise.
	* gas/mmix/bz-c.d: Likewise.
	* gas/mmix/geta-c.d: Likewise.
	* gas/mmix/jump-c.d: Likewise.
	* gas/mmix/pushj-c.d: Likewise.
	* gas/mmix/pushj-cs.d: Likewise.
	* gas/mmix/reloc16-n.d: Likewise.
	* gas/mmix/reloc16-r.d: Likewise.
	* gas/mmix/reloc16.d: Likewise.
	* gas/mmix/reloc8-r.d: Likewise.
	* gas/mmix/reloc8.d: Likewise.
	* gas/mmix/relocxrn.d: Likewise.
	* gas/sh/sh64/case-1.d: Likewise.
	* gas/sh/sh64/mix-1.d: Likewise.
	* gas/sh/sh64/pt32-1.d: Likewise.
	* gas/sh/sh64/pt64-1.d: Likewise.
	* gas/sh/sh64/pt64-32-2.d: Likewise.
	* gas/sh/sh64/rel32-2.d: Likewise.
	* gas/sh/sh64/rel32-4.d: Likewise.
	* gas/sh/sh64/rel64-2.d: Likewise.
	* gas/sh/sh64/rel64-4.d: Likewise.
	* gas/tic6x/data-reloc.d: Likewise.
	* gas/tic6x/pcr-relocs.d: Likewise.
	* gas/xstormy16/allinsn.d: Likewise.
	* gas/xstormy16/reloc-1.d: Likewise.
	* gas/xstormy16/reloc-2.d: Likewise.

ld/testsuite/

	* ld-arm/emit-relocs1-vxworks.d: Expect addend as signed.
	* ld-spu/pic.d: Likewise.
2012-05-17 16:36:22 +00:00
Nick Clifton df7b86aa4c PR 14072
* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* sysdep.h: Generate an error if included before config.h.
	* alpha-opc.c: Include sysdep.h before any other header file.
	* alpha-dis.c: Likewise.
	* avr-dis.c: Likewise.
	* cgen-opc.c: Likewise.
	* cr16-dis.c: Likewise.
	* cris-dis.c: Likewise.
	* crx-dis.c: Likewise.
	* d10v-dis.c: Likewise.
	* d10v-opc.c: Likewise.
	* d30v-dis.c: Likewise.
	* d30v-opc.c: Likewise.
	* h8500-dis.c: Likewise.
	* i370-dis.c: Likewise.
	* i370-opc.c: Likewise.
	* m10200-dis.c: Likewise.
	* m10300-dis.c: Likewise.
	* micromips-opc.c: Likewise.
	* mips-opc.c: Likewise.
	* mips61-opc.c: Likewise.
	* moxie-dis.c: Likewise.
	* or32-opc.c: Likewise.
	* pj-dis.c: Likewise.
	* ppc-dis.c: Likewise.
	* ppc-opc.c: Likewise.
	* s390-dis.c: Likewise.
	* sh-dis.c: Likewise.
	* sh64-dis.c: Likewise.
	* sparc-dis.c: Likewise.
	* sparc-opc.c: Likewise.
	* spu-dis.c: Likewise.
	* tic30-dis.c: Likewise.
	* tic54x-dis.c: Likewise.
	* tic80-dis.c: Likewise.
	* tic80-opc.c: Likewise.
	* tilegx-dis.c: Likewise.
	* tilepro-dis.c: Likewise.
	* v850-dis.c: Likewise.
	* v850-opc.c: Likewise.
	* vax-dis.c: Likewise.
	* w65-dis.c: Likewise.
	* xgate-dis.c: Likewise.
	* xtensa-dis.c: Likewise.
	* rl78-decode.opc: Likewise.
	* rl78-decode.c: Regenerate.
	* rx-decode.opc: Likewise.
	* rx-decode.c: Regenerate.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* sysdep.h: Generate an error if included before config.h.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* aclocal.m4: Regenerate.
	* bfd-in.h: Generate an error if included before config.h.
	* sysdep.h: Likewise.
	* bfd-in2.h: Regenerate.
	* compress.c: Remove #include "config.h".
	* plugin.c: Likewise.
	* elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
	* elf64-hppa.c: Likewise.
	* som.c: Likewise.
	* xsymc.c: Likewise.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* aclocal.m4: Regenerate.
	* Makefile.am: Use wrappers around C files generated by flex.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* itbl-lex-wrapper.c: New file.
	* config/bfin-lex-wrapper.c: New file.
	* cgen.c: Include as.h before setjmp.h.
	* config/tc-dlx.c: Include as.h before any other header.
	* config/tc-h8300.c: Likewise.
	* config/tc-lm32.c: Likewise.
	* config/tc-mep.c: Likewise.
	* config/tc-microblaze.c: Likewise.
	* config/tc-mmix.c: Likewise.
	* config/tc-msp430.c: Likewise.
	* config/tc-or32.c: Likewise.
	* config/tc-tic4x.c: Likewise.
	* config/tc-tic54x.c: Likewise.
	* config/tc-xtensa.c: Likewise.

	* configure.in: Add check that sysdep.h has been included before
	any system header files.
	* configure: Regenerate.
	* config.in: Regenerate.
	* unwind-ia64.h: Include config.h.
2012-05-17 15:13:28 +00:00
Hans-Peter Nilsson 134fa82ef4 * lib/ld-lib.exp (run_dump_test): For options "warning" and
"error", append to earlier option values without adding a space.
2012-05-17 12:06:55 +00:00
Alan Modra 3daa201b39 typo fixes 2012-05-17 10:42:29 +00:00
Alan Modra 61ece53e99 * ld-m68k/tls-ld-1.d: Update. 2012-05-17 06:13:32 +00:00
Alan Modra ab6dce2336 bfd/
* elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
	_GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
	* elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
	absolute.
ld/testsuite/
	* ld-powerpc/tlsso.r: Update for dynamic sym changes.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
2012-05-17 02:43:36 +00:00
Hans-Peter Nilsson 7537bd464b * ld-arm/gc-hidden-1.d: Fix disassembly pattern. 2012-05-16 19:54:08 +00:00
Nick Clifton a0f49396fd * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
bfd_get_section_lma, bfd_get_section_alignment,
	bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
	in order to use the `bfd' argument.
	* bfd-in2.h: Regenerate.
	* elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
	as the first argument for `bfd_get_section_alignment'.
	* elf32-arm.c (create_ifunc_sections): Likewise, for
	`bfd_set_section_alignment'.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
	`bfd_get_section_name'.
	* elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	(ppc_elf_relocate_section): Likewise.
	* elf64-mmix.c (mmix_final_link_relocate): Likewise, for
	`bfd_get_section_vma'.
	* elf64-ppc.c (create_linkage_sections): Likewise, for
	`bfd_set_section_alignment'.

	* emultempl/m68hc1xelf.em (hook_in_stub): Pass proper `bfd'
	as the first argument for `bfd_get_section_name'.

	* config/tc-alpha.c (maybe_set_gp): Pass proper `bfd'
	as the first argument for `bfd_get_section_vma'.
2012-05-16 16:38:29 +00:00
Nick Clifton a5244b7e43 PR ld/14069
* emultempl/elf32.em: Include *-*-gnu* targets in ld.so.conf
	support.
2012-05-16 10:43:41 +00:00
Nick Clifton 6927f98292 * config/tc-m68hc11.c: Add S12X and XGATE co-processor support.
Add option to offset S12 addresses into XGATE memory space.
	Tweak target flags to match other tools. (i.e. -m m68hc11).
	* doc/as.texinfo: Mention new options.
	* doc/c-m68hc11.texi: Document new options.
	* NEWS: Mention new support.

	* archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
	* config.bfd: Likewise.
	* cpu-m9s12x.c: New.
	* cpu-m9s12xg.c: New.
	* elf32-m68hc12.c: Add S12X and XGATE co-processor support.
	Add option to offset S12 addresses into XGATE memory space.
	Fix carry bug in IMM16 (IMM8 low/high) relocate.
	* Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
	(ALL_MACHINES_CFILES): Likewise.
	* reloc.c: Add S12X relocs.
	* Makefile.in: Regenerate.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	* gas/m68hc11/insns9s12x.s: New
	* gas/m68hc11/insns9s12x.d: New
	* gas/m68hc11/hexprefix.s: New
	* gas/m68hc11/hexprefix.d: New
	* gas/m68hc11/9s12x-exg-sex-tfr.s: New
	* gas/m68hc11/9s12x-exg-sex-tfr.d: New
	* gas/m68hc11/insns9s12xg.s: New
	* gas/m68hc11/insns9s12xg.d: New
	* gas/m68hc11/9s12x-mov.s: New
	* gas/m68hc11/9s12x-mov.d: New
	* gas/m68hc11/m68hc11.exp: Updated
	* gas/m68hc11/*.d: Brought in line with changed objdump output.
	* gas/all/gas.exp: XFAIL all hc11/12 targets for redef2,3.
	* gas/elf/elf.exp: XFAIL all hc11/12 targets for redef.
	* gas/elf/dwarf2-1.d: Skip for hc11/12 targets.
	* gas/elf/dwarf2-2.d: Likewise.

	* ld-m68hc11/xgate-link.s: New.
	* ld-m68hc11/xgate-link.d: New.
	* ld-m68hc11/xgate-offset.s: New.
	* ld-m68hc11/xgate-offset.d: New.
	* ld-m68hc11/xgate1.s: New.
	* ld-m68hc11/xgate1.d: New.
	* ld-m68hc11/xgate2.s: New.
	* ld-m68hc11/m68hc11.exp: Updated.
	* ld-m68hc11/*.d: Brought in line with changed objdump output.
	* ld-gc/gc.exp: Update CFLAGS for m68hc11.
	* ld-plugin/plugin.exp: Likewise.
	* ld-srec/srec.exp: XFAIL for m68hc11 and m68hc12.

	* configure.in: Add S12X and XGATE co-processor support to m68hc11
	target.
	* disassemble.c: Likewise.
	* configure: Regenerate.
	* m68hc11-dis.c: Make objdump output more consistent, use hex
	instead of decimal and use 0x prefix for hex.
	* m68hc11-opc.c: Add S12X and XGATE opcodes.
	* dis-asm.h (print_insn_m9s12x): Prototype.
	(print_insn_m9s12xg): Prototype.

	* m68hc11.h (R_M68HC12_16B, R_M68HC12_PCREL_9, R_M68HC12_PCREL_10)
	R_M68HC12_HI8XG, R_M68HC12_LO8XG): New relocations.
	(E_M68HC11_XGATE_RAMOFFSET): Define.

	* m68hc11.h: Add XGate definitions.
	(struct m68hc11_opcode): Add xg_mask field.
2012-05-15 12:55:51 +00:00
David S. Miller f956976950 Fix PLT section number regexps in sparc TLS tests.
ld/testsuite/

	* ld-sparc/tlssunbin32.rd: Update.
	* ld-sparc/tlssunbin64.rd: Likewise.
2012-05-15 03:59:38 +00:00
James Lemke b9c361e0ad Add support for PowerPC VLE.
2012-05-14  Catherine Moore  <clm@codesourcery.com>

	* NEWS:  Mention PowerPC VLE port.

2012-05-14  James Lemke <jwlemke@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>

	bfd/
	* bfd.c (bfd_lookup_section_flags): Add section parm.
	* ecoff.c (bfd_debug_section): Remove flag_info initializer.
	* elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
	(bfd_elf_lookup_section_flags): Add section parm.
	* elf32-ppc.c (is_ppc_vle): New function.
	(ppc_elf_modify_segment_map): New function.
	(elf_backend_modify_segment_map): Define.
	(has_vle_insns): New define.
	* elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
	* elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
	Move in logic to omit / include a section.
	* libbfd-in.h (bfd_link_info): Add section parm.
	(bfd_generic_lookup_section_flags): Likewise.
	* reloc.c (bfd_generic_lookup_section_flags): Likewise.
	* section.c (bfd_section): Move out section_flag_info.
	(BFD_FAKE_SECTION): Remove flag_info initializer.
	* targets.c (_bfd_lookup_section_flags): Add section parm.

2012-05-14  Catherine Moore  <clm@codesourcery.com>

	bfd/
	* archures.c (bfd_mach_ppc_vle): New.
	* bfd-in2.h: Regenerated.
	* cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
	* elf32-ppc.c (split16_format_type): New enumeration.
	(ppc_elf_vle_split16): New function.
	(HOWTO): Add entries for R_PPC_VLE relocations.
	(ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
	(ppc_elf_section_flags): New function.
	(ppc_elf_lookup_section_flags): New function.
	(ppc_elf_section_processing): New function.
	(ppc_elf_check_relocs): Handle PPC_VLE relocations.
	(ppc_elf_relocation_section): Likewise.
	(elf_backend_lookup_section_flags_hook): Define.
	(elf_backend_section_flags): Define.
	(elf_backend_section_processing): Define.
	* elf32-ppc.h (ppc_elf_section_processing): Declare.
	* libbfd.h: Regenerated.
	* reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
	BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
	BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
	BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
	BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
	BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
	BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
	BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
	BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>

	gas/
	* config/tc-ppc.c (insn_validate): New func of existing code to call..
	(ppc_setup_opcodes): ..from 2 places here.
	Revise for second (VLE) opcode table.
	Add #ifdef'd code to print opcode tables.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>

	gas/
	* config/tc-ppc.c (ppc_setup_opcodes): Allow out-of-order
	for the VLE conditional branches.

2012-05-14  Catherine Moore  <clm@codesourcery.com>
            Maciej W. Rozycki  <macro@codesourcery.com>
	    Rhonda Wittels  <rhonda@codesourcery.com>

	gas/
	* config/tc-ppc.c (PPC_VLE_SPLIT16A): New macro.
	(PPC_VLE_SPLIT16D): New macro.
	(PPC_VLE_LO16A): New macro.
	(PPC_VLE_LO16D): New macro.
	(PPC_VLE_HI16A): New macro.
	(PPC_VLE_HI16D): New macro.
	(PPC_VLE_HA16A): New macro.
	(PPC_VLE_HA16D): New macro.
	(PPC_APUINFO_VLE): New definition.
	(md_chars_to_number): New function.
	(md_parse_option): Check for combinations of little
	endian and -mvle.
	(md_show_usage): Document -mvle.
	(ppc_arch): Recognize VLE.
	(ppc_mach): Recognize bfd_mach_ppc_vle.
	(ppc_setup_opcodes): Print the opcode table if
	* config/tc-ppc.h (ppc_frag_check): Declare.
	* doc/c-ppc.texi: Document -mvle.
	* NEWS:  Mention PowerPC VLE port.

2012-05-14  Catherine Moore  <clm@codesourcery.com>

	gas/
	* config/tc-ppc.h (ppc_dw2_line_min_insn_length): Declare.
	(DWARF2_LINE_MIN_INSN_LENGTH): Redefine.
	* config/tc-ppc.c (ppc_dw2_line_min_insn_length): New.
	* dwarf2dbg.c (scale_addr_delta): Handle values of 1
	for DWARF2_LINE_MIN_INSN_LENGTH.

2012-05-14  Catherine Moore  <clm@codesourcery.com>
            Maciej W. Rozycki  <macro@codesourcery.com>
	    Rhonda Wittels  <rhonda@codesourcery.com>

	gas/testsuite/
	* gas/ppc/ppc.exp: Run new tests.
	* gas/ppc/vle-reloc.d: New test.
	* gas/ppc/vle-reloc.s: New test.
	* gas/ppc/vle-simple-1.d: New test.
	* gas/ppc/vle-simple-1.s: New test.
	* gas/ppc/vle-simple-2.d: New test.
	* gas/ppc/vle-simple-2.s: New test.
	* gas/ppc/vle-simple-3.d: New test.
	* gas/ppc/vle-simple-3.s: New test.
	* gas/ppc/vle-simple-4.d: New test.
	* gas/ppc/vle-simple-4.s: New test.
	* gas/ppc/vle-simple-5.d: New test.
	* gas/ppc/vle-simple-5.s: New test.
	* gas/ppc/vle-simple-6.d: New test.
	* gas/ppc/vle-simple-6.s: New test.
	* gas/ppc/vle.d: New test.
	* gas/ppc/vle.s: New test.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>
	include/elf/
	* ppc.h (SEC_PPC_VLE): Remove.

2012-05-14  Catherine Moore  <clm@codesourcery.com>
	    James Lemke  <jwlemke@codesourcery.com>

	include/elf/
	* ppc.h (R_PPC_VLE_REL8): New reloction.
	(R_PPC_VLE_REL15): Likewise.
	(R_PPC_VLE_REL24): Likewise.
	(R_PPC_VLE_LO16A): Likewise.
	(R_PPC_VLE_LO16D): Likewise.
	(R_PPC_VLE_HI16A): Likewise.
	(R_PPC_VLE_HI16D): Likewise.
	(R_PPC_VLE_HA16A): Likewise.
	(R_PPC_VLE_HA16D): Likewise.
	(R_PPC_VLE_SDA21): Likewise.
	(R_PPC_VLE_SDA21_LO): Likewise.
	(R_PPC_VLE_SDAREL_LO16A): Likewise.
	(R_PPC_VLE_SDAREL_LO16D): Likewise.
	(R_PPC_VLE_SDAREL_HI16A): Likewise.
	(R_PPC_VLE_SDAREL_HI16D): Likewise.
	(R_PPC_VLE_SDAREL_HA16A): Likewise.
	(R_PPC_VLE_SDAREL_HA16D): Likewise.
	(SEC_PPC_VLE): Remove.
	(PF_PPC_VLE): New program header flag.
	(SHF_PPC_VLE): New section header flag.
	(vle_opcodes, vle_num_opcodes): New.
	(VLE_OP): New macro.
	(VLE_OP_TO_SEG): New macro.

2012-05-14  Catherine Moore  <clm@codesourcery.com>
            Maciej W. Rozycki  <macro@codesourcery.com>
	    Rhonda Wittels  <rhonda@codesourcery.com>

	include/opcode/
	* ppc.h (PPC_OPCODE_VLE): New definition.
	(PPC_OP_SA): New macro.
	(PPC_OP_SE_VLE): New macro.
	(PPC_OP): Use a variable shift amount.
	(powerpc_operand): Update comments.
	(PPC_OPSHIFT_INV): New macro.
	(PPC_OPERAND_CR): Replace with...
	(PPC_OPERAND_CR_BIT): ...this and
	(PPC_OPERAND_CR_REG): ...this.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>

	ld/
	* ldlang.c (walk_wild_consider_section): Don't copy section_flag_list.
	Pass it to callback.
	(walk_wild_section_general): Pass section_flag_list to callback.
	(lang_add_section): Add sflag_list parm.
	Move out logic to keep / omit a section & call bfd_lookup_section_flags.
	(output_section_callback_fast): Add sflag_list parm.
	Add new parm to lang_add_section calls.
	(output_section_callback): Likewise.
	(check_section_callback): Add sflag_list parm.
	(lang_place_orphans): Add new parm to lang_add_section calls.
	(gc_section_callback): Add sflag_list parm.
	(find_relro_section_callback): Likewise.
	* ldlang.h (callback_t): Add flag_info parm.
	(lang_add_section): Add sflag_list parm.
	* emultempl/armelf.em (elf32_arm_add_stub_section):
	Add lang_add_section parm.
	* emultempl/beos.em (gld*_place_orphan): Likewise.
	* emultempl/elf32.em (gld*_place_orphan): Likewise.
	* emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
	* emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
	* emultempl/mipself.em (mips_add_stub_section): Likewise.
	* emultempl/mmo.em (mmo_place_orphan): Likewise.
	* emultempl/pe.em (gld_*_place_orphan): Likewise.
	* emultempl/pep.em (gld_*_place_orphan): Likewise.
	* emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
	* emultempl/spuelf.em (spu_place_special_section): Likewise.
	* emultempl/vms.em (vms_place_orphan): Likewise.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>

	ld/testsuite/
	* ld-powerpc/powerpc.exp: Create ppceabitests.
	* ld-powerpc/vle-multiseg.s: New.
	* ld-powerpc/vle-multiseg-1.d: New.
	* ld-powerpc/vle-multiseg-1.ld: New.
	* ld-powerpc/vle-multiseg-2.d: New.
	* ld-powerpc/vle-multiseg-2.ld: New.
	* ld-powerpc/vle-multiseg-3.d: New.
	* ld-powerpc/vle-multiseg-3.ld: New.
	* ld-powerpc/vle-multiseg-4.d: New.
	* ld-powerpc/vle-multiseg-4.ld: New.
	* ld-powerpc/vle-multiseg-5.d: New.
	* ld-powerpc/vle-multiseg-5.ld: New.
	* ld-powerpc/vle-multiseg-6.d: New.
	* ld-powerpc/vle-multiseg-6.ld: New.
	* ld-powerpc/vle-multiseg-6a.s: New.
	* ld-powerpc/vle-multiseg-6b.s: New.
	* ld-powerpc/vle-multiseg-6c.s: New.
	* ld-powerpc/vle-multiseg-6d.s: New.
	* ld-powerpc/powerpc.exp: Run new tests.

2012-05-14  Catherine Moore  <clm@codesourcery.com>

	ld/
	* NEWS:  Mention PowerPC VLE port.

2012-05-14  Catherine Moore  <clm@codesourcery.com>

	ld/testsuite/
	* ld-powerpc/apuinfo.rd: Update for VLE.
	* ld-powerpc/vle-reloc-1.d: New.
	* ld-powerpc/vle-reloc-1.s: New.
	* ld-powerpc/vle-reloc-2.d: New.
	* ld-powerpc/vle-reloc-2.s: New.
	* ld-powerpc/vle-reloc-3.d: New.
	* ld-powerpc/vle-reloc-3.s: New.
	* ld-powerpc/vle-reloc-def-1.s: New.
	* ld-powerpc/vle-reloc-def-2.s: New.
	* ld-powerpc/vle-reloc-def-3.s: New.

2012-05-14  James Lemke  <jwlemke@codesourcery.com>

	opcodes/
	* ppc-dis.c (get_powerpc_dialect): Use is_ppc_vle.
	(PPC_OPCD_SEGS, VLE_OPCD_SEGS): New defines.
	(vle_opcd_indices): New array.
	(lookup_vle): New function.
	(disassemble_init_powerpc): Revise for second (VLE) opcode table.
	(print_insn_powerpc): Likewise.
	* ppc-opc.c: Likewise.

2012-05-14  Catherine Moore  <clm@codesourcery.com>
            Maciej W. Rozycki  <macro@codesourcery.com>
	    Rhonda Wittels  <rhonda@codesourcery.com>
	    Nathan Froyd <froydnj@codesourcery.com>

	opcodes/
	* ppc-opc.c (insert_arx, extract_arx): New functions.
	(insert_ary, extract_ary): New functions.
	(insert_li20, extract_li20): New functions.
	(insert_rx, extract_rx): New functions.
	(insert_ry, extract_ry): New functions.
	(insert_sci8, extract_sci8): New functions.
	(insert_sci8n, extract_sci8n): New functions.
	(insert_sd4h, extract_sd4h): New functions.
	(insert_sd4w, extract_sd4w): New functions.
	(insert_vlesi, extract_vlesi): New functions.
	(insert_vlensi, extract_vlensi): New functions.
	(insert_vleui, extract_vleui): New functions.
	(insert_vleil, extract_vleil): New functions.
 	(BI_MASK, BB_MASK, BT): Use PPC_OPERAND_CR_BIT.
 	(BI16, BI32, BO32, B8): New.
	(B15, B24, CRD32, CRS): New.
 	(CRD, OBF, BFA, CR, CRFS): Use PPC_OPERAND_CR_REG.
	(DB, IMM20, RD, Rx, ARX, RY, RZ): New.
	(ARY, SCLSCI8, SCLSCI8N, SE_SD, SE_SDH): New.
	(SH6_MASK): Use PPC_OPSHIFT_INV.
	(SI8, UI5, OIMM5, UI7, BO16): New.
	(VLESIMM, VLENSIMM, VLEUIMM, VLEUIMML): New.
	(XT6, XA6, XB6, XB6S, XC6): Use PPC_OPSHIFT_INV.
	(ALLOW8_SPRG): New.
	(insert_sprg, extract_sprg): Check ALLOW8_SPRG.
	(OPVUP, OPVUP_MASK OPVUP): New
	(BD8, BD8_MASK, BD8IO, BD8IO_MASK): New.
	(EBD8IO, EBD8IO1_MASK, EBD8IO2_MASK, EBD8IO3_MASK): New.
	(BD15, BD15_MASK, EBD15, EBD15_MASK, EBD15BI, EBD15BI_MASK): New.
	(BD24,BD24_MASK, C_LK, C_LK_MASK, C, C_MASK): New.
 	(IA16, IA16_MASK, I16A, I16A_MASK, I16L, I16L_MASK): New.
	(IM7, IM7_MASK, LI20, LI20_MASK, SCI8, SCI8_MASK): New.
	(SCI8BF, SCI8BF_MASK, SD4, SD4_MASK): New.
	(SE_IM5, SE_IM5_MASK): New.
	(SE_R, SE_R_MASK, SE_RR, SE_RR_MASK): New.
	(EX, EX_MASK, BO16F, BO16T, BO32F, BO32T): New.
	(BO32DNZ, BO32DZ): New.
	(NO371, PPCSPE, PPCISEL, PPCEFS, MULHW): Include PPC_OPCODE_VLE.
	(PPCVLE): New.
	(powerpc_opcodes): Add new VLE instructions.  Update existing
	instruction to include PPCVLE if supported.
	* ppc-dis.c (ppc_opts): Add vle entry.
	(get_powerpc_dialect): New function.
	(powerpc_init_dialect): VLE support.
	(print_insn_big_powerpc): Call get_powerpc_dialect.
	(print_insn_little_powerpc): Likewise.
	(operand_value_powerpc): Handle negative shift counts.
	(print_insn_powerpc): Handle 2-byte instruction lengths.
2012-05-14 19:45:30 +00:00
Richard Sandiford 02277eae00 ld/testsuite/
* ld-mips-elf/mips-elf.exp (mips16_call_global_test): Use the
	no-shared-1.ld linker script.
	* ld-mips-elf/mips16-call-global-1.s: Add alignment directive.
	* ld-mips-elf/mips16-call-global-2.s: Likewise.
	* ld-mips-elf/mips16-call-global-3.s: Likewise.
	* ld-mips-elf/mips16-call-global.d: Use 50000 as the base address.
2012-05-13 09:55:45 +00:00
Richard Sandiford ae357fb61f ld/testsuite/
* ld-mips-elf/attr-gnu-4-00.d: Remove assembler options and emulator
	linker option.
	* ld-mips-elf/attr-gnu-4-01.d, ld-mips-elf/attr-gnu-4-02.d,
	ld-mips-elf/attr-gnu-4-03.d, ld-mips-elf/attr-gnu-4-04.d,
	ld-mips-elf/attr-gnu-4-05.d, ld-mips-elf/attr-gnu-4-10.d,
	ld-mips-elf/attr-gnu-4-11.d, ld-mips-elf/attr-gnu-4-12.d,
	ld-mips-elf/attr-gnu-4-13.d, ld-mips-elf/attr-gnu-4-14.d,
	ld-mips-elf/attr-gnu-4-15.d, ld-mips-elf/attr-gnu-4-20.d,
	ld-mips-elf/attr-gnu-4-21.d, ld-mips-elf/attr-gnu-4-22.d,
	ld-mips-elf/attr-gnu-4-23.d, ld-mips-elf/attr-gnu-4-24.d,
	ld-mips-elf/attr-gnu-4-25.d, ld-mips-elf/attr-gnu-4-30.d,
	ld-mips-elf/attr-gnu-4-31.d, ld-mips-elf/attr-gnu-4-32.d,
	ld-mips-elf/attr-gnu-4-33.d, ld-mips-elf/attr-gnu-4-34.d,
	ld-mips-elf/attr-gnu-4-35.d, ld-mips-elf/attr-gnu-4-40.d,
	ld-mips-elf/attr-gnu-4-41.d, ld-mips-elf/attr-gnu-4-42.d,
	ld-mips-elf/attr-gnu-4-43.d, ld-mips-elf/attr-gnu-4-44.d,
	ld-mips-elf/attr-gnu-4-45.d, ld-mips-elf/attr-gnu-4-51.d: Likewise.
2012-05-13 09:51:40 +00:00
Richard Sandiford 41ec656ec6 ld/testsuite/
* ld-mips-elf/eh-frame1.ld (.gcc_compiled_long32): Add KEEP.
	* ld-mips-elf/eh-frame3.d: Move definition of foo to the link line
	and change to a 32-bit value.  Expect CIEs to be marged.
	* ld-mips-elf/eh-frame4.d: Move definition of foo to the link line.
2012-05-13 09:45:45 +00:00
H.J. Lu 9920b1ee65 Adjust testcases for readelf addend change
gas/testsuite/

	* gas/mips/elf-rel10.d: Updated.
	* gas/mips/elf-rel22.d: Likewise.
	* gas/mmix/comment-1.d: Likewise.

ld/testsuite/

	* ld-alpha/tlspic.rd: Updated.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/vxworks1-lib.rd: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-sh/shared-1.d: Likewise.
	* ld-sh/tlspic-2.d: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunnopic64.rd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-sparc/tlssunpic64.rd: Likewise.
2012-05-12 13:46:26 +00:00
H.J. Lu 7dbe414f24 Adjust testcases for readelf addend change
* ld-cris/hiddef1.d: Updated.
	* ld-cris/libdso-2.d: Likewise.
	* ld-cris/tls-js1.d: Likewise.
	* ld-cris/tls-local-63.d: Likewise.
	* ld-cris/tls-local-64.d: Likewise.
2012-05-12 01:12:14 +00:00
H.J. Lu e04d7088af Always display addend as signed hex number
binutils/

	PR binutils/14088
	* readelf.c (dump_relocations): Always display addend as
	signed hex number.

ld/testsuite/

	PR binutils/14088
	* ld-ia64/tlspic.rd: Updated.
	* ld-x86-64/tlsdesc-nacl.rd: Likewise.
	* ld-x86-64/tlsdesc.rd: Likewise.
	* ld-x86-64/tlspic-nacl.rd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
2012-05-11 15:48:15 +00:00
Nick Clifton 208a4923ed PR binutils/14028
* configure.in: Invoke ACX_HEADER_STRING.
	* configure: Regenerate.
	* config.in: Regenerate.
	* sysdep.h: If STRINGS_WITH_STRING is defined then include both
	string.h and strings.h.
2012-05-11 14:25:30 +00:00
H.J. Lu 6f2c9068ed Display signed hex number in x32 addend overflow check
bfd/

	* elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
	hex number in x32 addend overflow check.

gas/

	* config/tc-i386.c (tc_gen_reloc): Display signed hex number in
	x32 addend overflow check.

ld/testsuite/

	* ld-x86-64/ilp32-11.d: Updated.
2012-05-10 20:46:34 +00:00
H.J. Lu 1da80baa66 Count R_X86_64_RELATIVE64 as reloc_class_relative
bfd/

	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
	R_X86_64_RELATIVE64.

ld/testsuite/

	* ld-x86-64/pr13082-1a.d: Check RELACOUNT.
	* ld-x86-64/pr13082-1b.d: Likewise.
2012-05-10 17:15:19 +00:00
H.J. Lu 8cf0d2dd21 Check 64-bit relocation addend overflow for x32
bfd/

	* elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
	overflow for R_X86_64_RELATIVE64.

gas/

	* config/tc-i386.c (tc_gen_reloc): Check x32 addend overflow
	for BFD_RELOC_64.

gas/testsuite/

	* gas/i386/ilp32/ilp32.exp: Run reloc64-inval.

	* gas/i386/ilp32/reloc64.s: Add tests for ".quad".
	* gas/i386/ilp32/reloc64.d: Updated.

	* gas/i386/ilp32/reloc64-inval.l: New file.
	* gas/i386/ilp32/reloc64-inval.s: Likewise.

ld/testsuite/

	* ld-x86-64/ilp32-11.d: New file.
	* ld-x86-64/ilp32-11.s: Likewise.

	* ld-x86-64/x86-64.exp: Run ilp32-11.
2012-05-10 03:25:17 +00:00
Alan Modra e5b62927f4 * Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
LC and LANG environment vars.
	* Makefile.in: Regenerate.
2012-05-08 12:14:15 +00:00
Tristan Gingold d66ac08f40 2012-05-07 Tristan Gingold <gingold@adacore.com>
* pe-dll.c (udef_table): Make it static.
2012-05-07 10:52:00 +00:00
H.J. Lu 18269b0999 Add a testcase for PR ld/14052
PR ld/14052
	* ld-elf/pr14052.d: New file.
	* ld-elf/pr14052.t: Likewise.
2012-05-05 14:15:21 +00:00
Alan Modra 62ab84ece4 PR ld/14052
PR ld/13621
bfd/
	* linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
ld/testsuite/
	* ld-elf/warn2.d: Revert 2012-02-13 change.
	* ld-elf/zerosize1.d, ld-elf/zerosize1.s: Delete.
2012-05-05 04:51:16 +00:00
Alan Modra 45dfa85a1e Replace all uses of bfd_abs_section, bfd_com_section, bfd_und_section
and bfd_ind_section with their _ptr variants, or use corresponding
bfd_is_* macros.
2012-05-05 03:05:32 +00:00
H.J. Lu 3c99554527 Support x86_64-*-linux-gnux32
gas/

	* configure.tgt: Support x86_64-*-linux-gnux32.

ld/

	* configure.tgt: Support x86_64-*-linux-gnux32.

ld/testsuite/

	* ld-elf/eh1.d: Skip x86_64-*-linux-gnux32.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.

	* ld-elfvsb/elfvsb.exp: Xfail x86_64-*-linux-gnux32.
	* ld-shared/shared.exp: Likewise.

	* ld-ifunc/ifunc-3a-x86.d: Support x86_64-*-linux-gnux32.
2012-05-04 20:01:03 +00:00
Nick Clifton f6c1a2d592 Add support for Motorola XGATE embedded CPU 2012-05-03 13:12:08 +00:00
Hans-Peter Nilsson 3b66a14146 Make bfd asserts cause linker errors.
* ldmain.c (default_bfd_assert_handler): New variable.
	(ld_bfd_assert_handler): New function.
	(main): Call bfd_set_assert_handler.
2012-04-26 13:51:14 +00:00
Roland McGrath 838a716d66 * ld-x86-64/plt-nacl.pd: Fix expected nop padding.
* ld-x86-64/tlsdesc-nacl.pd: Likewise.
2012-04-24 17:24:20 +00:00
Hans-Peter Nilsson 4646d23b55 PR ld/13990
* ld-arm/arm-elf.exp: Run gc-hidden-1.
	* ld-arm/gc-hidden-1.d: New test-file.
	* ld-arm/gcdfn.s, ld-arm/hideall.ld, ld-arm/hidfn.s,
	ld-arm/main.s: New files.
2012-04-24 16:14:31 +00:00
Alan Modra dbaa201145 PR ld/13991
bfd/
	* bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
	_bfd_generic_link_just_syms.
	* bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
	* bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.

	* bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section.
	* bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
	SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
	SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
	* bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c,
	* bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c,
	* bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c,
	* bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c,
	* bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c,
	* bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c,
	* bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c,
	* bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c,
	* bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c,
	* bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c,
	* bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c,
	* bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c,
	* bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c,
	* bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c,
	* bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c,
	* bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c,
	* bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c,
	* bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c,
	* bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c,
	* bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c,
	* bfd/reloc.c: Update all references.
	* bfd/bfd-in2.h: Regenerate.
ld/
	* ld/ldlang.c (size_input_section): Use sec_info_type rather than
	usrdata->flags.just_syms.
	* ld/ldwrite.c (build_link_order): Likewise.
	* ld/emultempl/hppaelf.em (build_section_lists): Likewise.
	* ld/emultempl/ppc64elf.em (build_toc_list): Likewise.
	* ld/emultempl/armelf.em (build_section_lists): Likewise.
	(after_allocation): Update for renamed sec_info_type value.
	* ld/emultempl/tic6xdsbt.em: Likewise.
2012-04-24 05:12:40 +00:00
Andreas Schwab aab322dbad * ld-pie/pie.exp: Remove extra braces. 2012-04-23 18:03:28 +00:00
H.J. Lu aed64b35fb Set reloc_count to 0 for reloc sections
bfd/

2012-04-13  Alan Modra  <amodra@gmail.com>

	PR ld/13947
	* elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
	reloc sections.

ld/testsuite/

2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/13947
	* ld-x86-64/x86-64.exp: Run pr13947.
	* ld-x86-64/pr13947.d: New file.
	* ld-x86-64/pr13947.s: Likewise.
2012-04-13 23:20:00 +00:00
Roland McGrath f0fcbe5174 * ld-arm/arm-elf.exp (armelftests_common): Move cases using
mixed-lib.so to ...
	(armelftests_nonacl): ... here.
2012-04-13 16:33:53 +00:00
Nick Clifton b38cadfb70 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
New variables.
	(struct elf32_arm_link_hash_table): New member `nacl_p'.
	(elf32_arm_link_hash_table_create): Initialize it.
	(elf32_arm_nacl_link_hash_table_create): New function.
	(arm_movw_immediate, arm_movt_immediate): New functions.
	(elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
	(elf32_arm_finish_dynamic_sections): Likewise.
	(elf32_arm_output_plt_map_1): Likewise.
	(bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
	New backend vector stanza.
	(elf32_arm_nacl_modify_segment_map): New function.
	* config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
	* targets.c: Support bfd_elf32_{big,little}_nacl_vec.
	* configure.in: Likewise.
	(bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
	(bfd_elf32_littlearm_nacl_vec): Likewise.
	(bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
	(bfd_elf32_bigarm_symbian_vec): Likewise.
	(bfd_elf32_littlearm_symbian_vec): Likewise.
	(bfd_elf32_bigarm_vxworks_vec): Likewise.
	(bfd_elf32_littlearm_vxworks_vec): Likewise.
	* configure: Regenerated.

	* configure.tgt (arm-*-nacl*): Match it.
	* config/te-nacl.h (FPU_DEFAULT, EABI_DEFAULT): Define.
	(LOCAL_LABELS_DOLLAR): Define.
	* config/tc-arm.c (elf32_arm_target_format) [TE_NACL]:
	Use nacl format variants.

	* gas/elf/elf.exp (run_elf_list_test): Treat arm-*-nacl* targets
	as -armeabi.

	* gas/arm/any-idiv.d: Match *-*-nacl* targets too.
	* gas/arm/arch4t.d: Likewise.
	* gas/arm/arch4t-eabi.d: Likewise.
	* gas/arm/attr-any-armv4t.d: Likewise.
	* gas/arm/attr-any-thumbv6.d: Likewise.
	* gas/arm/attr-cpu-directive.d: Likewise.
	* gas/arm/attr-default.d: Likewise.
	* gas/arm/attr-march-all.d: Likewise.
	* gas/arm/attr-march-armv1.d: Likewise.
	* gas/arm/attr-march-armv2a.d: Likewise.
	* gas/arm/attr-march-armv2.d: Likewise.
	* gas/arm/attr-march-armv2s.d: Likewise.
	* gas/arm/attr-march-armv3.d: Likewise.
	* gas/arm/attr-march-armv3m.d: Likewise.
	* gas/arm/attr-march-armv4.d: Likewise.
	* gas/arm/attr-march-armv4t.d: Likewise.
	* gas/arm/attr-march-armv4txm.d: Likewise.
	* gas/arm/attr-march-armv4xm.d: Likewise.
	* gas/arm/attr-march-armv5.d: Likewise.
	* gas/arm/attr-march-armv5t.d: Likewise.
	* gas/arm/attr-march-armv5te.d: Likewise.
	* gas/arm/attr-march-armv5tej.d: Likewise.
	* gas/arm/attr-march-armv5texp.d: Likewise.
	* gas/arm/attr-march-armv5txm.d: Likewise.
	* gas/arm/attr-march-armv6.d: Likewise.
	* gas/arm/attr-march-armv6j.d: Likewise.
	* gas/arm/attr-march-armv6k.d: Likewise.
	* gas/arm/attr-march-armv6k+sec.d: Likewise.
	* gas/arm/attr-march-armv6kt2.d: Likewise.
	* gas/arm/attr-march-armv6-m.d: Likewise.
	* gas/arm/attr-march-armv6-m+os.d: Likewise.
	* gas/arm/attr-march-armv6s-m.d: Likewise.
	* gas/arm/attr-march-armv6t2.d: Likewise.
	* gas/arm/attr-march-armv6z.d: Likewise.
	* gas/arm/attr-march-armv6zk.d: Likewise.
	* gas/arm/attr-march-armv6zkt2.d: Likewise.
	* gas/arm/attr-march-armv6zt2.d: Likewise.
	* gas/arm/attr-march-armv7-a.d: Likewise.
	* gas/arm/attr-march-armv7a.d: Likewise.
	* gas/arm/attr-march-armv7-a+idiv.d: Likewise.
	* gas/arm/attr-march-armv7-a+mp.d: Likewise.
	* gas/arm/attr-march-armv7-a+sec.d: Likewise.
	* gas/arm/attr-march-armv7-a+sec+virt.d: Likewise.
	* gas/arm/attr-march-armv7-a+virt.d: Likewise.
	* gas/arm/attr-march-armv7.d: Likewise.
	* gas/arm/attr-march-armv7em.d: Likewise.
	* gas/arm/attr-march-armv7-m.d: Likewise.
	* gas/arm/attr-march-armv7m.d: Likewise.
	* gas/arm/attr-march-armv7-r.d: Likewise.
	* gas/arm/attr-march-armv7r.d: Likewise.
	* gas/arm/attr-march-armv7-r+mp.d: Likewise.
	* gas/arm/attr-march-iwmmxt2.d: Likewise.
	* gas/arm/attr-march-iwmmxt.d: Likewise.
	* gas/arm/attr-march-xscale.d: Likewise.
	* gas/arm/attr-mcpu.d: Likewise.
	* gas/arm/attr-mfpu-arm1020e.d: Likewise.
	* gas/arm/attr-mfpu-arm1020t.d: Likewise.
	* gas/arm/attr-mfpu-arm1136jf-s.d: Likewise.
	* gas/arm/attr-mfpu-arm1136jfs.d: Likewise.
	* gas/arm/attr-mfpu-arm7500fe.d: Likewise.
	* gas/arm/attr-mfpu-fpa10.d: Likewise.
	* gas/arm/attr-mfpu-fpa11.d: Likewise.
	* gas/arm/attr-mfpu-fpa.d: Likewise.
	* gas/arm/attr-mfpu-fpe2.d: Likewise.
	* gas/arm/attr-mfpu-fpe3.d: Likewise.
	* gas/arm/attr-mfpu-fpe.d: Likewise.
	* gas/arm/attr-mfpu-maverick.d: Likewise.
	* gas/arm/attr-mfpu-neon.d: Likewise.
	* gas/arm/attr-mfpu-neon-fp16.d: Likewise.
	* gas/arm/attr-mfpu-softfpa.d: Likewise.
	* gas/arm/attr-mfpu-softvfp.d: Likewise.
	* gas/arm/attr-mfpu-softvfp+vfp.d: Likewise.
	* gas/arm/attr-mfpu-vfp10.d: Likewise.
	* gas/arm/attr-mfpu-vfp10-r0.d: Likewise.
	* gas/arm/attr-mfpu-vfp3.d: Likewise.
	* gas/arm/attr-mfpu-vfp9.d: Likewise.
	* gas/arm/attr-mfpu-vfp.d: Likewise.
	* gas/arm/attr-mfpu-vfpv2.d: Likewise.
	* gas/arm/attr-mfpu-vfpv3-d16.d: Likewise.
	* gas/arm/attr-mfpu-vfpv3.d: Likewise.
	* gas/arm/attr-mfpu-vfpv4-d16.d: Likewise.
	* gas/arm/attr-mfpu-vfpv4.d: Likewise.
	* gas/arm/attr-mfpu-vfpxd.d: Likewise.
	* gas/arm/attr-names.d: Likewise.
	* gas/arm/attr-order.d: Likewise.
	* gas/arm/attr-override-cpu-directive.d: Likewise.
	* gas/arm/attr-override-mcpu.d: Likewise.
	* gas/arm/got_prel.d: Likewise.
	* gas/arm/mapdir.d: Likewise.
	* gas/arm/mapmisc.d: Likewise.
	* gas/arm/mapsecs.d: Likewise.
	* gas/arm/mapshort-eabi.d: Likewise.
	* gas/arm/mapshort-elf.d: Likewise.
	* gas/arm/mov-highregs-any.d: Likewise.
	* gas/arm/mov-lowregs-any.d: Likewise.
	* gas/arm/pr12198-1.d: Likewise.
	* gas/arm/pr12198-2.d: Likewise.
	* gas/arm/thumb.d: Likewise.
	* gas/arm/thumb-eabi.d: Likewise.
	* gas/arm/thumbrel.d: Likewise.

	* configure.tgt (arm*-*-nacl*, arm*b-*-nacl*): Handle them.
	* emulparams/armelf_nacl.sh: New file.
	* emulparams/armelfb_nacl.sh: New file.
	* Makefile.am (ALL_EMULATION_SOURCES): Add earmelf_nacl.c
	and earmelfb_nacl.c here.
	(earmelf_nacl.c, earmelfb_nacl.c): New targets.
	* Makefile.in: Regenerated.

	* ld-arm/arm-elf.exp (armelftests): Split out into ...
	(armelftests_common, armelftests_nonacl): ... these two.
	(armeabitests): Split out into ...
	(armeabitests_common, armeabitests_nonacl): ... these two.
	Omit _nonacl sets for arm*-*-nacl* targets.

	* ld-arm/farcall-mix.d: Don't match exact addresses, only symbolic ones.
	* ld-arm/farcall-mix2.d: Likewise.
	* ld-arm/farcall-group.d: Likewise.

	* ld-arm/tls-gdesc-got.d: Match variant file formats too.
	Accept some variation in exact addresses.

	* ld-arm/thumb2-b-interwork.d: Match variant file formats too.
	Fix regexps not to care about exact addresses where not relevant.

	* ld-arm/thumb2-bl-undefweak.d: Match any hex strings, not any
	strings of particular exact lengths.
	* ld-arm/thumb2-bl-undefweak1.d: Likewise.

	* ld-arm/arm-app.r: Match variant file formats too.
	* ld-arm/arm-app-abs32.r: Likewise.
	* ld-arm/arm-lib.d: Likewise.
	* ld-arm/arm-lib.r: Likewise.
	* ld-arm/arm-static-app.r: Likewise.
	* ld-arm/armv4-bx.d: Likewise.
	* ld-arm/data-only-map.d: Likewise.
	* ld-arm/group-relocs.d: Likewise.
	* ld-arm/jump19.d: Likewise.
	* ld-arm/reloc-boundaries.d: Likewise.
	* ld-arm/thumb1-bl.d: Likewise.
	* ld-arm/thumb2-bl.d: Likewise.
	* ld-arm/tls-app.d: Likewise.
	* ld-arm/tls-app.r: Likewise.
	* ld-arm/tls-gdierelax.d: Likewise.
	* ld-arm/tls-gdierelax2.d: Likewise.
	* ld-arm/tls-gdlerelax.d: Likewise.
	* ld-arm/tls-lib.d: Likewise.
	* ld-arm/tls-lib.r: Likewise.
	* ld-arm/tls-mixed.r: Likewise.
	* ld-arm/vfp11-fix-none.d: Likewise.
	* ld-arm/vfp11-fix-scalar.d: Likewise.
	* ld-arm/vfp11-fix-vector.d: Likewise.
	* ld-arm/arm-static-app.d: Likewise.
	Fix regexps not to care about exact number of leading spaces.
	* ld-arm/arm-app-abs32.d: Likewise.
	* ld-arm/fix-arm1176-off.d: Likewise.
	* ld-arm/fix-arm1176-on.d: Likewise.

	* ld-arm/arm-elf.exp: Treat nacl targets like eabi targets.
2012-04-12 13:01:15 +00:00
Nick Clifton 202e23565d * configure.ac (ia64*-*-*vms*): Add support for ld.
* configure: Regenerate.

	* scripttempl/ia64vms.sc: New file.
	* emultempl/vms.em (_before_parse): Support for ia64.
	(elf64-ia64-vms): New fragment for ia64.
	* emulparams/elf64_ia64_vms.sh: New file.
	* configure.tgt (ia64-*-*vms*): Add.
	* Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf64_ia64_vms.c
	(eelf64_ia64_vms.c): New rule.
	* Makefile.in: Regenerate.

	* elflink.c (elf_link_output_extsym): Add a guard.
	(bfd_elf_final_link): Remove assertion.
	(bfd_elf_final_link): Add a guard.
	* elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
	(elfNN_vms_section_from_shdr, elfNN_vms_object_p)
	(elfNN_vms_post_process_headers, elfNN_vms_section_processing)
	(elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
	Remove.
	(elfNN-ia64-vms target): Move to ...
	* elf64-ia64-vms.c: New file.
	* configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
	* Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
	(BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
2012-04-12 07:35:07 +00:00
Roland McGrath 7cf492ee5a ld/testsuite/
* ld-elf/eh1.d: Add explicit --64 to as options, and explicit
	-melf_x86_64 and -Ttext to ld options, so we don't assume every
	x86_64-*-* target uses --64 (vs --x32) by default or has the
	same address space layout.
	* ld-elf/eh2.d: Likewise.
	* ld-elf/eh3.d: Likewise.
	* ld-elf/eh4.d: Likewise.
	* ld-elf/elf.exp: For target *-*-nacl*, use options_regsub(ld) to
	map -melf_x86_64 to -melf_x86_64_nacl.
2012-04-09 16:28:34 +00:00
David S. Miller be16f58925 gas/testsuite/
* gas/all/gas.exp: Sparc can handle BFD_RELOC_8 for constants.

ld/testsuite/

	* ld-sparc/tlssunbin32.rd: Fix regexp.
	* ld-sparc/tlssunbin64.rd: Likewise.
2012-04-07 14:16:35 +00:00
Roland McGrath 5879767462 binutils/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

gas/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

gold/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.

ld/
2012-04-06  Roland McGrath  <mcgrathr@google.com>

	* configure.in (AC_CHECK_HEADERS): Add locale.h.
	* config.in: Regenerate.
	* configure: Regenerate.
2012-04-06 16:49:02 +00:00