From 2c920850343810535c0cd8720a81eddf7997663a Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 16 Nov 2010 04:11:46 +0000 Subject: A bit more of gnu as compatibility when handling relocations with aliases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119328 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/ELFObjectWriter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') 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; -- cgit v1.1