This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold commit] Fix extraneous complaints about missing expected TLS relocation (i386)

I've committed the following patch to fix a problem similar to the
earlier one for x86_64. This also adds a missing dependency on the
in-tree assembler to the build rules for the x86_64 test objects.


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.

2016-08-17  Cary Coutant  <>

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

diff --git a/gold/ b/gold/
index 28864cd..ec515c4 100644
--- a/gold/
+++ b/gold/
@@ -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;
+       }
          this->skip_call_tls_get_addr_ = false;
diff --git a/gold/testsuite/ b/gold/testsuite/
index 739458c..86c01f8 100644
--- a/gold/testsuite/
+++ b/gold/testsuite/
@@ -1192,10 +1192,10 @@ pr20216_gd.o pr20216_ld.o gcctestdir/ld 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 @@ pr20308_gd.o pr20308_ld.o gcctestdir/ld 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 $@ $<


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]