PATCH: Add gold support for TLS descriptors

Cary Coutant ccoutant@google.com
Fri Apr 11 23:40:00 GMT 2008


This patch fixes a bogus part of the earlier patch. I had removed two
lines, thinking they weren't necessary, but they were.

2008-04-11  Cary Coutant  <ccoutant@google.com>

	* i386.cc (Target_i386::got_mod_index_entry): Restore code previously
	thought unnecessary.
	* x86_64.cc (Target_x86_64::got_mod_index_entry): Likewise.

The problem shows up when running the testsuite with -O (which I
should have done before submitting the patch).

-cary


Index: i386.cc
===================================================================
RCS file: /cvs/src/src/gold/i386.cc,v
retrieving revision 1.68
diff -u -p -r1.68 i386.cc
--- i386.cc	11 Apr 2008 21:24:29 -0000	1.68
+++ i386.cc	11 Apr 2008 23:34:28 -0000
@@ -725,6 +725,7 @@ Target_i386::got_mod_index_entry(Symbol_
       unsigned int got_offset = got->add_constant(0);
       rel_dyn->add_local(object, 0, elfcpp::R_386_TLS_DTPMOD32, got,
                          got_offset);
+      got->add_constant(0);
       this->got_mod_index_offset_ = got_offset;
     }
   return this->got_mod_index_offset_;
Index: x86_64.cc
===================================================================
RCS file: /cvs/src/src/gold/x86_64.cc,v
retrieving revision 1.61
diff -u -p -r1.61 x86_64.cc
--- x86_64.cc	11 Apr 2008 21:24:30 -0000	1.61
+++ x86_64.cc	11 Apr 2008 23:34:28 -0000
@@ -797,6 +797,7 @@ Target_x86_64::got_mod_index_entry(Symbo
       unsigned int got_offset = got->add_constant(0);
       rela_dyn->add_local(object, 0, elfcpp::R_X86_64_DTPMOD64, got,
                           got_offset, 0);
+      got->add_constant(0);
       this->got_mod_index_offset_ = got_offset;
     }
   return this->got_mod_index_offset_;



More information about the Binutils mailing list