mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Behave a bit more like gnu as and use the symbol (instead of the section)
for any relocation to a symbol defined in a tls section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120121 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -718,10 +718,17 @@ const MCSymbol *ELFObjectWriter::SymbolToReloc(const MCAssembler &Asm,
|
||||
|
||||
const MCSectionELF &Section =
|
||||
static_cast<const MCSectionELF&>(ASymbol.getSection());
|
||||
const SectionKind secKind = Section.getKind();
|
||||
|
||||
if (Section.getKind().isBSS())
|
||||
if (secKind.isBSS())
|
||||
return NULL;
|
||||
|
||||
if (secKind.isThreadLocal()) {
|
||||
if (Renamed)
|
||||
return Renamed;
|
||||
return &Symbol;
|
||||
}
|
||||
|
||||
MCSymbolRefExpr::VariantKind Kind = Target.getSymA()->getKind();
|
||||
const MCSectionELF &Sec2 =
|
||||
static_cast<const MCSectionELF&>(F.getParent()->getSection());
|
||||
@@ -729,8 +736,7 @@ const MCSymbol *ELFObjectWriter::SymbolToReloc(const MCAssembler &Asm,
|
||||
if (&Sec2 != &Section &&
|
||||
(Kind == MCSymbolRefExpr::VK_PLT ||
|
||||
Kind == MCSymbolRefExpr::VK_GOTPCREL ||
|
||||
Kind == MCSymbolRefExpr::VK_GOTOFF ||
|
||||
Kind == MCSymbolRefExpr::VK_NTPOFF)) {
|
||||
Kind == MCSymbolRefExpr::VK_GOTOFF)) {
|
||||
if (Renamed)
|
||||
return Renamed;
|
||||
return &Symbol;
|
||||
|
Reference in New Issue
Block a user