aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-16 04:11:46 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-16 04:11:46 +0000
commit2c920850343810535c0cd8720a81eddf7997663a (patch)
tree54472346b1faa73c8308bbc1cd19c2f15f510f4f /lib
parent1eeb2806cbfb27db6a842f586d498ef12a933608 (diff)
downloadexternal_llvm-2c920850343810535c0cd8720a81eddf7997663a.zip
external_llvm-2c920850343810535c0cd8720a81eddf7997663a.tar.gz
external_llvm-2c920850343810535c0cd8720a81eddf7997663a.tar.bz2
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
Diffstat (limited to 'lib')
-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;