binutils-gdb/ld/testsuite/ld-x86-64
H.J. Lu 0cb4071ef9 Add -mrelax-relocations= to x86 assembler
The x86 relax relocations introduced in binutils 2.26 aren't supported
by linker on Solaris older than Solaris 12.  To use x86 assembler with
older Solaris linker, this patch adds

1. A command line option -mrelax-relocations= to x86 assembler to
control whether to generate relax relocations.
2. A configure option --enable-x86-relax-relocations to decide whether
x86 assembler should generate relax relocations by default.  It is
defaulted to yes, except for x86 Solaris targets older than Solaris 12.

gas/

	PR gas/19520
	* NEWS: Mention new command line option -mrelax-relocations and
	new configure option --enable-x86-relax-relocations for x86
	target.
	* config.in: Regenerated.
	* configure.ac: Add --enable-x86-relax-relocations.
	(ac_default_x86_relax_relocations): New.  Default to 1 except
	for x86 Solaris targets older than Solaris 12.
	(DEFAULT_GENERATE_X86_RELAX_RELOCATIONS): Define.
	* configure: Likewise.
	* config/tc-i386.c (generate_relax_relocations): New.
	(OPTION_MRELAX_RELOCATIONS): Likewise.
	(output_disp): Don't generate relax relocations if
	generate_relax_relocations is 0.
	(md_longopts): Add -mrelax-relocations.
	(md_show_usage): Likewise.
	(md_parse_option): Handle OPTION_MRELAX_RELOCATIONS.
	* doc/c-i386.texi: Document -mrelax-relocations=.
	* testsuite/gas/i386/got-no-relax.d: New file.
	* testsuite/gas/i386/x86-64-gotpcrel-no-relax.d: Likewise.
	* testsuite/gas/i386/got.d: Pass -mrelax-relocations=yes to as.
	* testsuite/gas/i386/localpic.d: Likewise.
	* testsuite/gas/i386/mixed-mode-reloc32.d: Likewise.
	* testsuite/gas/i386/reloc32.d: Likewise.
	* testsuite/gas/i386/x86-64-gotpcrel.d: Likewise.
	* testsuite/gas/i386/x86-64-localpic.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-gotpcrel.d: Likewise.
	* testsuite/gas/i386/ilp32/x86-64-localpic.d: Likewise.
	* testsuite/gas/i386/i386.exp: Run got-no-relax and
	x86-64-gotpcrel-no-relax.

ld/

	PR gas/19520
	* testsuite/ld-i386/branch1.d: Pass -mrelax-relocations=yes to as.
	* testsuite/ld-i386/call1.d: Likewise.
	* testsuite/ld-i386/call2.d: Likewise.
	* testsuite/ld-i386/call3a.d: Likewise.
	* testsuite/ld-i386/call3b.d: Likewise.
	* testsuite/ld-i386/call3c.d: Likewise.
	* testsuite/ld-i386/call3d.d: Likewise.
	* testsuite/ld-i386/call3e.d: Likewise.
	* testsuite/ld-i386/call3f.d: Likewise.
	* testsuite/ld-i386/call3g.d: Likewise.
	* testsuite/ld-i386/call3h.d: Likewise.
	* testsuite/ld-i386/jmp1.d: Likewise.
	* testsuite/ld-i386/jmp2.d: Likewise.
	* testsuite/ld-i386/lea1c.d: Likewise.
	* testsuite/ld-i386/load1.d: Likewise.
	* testsuite/ld-i386/load2.d: Likewise.
	* testsuite/ld-i386/load3.d: Likewise.
	* testsuite/ld-i386/load4a.d: Likewise.
	* testsuite/ld-i386/load5a.d: Likewise.
	* testsuite/ld-i386/mov2b.d: Likewise.
	* testsuite/ld-i386/mov3.d: Likewise.
	* testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
	* testsuite/ld-x86-64/call1a.d: Likewise.
	* testsuite/ld-x86-64/call1b.d: Likewise.
	* testsuite/ld-x86-64/call1c.d: Likewise.
	* testsuite/ld-x86-64/call1d.d: Likewise.
	* testsuite/ld-x86-64/call1e.d: Likewise.
	* testsuite/ld-x86-64/call1f.d: Likewise.
	* testsuite/ld-x86-64/call1h.d: Likewise.
	* testsuite/ld-x86-64/call1i.d: Likewise.
	* testsuite/ld-x86-64/load1a.d: Likewise.
	* testsuite/ld-x86-64/load1b.d: Likewise.
	* testsuite/ld-i386/got1a.S: Load GOT into %ecx and use it.
	* testsuite/ld-i386/got1.dd: Updated.
	* testsuite/ld-i386/got1d.S (1): Removed.
	* testsuite/ld-i386/i386.exp: Add -Wa,-mrelax-relocations=yes.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
