[PATCH] [lld] [ELF] Support for general dynamic TLS relocations on X86_64
Shankar Kalpathi Easwaran
shankarke at gmail.com
Fri Sep 26 16:15:17 PDT 2014
================
Comment at: lib/ReaderWriter/ELF/DynamicLibraryWriter.h:70
@@ -67,1 +69,3 @@
_runtimeFile->addAbsoluteAtom("_end");
+ _dynamicInterpreterFile->addAtom(*new (this->_alloc)
+ TLSGETADDRAtom(*_dynamicInterpreterFile));
----------------
Why do we want to add this atom ? This should be an undefined symbol with fPIC.
================
Comment at: lib/ReaderWriter/ELF/ExecutableWriter.h:69-71
@@ -66,2 +68,5 @@
_runtimeFile->addAbsoluteAtom("__fini_array_end");
+ if (this->_context.isDynamic())
+ _dynamicInterpreterFile->addAtom(
+ *new (this->_alloc) TLSGETADDRAtom(*_dynamicInterpreterFile));
}
----------------
as my previous comment, we should not add this atom by default.
http://reviews.llvm.org/D5505
More information about the llvm-commits
mailing list