Fix extraneous complaints about missing expected TLS relocation (i386).
authorCary Coutant <ccoutant@gmail.com>
Wed, 17 Aug 2016 17:53:31 +0000 (10:53 -0700)
committerCary Coutant <ccoutant@gmail.com>
Wed, 17 Aug 2016 17:53:31 +0000 (10:53 -0700)
Build the test objects with the in-tree assembler. Also fix some cascading
error messages caused by not resetting the skip_call_tls_get_addr_ flag
after printing the error.

gold/
* i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
error message.
* testsuite/Makefile.am (pr20216a): Add missing dependencies.
(pr20308a): Add -Bgcctestdir/ to compile rules.
* testsuite/Makefile.in: Regenerate.

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

index d63d4427543b42f96d1e85f05b819521f0f548b9..548f623deddaa0b84141bd03b1aec3f238e3c97a 100644 (file)
@@ -1,3 +1,11 @@
+2016-08-17  Cary Coutant  <ccoutant@gmail.com>
+
+       * i386.cc (Target_i386): Reset skip_call_tls_get_addr_ after printing
+       error message.
+       * testsuite/Makefile.am (pr20216a): Add missing dependencies.
+       (pr20308a): Add -Bgcctestdir/ to compile rules.
+       * testsuite/Makefile.in: Regenerate.
+
 2016-08-12  Roland McGrath  <roland@hack.frob.com>
 
        PR gold/20462
index 28864cd534aa2f2ada10f83c0b77f3a6fa3d0dcc..ec515c4031f4a40c01802905cf05a9894b6d18f4 100644 (file)
@@ -2794,8 +2794,11 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
           && r_type != elfcpp::R_386_PC32)
          || gsym == NULL
          || strcmp(gsym->name(), "___tls_get_addr") != 0)
-       gold_error_at_location(relinfo, relnum, rel.get_r_offset(),
-                              _("missing expected TLS relocation"));
+       {
+         gold_error_at_location(relinfo, relnum, rel.get_r_offset(),
+                                _("missing expected TLS relocation"));
+         this->skip_call_tls_get_addr_ = false;
+       }
       else
        {
          this->skip_call_tls_get_addr_ = false;
index 739458cd23ae38205188569bf00bee5152b0da04..86c01f82c16cfccea173c315ad03dcf726eba645 100644 (file)
@@ -1192,10 +1192,10 @@ pr20216a.so: pr20216_gd.o pr20216_ld.o gcctestdir/ld
 pr20216b.so: pr20216_def.o gcctestdir/ld
        $(LINK) -Bgcctestdir/ -shared pr20216_def.o
 
-pr20216_gd.o: pr20216_gd.S
+pr20216_gd.o: pr20216_gd.S gcctestdir/as
        $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
-pr20216_ld.o: pr20216_ld.S
+pr20216_ld.o: pr20216_ld.S gcctestdir/as
        $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
 endif DEFAULT_TARGET_X86_64_OR_X32
@@ -1297,11 +1297,11 @@ pr20308a.so: pr20308_gd.o pr20308_ld.o gcctestdir/ld
 pr20308b.so: pr20308_def.o gcctestdir/ld
        $(LINK) -Bgcctestdir/ -shared pr20308_def.o
 
-pr20308_gd.o: pr20308_gd.S
-       $(COMPILE) -c -o $@ $<
+pr20308_gd.o: pr20308_gd.S gcctestdir/as
+       $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
-pr20308_ld.o: pr20308_ld.S
-       $(COMPILE) -c -o $@ $<
+pr20308_ld.o: pr20308_ld.S gcctestdir/as
+       $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
 endif DEFAULT_TARGET_I386
 
index 15844e2b5a12fd1487c7d2614ee7e55b1bd5211f..938d4748cd7a47fa8567f262c52bbb945ef12a67 100644 (file)
@@ -6150,10 +6150,10 @@ uninstall-am:
 @DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20216b.so: pr20216_def.o gcctestdir/ld
 @DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@      $(LINK) -Bgcctestdir/ -shared pr20216_def.o
 
-@DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20216_gd.o: pr20216_gd.S
+@DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20216_gd.o: pr20216_gd.S gcctestdir/as
 @DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@      $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
-@DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20216_ld.o: pr20216_ld.S
+@DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20216_ld.o: pr20216_ld.S gcctestdir/as
 @DEFAULT_TARGET_X86_64_OR_X32_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@      $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
 @DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@i386_mov_to_lea1.o: i386_mov_to_lea1.s
@@ -6205,11 +6205,11 @@ uninstall-am:
 @DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20308b.so: pr20308_def.o gcctestdir/ld
 @DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       $(LINK) -Bgcctestdir/ -shared pr20308_def.o
 
-@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20308_gd.o: pr20308_gd.S
-@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       $(COMPILE) -c -o $@ $<
+@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20308_gd.o: pr20308_gd.S gcctestdir/as
+@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 
-@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20308_ld.o: pr20308_ld.S
-@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       $(COMPILE) -c -o $@ $<
+@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@pr20308_ld.o: pr20308_ld.S gcctestdir/as
+@DEFAULT_TARGET_I386_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@       $(COMPILE) -Bgcctestdir/ -c -o $@ $<
 @GCC_TRUE@@NATIVE_LINKER_TRUE@many_sections_define.h:
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ (for i in `seq 1 70000`; do \
 @GCC_TRUE@@NATIVE_LINKER_TRUE@    echo "int var_$$i __attribute__((section(\"section_$$i\"))) = $$i;"; \