2016-02-03 08:25:15 -08:00
..
32bit.s
64bit.s
abs-k1om.d
abs-l1om.d
abs.d
bnd-branch-1.d
bnd-branch-1.s
bnd-ifunc-1.d
bnd-ifunc-1.s
bnd-ifunc-2.d
bnd-ifunc-2.s
bnd-plt-1.d
call1.s Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
call1a.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1b.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1c.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1d.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1e.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1f.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1g.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1h.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
call1i.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
compressed1.d
compressed1.s
copyreloc-lib.c
copyreloc-main1.rd
copyreloc-main2.rd
copyreloc-main.out
copyreloc-main.S
discarded1.d
discarded1.s
discarded1.t
dummy.s
dwarfreloc1.s
dwarfreloc2.s
dwarfreloc.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
dwarfreloc.rd
export-class.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
foo.s
gotpcrel1.dd Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotpcrel1.out Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotpcrel1a.S Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotpcrel1b.c Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotpcrel1c.c Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotpcrel1d.S Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
gotplt1.d
gotplt1.s
hidden1.d
hidden1.s
hidden2.d
hidden2.s
hidden3.d
hidden3.s
hidden4.d
hidden4.s
hidden5.d
hidden5.s
ia32-1.d
ia32-2.d
ia32-3.d
ilp32-1.d
ilp32-2.d
ilp32-3.d
ilp32-4-nacl.d
ilp32-4.d
ilp32-4.s
ilp32-5.d
ilp32-5.s
ilp32-6.d
ilp32-6.s
ilp32-7.d
ilp32-7.s
ilp32-8.d
ilp32-8.s
ilp32-9.d
ilp32-9.s
ilp32-10.d
ilp32-10.s
ilp32-11.d
ilp32-11.s
incompatible.l
lea1.s Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1a.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1b.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1c.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1d.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1e.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1f.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
lea1g.d
lea1h.d
lea1i.d
lea1j.d
lea1k.d
lea1l.d
line.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
load1.s Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
load1a-nacl.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1a.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
load1b-nacl.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1b.d Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00
load1c-nacl.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1c.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1d-nacl.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
load1d.d Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
lp64-1.d
lp64-2.d
lp64-3.d
mixed1a.s
mixed1b.s
mixed2a.s
mixed2b.s
mov1.s Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1a.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1b.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1c.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov1d.d Properly convert address load of __start_XXX/__stop_XXX 2015-10-26 08:11:55 -07:00
mov2.s Optimize R_386_GOT32/R_386_GOT32X only if addend is 0 2015-12-04 09:03:04 -08:00
mov2a.d Optimize R_386_GOT32/R_386_GOT32X only if addend is 0 2015-12-04 09:03:04 -08:00
mov2b.d Optimize R_386_GOT32/R_386_GOT32X only if addend is 0 2015-12-04 09:03:04 -08:00
mov2c.d Optimize R_386_GOT32/R_386_GOT32X only if addend is 0 2015-12-04 09:03:04 -08:00
mov2d.d Optimize R_386_GOT32/R_386_GOT32X only if addend is 0 2015-12-04 09:03:04 -08:00
mpx1.out
mpx1a.c
mpx1a.rd
mpx1b.c
mpx1c.c
mpx1c.rd
mpx2.out
mpx2a.c
mpx2a.rd
mpx2b.c
mpx2c.c
mpx2c.rd
mpx3.dd Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
mpx3a.s
mpx3b.s
mpx4.dd
mpx4a.s
mpx4b.s
mpx.exp Copyright update for binutils 2016-01-01 23:00:01 +10:30
nogot1.d
nogot1.s
nogot2.d
nogot2.s
pcrel8.d
pcrel16.d
pie1.d
pie1.s
plt-lib.c
plt-main1.c
plt-main1.rd Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
plt-main2.c
plt-main2.rd
plt-main3.c
plt-main3.rd Also check GOTPCRELX 2015-10-29 09:18:57 -07:00
plt-main4.c
plt-main4.rd Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
plt-main5.c
plt-main-bnd.dd
plt-main.out
plt-main.rd
plt-nacl.pd
plt-pic.s
plt.pd
plt.s
pltgot-1.d
pltgot-1.s
pltgot-2.d
pltlib.s
pr12570a.d
pr12570a.s
pr12570b.d
pr12570b.s
pr12718.d
pr12718.s
pr12921.d
pr12921.s
pr13082-1.s
pr13082-1a.d
pr13082-1b.d
pr13082-2.s
pr13082-2a.d
pr13082-2b.d
pr13082-3.s
pr13082-3a.d
pr13082-3b.d
pr13082-4.s
pr13082-4a.d
pr13082-4b.d
pr13082-5.s
pr13082-5a.d
pr13082-5b.d
pr13082-6.s
pr13082-6a.d
pr13082-6b.d
pr13947.d
pr13947.s
pr14207.d
pr14207.s
pr14215.d
pr14215.s
pr17306a.s
pr17306b.s
pr17618.d
pr17618.s
pr17689.out
pr17689.rd
pr17689a.c
pr17689b.S
pr17689now.rd
pr17709-nacl.rd
pr17709.rd
pr17709a.s
pr17709b.s
pr17827.rd
pr17935-1.d
pr17935-1.s
pr17935-2.d
pr17935-2.s
pr18160.d
pr18160.s
pr18160.t
pr18176.d
pr18176.s
pr18176.t
pr18591.d Add a testcase for PR ld/18591 2016-02-02 06:36:52 -08:00
pr18591.s Add a testcase for PR ld/18591 2016-02-02 06:36:52 -08:00
pr18801.d Issue an error for read-only segment with dynamic IFUNC relocations 2015-08-13 04:31:38 -07:00
pr18801.s Issue an error for read-only segment with dynamic IFUNC relocations 2015-08-13 04:31:38 -07:00
pr18815.d
pr18815.s
pr18900.out Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900a.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900a.rd Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900b.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900b.rd Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr18900c.c Skip PLT for function pointer initialization 2015-09-01 05:06:33 -07:00
pr19013-nacl.d Update ld-x86-64/pr19013-nacl.d 2015-10-01 09:31:16 +09:30
pr19013-x32.d Revert "Also check e_machine when merging sections" 2015-10-01 07:41:28 +09:30
pr19013.d Pass -m elf_x86_64 to ld for 64-bit test 2015-09-30 10:20:34 -07:00
pr19013.s Also check e_machine when merging sections 2015-09-30 05:37:49 -07:00
pr19031.out Create a PLT entry for R_X86_64_PC32 in non-code sections 2015-10-01 10:49:33 -07:00
pr19031a.c Create a PLT entry for R_X86_64_PC32 in non-code sections 2015-10-01 10:49:33 -07:00
pr19031b.S Create a PLT entry for R_X86_64_PC32 in non-code sections 2015-10-01 10:49:33 -07:00
pr19031c.c Create a PLT entry for R_X86_64_PC32 in non-code sections 2015-10-01 10:49:33 -07:00
pr19162.d Add a test for PR ld/19162 2015-10-28 03:20:55 -07:00
pr19162a.s Add a test for PR ld/19162 2015-10-28 03:20:55 -07:00
pr19162b.s Add a test for PR ld/19162 2015-10-28 03:20:55 -07:00
pr19175.d Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19175.s Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19175.t Check symbol defined by assignment in linker script 2015-10-26 16:32:55 -07:00
pr19319.dd Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
pr19319a.S Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
pr19319b.S Properly check symbol defined by assignment in linker script 2015-12-01 14:45:51 -08:00
protected1.d
protected1.s
protected2-k1om.d
protected2-l1om.d
protected2.d
protected2.s
protected3-k1om.d
protected3-l1om.d
protected3.d
protected3.s
protected4.d
protected4.s
protected5.d
protected5.s
protected6.s
protected6a.d
protected6b.d
protected7.s
protected7a.d
protected7b.d
simple.c
split-by-file1.s
split-by-file2.s
split-by-file-nacl.rd
split-by-file.rd
start.s
tlsbin-nacl.rd
tlsbin.dd
tlsbin.rd
tlsbin.s
tlsbin.sd
tlsbin.td
tlsbindesc-nacl.rd
tlsbindesc.dd
tlsbindesc.rd
tlsbindesc.s
tlsbindesc.sd
tlsbindesc.td
tlsbinpic.s
tlsdesc-nacl.pd
tlsdesc-nacl.rd
tlsdesc.dd
tlsdesc.pd
tlsdesc.rd
tlsdesc.s
tlsdesc.sd
tlsdesc.td
tlsg.s
tlsg.sd
tlsgd1.dd
tlsgd1.s
tlsgd2.d
tlsgd2.s
tlsgd3.d
tlsgd3.s
tlsgd4.dd
tlsgd4.s
tlsgd5.dd
tlsgd5a.s
tlsgd5b.s
tlsgd6.dd
tlsgd6a.s
tlsgd6b.s
tlsgd7.dd
tlsgd7.s
tlsgd8.dd
tlsgd8.s
tlsgdesc-nacl.rd
tlsgdesc.dd
tlsgdesc.rd
tlsgdesc.s
tlsie1.dd
tlsie1.s
tlsie2.d
tlsie2.s
tlsie3.d
tlsie3.s
tlsie4.dd
tlsie4.s
tlsld1.dd
tlsld1.s
tlsld2.dd
tlsld2.s
tlsld3.dd
tlsld3.s
tlsle1.d
tlsle1.s
tlslib.s
tlspic1.s
tlspic2.s
tlspic-nacl.rd
tlspic.dd
tlspic.rd
tlspic.sd
tlspic.td
tlspie1.d
tlspie1.s
undefined.s
unique1.d
unique1.s
x86-64-64-export-class.rd
x86-64-x32-export-class.rd
x86-64-x32.rd
x86-64.exp Add -mrelax-relocations= to x86 assembler 2016-02-03 08:25:15 -08:00