* i386.cc (Target_i386::Relocate::relocate): Recognize non-PIC calls
authorCary Coutant <ccoutant@google.com>
Fri, 30 Jan 2009 00:21:46 +0000 (00:21 +0000)
committerCary Coutant <ccoutant@google.com>
Fri, 30 Jan 2009 00:21:46 +0000 (00:21 +0000)
to __tls_get_addr.
* x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.

* ChangeLog: Fixed typo in previous ChangeLog entry (version 1.9).

gold/ChangeLog
gold/i386.cc
gold/x86_64.cc

index bae5102fff72e16db51f58af412bbf324ba71855..56fc48e014970dc3b2cf1943fced702844e9ca19 100644 (file)
@@ -1,6 +1,12 @@
+2009-01-29  Cary Coutant  <ccoutant@google.com>
+
+       * i386.cc (Target_i386::Relocate::relocate): Recognize non-PIC calls
+       to __tls_get_addr.
+       * x86_64.cc (Target_x86_64::Relocate::relocate): Likewise.
+
 2009-01-28  Ian Lance Taylor  <iant@google.com>
 
-       * version.cc (version_string): Bump to 1.8.
+       * version.cc (version_string): Bump to 1.9.
 
        * gold.h: Include <cstring> and <stdint.h>.
        * version.cc: Include <cstdio>.
index 3779d4e2d9e9759415f15830a05a0ca45042278b..e033d34382a589dfd2bfca8c87b3fbcbd90ad3a4 100644 (file)
@@ -1633,7 +1633,8 @@ Target_i386::Relocate::relocate(const Relocate_info<32, false>* relinfo,
 {
   if (this->skip_call_tls_get_addr_)
     {
-      if (r_type != elfcpp::R_386_PLT32
+      if ((r_type != elfcpp::R_386_PLT32
+           && 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(),
index 17246248ad2d2cfeff50342d878644cc49ba5b74..4dfe75b152614d036fc1a81815ecf73d7047d9c9 100644 (file)
@@ -1703,7 +1703,8 @@ Target_x86_64::Relocate::relocate(const Relocate_info<64, false>* relinfo,
 {
   if (this->skip_call_tls_get_addr_)
     {
-      if (r_type != elfcpp::R_X86_64_PLT32
+      if ((r_type != elfcpp::R_X86_64_PLT32
+           && r_type != elfcpp::R_X86_64_PC32)
          || gsym == NULL
          || strcmp(gsym->name(), "__tls_get_addr") != 0)
        {