summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetObjectFile.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2015-03-03 21:01:27 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2015-03-03 21:01:27 +0000
commit06a8eb8343676632fc6e1563c39835b1a91da53b (patch)
tree0830cc3e16e460cc9d6f2dbc31087f55e72e7721 /llvm/lib/Target/X86/X86TargetObjectFile.cpp
parent36a2dc895fd4021df857039a9d0373e28f46e0d6 (diff)
downloadbcm5719-llvm-06a8eb8343676632fc6e1563c39835b1a91da53b.tar.gz
bcm5719-llvm-06a8eb8343676632fc6e1563c39835b1a91da53b.zip
[X86][ELF] Correct relocation for DWARF TLS references
Previously we had only Linux using DTPOFF for these; all X86 ELF targets should. Fixes a side issue mentioned in PR21077. Differential Revision: http://reviews.llvm.org/D8011 llvm-svn: 231130
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetObjectFile.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetObjectFile.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp
index 1d1c32eb2cb..678630db966 100644
--- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp
+++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp
@@ -62,18 +62,17 @@ const MCExpr *X86_64MachoTargetObjectFile::getIndirectSymViaGOTPCRel(
return MCBinaryExpr::CreateAdd(Res, Off, getContext());
}
+const MCExpr *X86ELFTargetObjectFile::getDebugThreadLocalSymbol(
+ const MCSymbol *Sym) const {
+ return MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_DTPOFF, getContext());
+}
+
void
X86LinuxTargetObjectFile::Initialize(MCContext &Ctx, const TargetMachine &TM) {
TargetLoweringObjectFileELF::Initialize(Ctx, TM);
InitializeELF(TM.Options.UseInitArray);
}
-const MCExpr *
-X86LinuxTargetObjectFile::getDebugThreadLocalSymbol(
- const MCSymbol *Sym) const {
- return MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_DTPOFF, getContext());
-}
-
const MCExpr *X86WindowsTargetObjectFile::getExecutableRelativeSymbol(
const ConstantExpr *CE, Mangler &Mang, const TargetMachine &TM) const {
// We are looking for the difference of two symbols, need a subtraction
OpenPOWER on IntegriCloud