mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
[PowerPC] Support TLS variables in debug info
This adds an implementation of getDebugThreadLocalSymbol for (64-bit) PowerPC. This needs to return a generic MCExpr since on ppc64, we need to add a bias of 0x8000 to the value returned by the R_PPC64_DTPREL64 relocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185461 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,3 +55,13 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
|
||||
return DefaultSection;
|
||||
}
|
||||
|
||||
const MCExpr *PPC64LinuxTargetObjectFile::
|
||||
getDebugThreadLocalSymbol(const MCSymbol *Sym) const {
|
||||
const MCExpr *Expr =
|
||||
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_PPC_DTPREL, getContext());
|
||||
return MCBinaryExpr::CreateAdd(Expr,
|
||||
MCConstantExpr::Create(0x8000, getContext()),
|
||||
getContext());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user