diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-06-28 20:05:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-06-28 20:05:11 +0000 |
commit | f2694970680c9fce4b5876df39964f4d1f2d324f (patch) | |
tree | be2fec623f62592416fe946a4776b89fab002435 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | f3cd7c51156833d86a34b1d93b9553a48ffe5569 (diff) | |
download | bcm5719-llvm-f2694970680c9fce4b5876df39964f4d1f2d324f.tar.gz bcm5719-llvm-f2694970680c9fce4b5876df39964f4d1f2d324f.zip |
DebugInfo: PR14728: TLS support
Based on GCC's output for TLS variables (OP_constNu, x@dtpoff,
OP_lo_user), this implements debug info support for TLS in ELF. Verified
that this output is correct/sufficient on Linux (using gold - if you're
using binutils-ld, you'll need something with the fix for
http://sourceware.org/bugzilla/show_bug.cgi?id=15685 in it).
Support on non-ELF is sort of "arbitrary" at the moment - if Apple folks
want to discuss (or just go ahead & implement) how this should work in
MachO, etc, I'm open.
llvm-svn: 185203
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index 7e7359a8fee..69d55913caf 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -401,6 +401,10 @@ TargetLoweringObjectFileELF::InitializeELF(bool UseInitArray_) { SectionKind::getDataRel()); } +const MCSymbolRefExpr *TargetLoweringObjectFileELF::getDebugThreadLocalSymbol(const MCSymbol *Sym) const { + return MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_DTPOFF, getContext()); +} + //===----------------------------------------------------------------------===// // MachO //===----------------------------------------------------------------------===// |