[PATCH] [lld][ELF][x86-64] Implement static relocation model for TLS.
Shankar Kalpathi Easwaran
shankarke at gmail.com
Thu Jan 31 15:19:02 PST 2013
Cool!, LGTM
================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp:87-93
@@ -85,4 +86,9 @@
}
- int32_t result = (int32_t)(targetVAddress - _tlsSize);
- *reinterpret_cast<llvm::support::little32_t *>(location) = result;
+ if (ref.kind() == R_X86_64_TPOFF32) {
+ int32_t result = (int32_t)(targetVAddress - _tlsSize);
+ *reinterpret_cast<llvm::support::little32_t *>(location) = result;
+ } else {
+ int64_t result = (int64_t)(targetVAddress - _tlsSize);
+ *reinterpret_cast<llvm::support::little64_t *>(location) = result;
+ }
break;
----------------
Should the location contents be or'ed or added here ?
================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64TargetInfo.cpp:35
@@ -35,2 +34,3 @@
- virtual StringRef name() const { return "ELF-GOTAtom"; }
+ virtual StringRef name() const { return ""; }
+
----------------
For debugging it could return got.<symbolname> ?
================
Comment at: lib/ReaderWriter/ELF/X86_64/X86_64TargetInfo.cpp:65
@@ -62,2 +64,3 @@
- virtual StringRef name() const { return "ELF-PLTAtom"; }
+ virtual StringRef name() const { return ""; }
+
----------------
Same here ?
http://llvm-reviews.chandlerc.com/D361
More information about the llvm-commits
mailing list