aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r--lib/MC/ELFObjectWriter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index b15c2d4..4e09b4d 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -1080,8 +1080,8 @@ bool ELFObjectWriter::IsFixupFullyResolved(const MCAssembler &Asm,
const MCSection *SectionA = 0;
const MCSymbol *SymbolA = 0;
if (const MCSymbolRefExpr *A = Target.getSymA()) {
- SymbolA = &A->getSymbol().AliasedSymbol();
- SectionA = &SymbolA->getSection();
+ SymbolA = &A->getSymbol();
+ SectionA = &SymbolA->AliasedSymbol().getSection();
}
const MCSection *SectionB = 0;
@@ -1092,6 +1092,9 @@ bool ELFObjectWriter::IsFixupFullyResolved(const MCAssembler &Asm,
if (!BaseSection)
return SectionA == SectionB;
+ // FIXME: This is in here just to match gnu as output. If the two ends
+ // are in the same section, there is nothing that the linker can do to
+ // break it.
const MCSymbolData &DataA = Asm.getSymbolData(*SymbolA);
if (DataA.isExternal())
return false;