mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-19 17:24:57 +00:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231130 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user