Update x86 linker tests for --disable-x86-relax-relocations
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Jun 2016 11:10:11 +0000 (04:10 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 3 Jun 2016 11:10:11 +0000 (04:10 -0700)
Pass -mrelax-relocations=yes to x86 linker tests, which require relax
relocations, to support --disable-x86-relax-relocations.

* testsuite/ld-i386/i386.exp: Assemble gotpc1.o and pr19319b.o
with -mrelax-relocations=yes.
* testsuite/ld-i386/lea1a.d (as): Add -mrelax-relocations=yes.
* testsuite/ld-i386/lea1b.d (as): Likewise.
* testsuite/ld-i386/lea1d.d (as): Likewise.
* testsuite/ld-i386/lea1e.d (as): Likewise.
* testsuite/ld-i386/lea1f.d (as): Likewise.
* testsuite/ld-i386/load7.d (as): Likewise.
* testsuite/ld-i386/mov1b.d (as): Likewise.
* testsuite/ld-i386/pr19175.d (as): Likewise.
* testsuite/ld-ifunc/ifunc-13-i386.d (as): Likewise.
* testsuite/ld-ifunc/ifunc-21-i386.d (as): Likewise.
* testsuite/ld-ifunc/ifunc-22-i386.d (as): Likewise.
* testsuite/ld-x86-64/x86-64.exp: Assemble gotpcrel1a.o,
gotpcrel1b.o and gotpcrel1c.o with -mrelax-relocations=yes.

14 files changed:
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/lea1a.d
ld/testsuite/ld-i386/lea1b.d
ld/testsuite/ld-i386/lea1d.d
ld/testsuite/ld-i386/lea1e.d
ld/testsuite/ld-i386/lea1f.d
ld/testsuite/ld-i386/load7.d
ld/testsuite/ld-i386/mov1b.d
ld/testsuite/ld-i386/pr19175.d
ld/testsuite/ld-ifunc/ifunc-13-i386.d
ld/testsuite/ld-ifunc/ifunc-21-i386.d
ld/testsuite/ld-ifunc/ifunc-22-i386.d
ld/testsuite/ld-x86-64/x86-64.exp

index 463f1a1..60e73ac 100644 (file)
@@ -1,3 +1,21 @@
+2016-06-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-i386/i386.exp: Assemble gotpc1.o and pr19319b.o
+       with -mrelax-relocations=yes.
+       * testsuite/ld-i386/lea1a.d (as): Add -mrelax-relocations=yes.
+       * testsuite/ld-i386/lea1b.d (as): Likewise.
+       * testsuite/ld-i386/lea1d.d (as): Likewise.
+       * testsuite/ld-i386/lea1e.d (as): Likewise.
+       * testsuite/ld-i386/lea1f.d (as): Likewise.
+       * testsuite/ld-i386/load7.d (as): Likewise.
+       * testsuite/ld-i386/mov1b.d (as): Likewise.
+       * testsuite/ld-i386/pr19175.d (as): Likewise.
+       * testsuite/ld-ifunc/ifunc-13-i386.d (as): Likewise.
+       * testsuite/ld-ifunc/ifunc-21-i386.d (as): Likewise.
+       * testsuite/ld-ifunc/ifunc-22-i386.d (as): Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Assemble gotpcrel1a.o,
+       gotpcrel1b.o and gotpcrel1c.o with -mrelax-relocations=yes.
+
 2016-06-02  Vineet Gupta  <Vineet.Gupta1@synopsys.com>
 
        * configure.tgt: Replace -uclibc with *.
index 8e66280..d30f9fb 100644 (file)
@@ -664,7 +664,7 @@ if { [isnative]
        [list \
            "Build gotpc1.o" \
            "-r -nostdlib" \
-           "" \
+           "-Wa,-mrelax-relocations=yes" \
            { got1a.S got1b.c got1c.c } \
            "" \
            "gotpc1.o" \
@@ -672,7 +672,7 @@ if { [isnative]
        [list \
            "Build gotpc1" \
            "-Wl,--as-needed tmpdir/gotpc1.o tmpdir/got1d.so" \
-           "-Wa,-mrelax-relocations=yes" \
+           "" \
            { dummy.s } \
            {{objdump {-dw} got1.dd}} \
            "got1" \
@@ -688,7 +688,7 @@ if { [isnative]
        [list \
            "Build pr19319" \
            "-pie -nostdlib -nostartfiles tmpdir/pr19319.so" \
-           "" \
+           "-Wa,-mrelax-relocations=yes" \
            { pr19319b.S } \
            {{objdump {-dw} pr19319.dd}} \
            "pr19319" \
index d882522..b84ad7f 100644 (file)
@@ -1,5 +1,5 @@
 #source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -Bsymbolic -shared -melf_i386
 #objdump: -dw
 
index b3f6507..b2bc6cb 100644 (file)
@@ -1,5 +1,5 @@
 #source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -pie -melf_i386
 #objdump: -dw
 
index 7deab26..0b583d2 100644 (file)
@@ -1,5 +1,5 @@
 #source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -Bsymbolic -shared -melf_i386
 #readelf: -Sw
 
index ae66958..253943d 100644 (file)
@@ -1,5 +1,5 @@
 #source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -pie -melf_i386
 #readelf: -Sw
 
index 3c16996..1b77318 100644 (file)
@@ -1,5 +1,5 @@
 #source: lea1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -melf_i386
 #readelf: -Sw
 
index 898dc39..47eb809 100644 (file)
@@ -1,4 +1,4 @@
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -shared -melf_i386 --version-script load7.map
 #objdump: -dw
 
index 1b7cc2f..aaeeb63 100644 (file)
@@ -1,5 +1,5 @@
 #source: mov1.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -pie -melf_i386 --no-dynamic-linker
 #objdump: -dw
 
index 3f2edb1..aaf929f 100644 (file)
@@ -1,5 +1,5 @@
 #source: pr19175.s
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #ld: -Bsymbolic -shared -melf_i386 -T pr19175.t
 #objdump: -dw
 
index 746945b..677fa92 100644 (file)
@@ -1,7 +1,7 @@
 #source: ifunc-13a-i386.s
 #source: ifunc-13b-i386.s
 #ld: -shared -m elf_i386 -z nocombreloc
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
 
index 36fcfc0..e609dbe 100644 (file)
@@ -1,5 +1,5 @@
 #ld: -m elf_i386
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
 
index 36fcfc0..e609dbe 100644 (file)
@@ -1,5 +1,5 @@
 #ld: -m elf_i386
-#as: --32
+#as: --32 -mrelax-relocations=yes
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
 
index 3f4d737..b3ceaa1 100644 (file)
@@ -718,18 +718,16 @@ if { [isnative] && [which $CC] != 0 } {
            "gotpcrel1d.so" \
        ] \
        [list \
-           "Build libgotpcrel1.a" \
-           "" \
+           "Build gotpcrel1a.o gotpcrel1b.o gotpcrel1c.o" \
            "" \
+           "-Wa,-mrelax-relocations=yes" \
            { gotpcrel1a.S gotpcrel1b.c gotpcrel1c.c } \
-           "" \
-           "libgotpcrel1.a" \
        ] \
        [list \
            "Build gotpcrel1" \
            "-Wl,--as-needed tmpdir/gotpcrel1a.o tmpdir/gotpcrel1b.o tmpdir/gotpcrel1c.o tmpdir/gotpcrel1d.so" \
-           "-Wa,-mrelax-relocations=yes" \
            { dummy.s } \
+           "" \
            {{objdump {-dw} gotpcrel1.dd}} \
            "gotpcrel1" \
        ] \