Pass -mrelax-relocations=yes to $(TEST_AS)
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Feb 2016 13:55:11 +0000 (05:55 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 16 Feb 2016 14:00:03 +0000 (06:00 -0800)
x86_64_mov_to_lea5.o and x86_64_mov_to_lea6.o must be assembled with
-mrelax-relocations=yes since when assembler is configured with
--disable-x86-relax-relocations, R_X86_64_GOTPCRELX relocation won't
be generated.  This linker optimization requires R_X86_64_GOTPCRELX
relocation.

This patch also removed the duplicated x86_64_overflow_pc32.o target.

* testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
-mrelax-relocations=yes to $(TEST_AS).
(x86_64_mov_to_lea6.o): Likewise.
(x86_64_overflow_pc32.o): Remove duplicated target.
* testsuite/Makefile.in: Regenerated.

gold/ChangeLog
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in

index 1e261e2aacd4ef5f61be645ac9d5819b06d6a07b..45d02bf064cab441143f3dd3aab895e1a57f3392 100644 (file)
@@ -1,3 +1,11 @@
+2016-02-15  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/Makefile.am (x86_64_mov_to_lea5.o): Pass
+       -mrelax-relocations=yes to $(TEST_AS).
+       (x86_64_mov_to_lea6.o): Likewise.
+       (x86_64_overflow_pc32.o): Remove duplicated target.
+       * testsuite/Makefile.in: Regenerated.
+
 2016-02-15  Marcin Koƛcielnicki  <koriakin@0x04.net>
 
        * s390.cc (Target_s390::match_view_u): New helper method.
index 7240f98fed6cffae546152ff8134f39184e2db13..32906db719338d8ac673367ffe718cc1cab998a4 100644 (file)
@@ -1010,9 +1010,9 @@ x86_64_mov_to_lea3.o: x86_64_mov_to_lea2.s
 x86_64_mov_to_lea4.o: x86_64_mov_to_lea2.s
        $(TEST_AS) --64 -o $@ $<
 x86_64_mov_to_lea5.o: x86_64_mov_to_lea3.s
-       $(TEST_AS) --x32 -o $@ $<
+       $(TEST_AS) --x32 -mrelax-relocations=yes -o $@ $<
 x86_64_mov_to_lea6.o: x86_64_mov_to_lea3.s
-       $(TEST_AS) --64 -o $@ $<
+       $(TEST_AS) --64 -mrelax-relocations=yes -o $@ $<
 x86_64_mov_to_lea7.o: x86_64_mov_to_lea4.s
        $(TEST_AS) --x32 -o $@ $<
 x86_64_mov_to_lea8.o: x86_64_mov_to_lea4.s
@@ -1091,8 +1091,6 @@ x86_64_overflow_pc32.err: x86_64_overflow_pc32.o gcctestdir/ld
 check_SCRIPTS += x32_overflow_pc32.sh
 check_DATA += x32_overflow_pc32.err
 MOSTLYCLEANFILES += x32_overflow_pc32.err
-x86_64_overflow_pc32.o: x86_64_overflow_pc32.s
-       $(TEST_AS) -o $@ $<
 x32_overflow_pc32.o: x86_64_overflow_pc32.s
        $(TEST_AS) --x32 -o $@ $<
 x32_overflow_pc32.err: x32_overflow_pc32.o gcctestdir/ld
index 3cdf1a410aa2260b1afa96adfc6abf88b0772ab4..fffd4cad498cde63ec577b73e6ec40392f3a4fa7 100644 (file)
@@ -5455,9 +5455,9 @@ uninstall-am:
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_mov_to_lea4.o: x86_64_mov_to_lea2.s
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --64 -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_mov_to_lea5.o: x86_64_mov_to_lea3.s
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --x32 -o $@ $<
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --x32 -mrelax-relocations=yes -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_mov_to_lea6.o: x86_64_mov_to_lea3.s
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --64 -o $@ $<
+@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --64 -mrelax-relocations=yes -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_mov_to_lea7.o: x86_64_mov_to_lea4.s
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --x32 -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_mov_to_lea8.o: x86_64_mov_to_lea4.s
@@ -5528,8 +5528,6 @@ uninstall-am:
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       rm -f $@; \
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       exit 1; \
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     fi
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x86_64_overflow_pc32.o: x86_64_overflow_pc32.s
-@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x32_overflow_pc32.o: x86_64_overflow_pc32.s
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@     $(TEST_AS) --x32 -o $@ $<
 @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@x32_overflow_pc32.err: x32_overflow_pc32.o gcctestdir/ld