diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-18 20:25:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-10-18 20:25:33 +0000 |
commit | ce2d3c57758619e99a99104e1168a9558658fab0 (patch) | |
tree | 8c8ba54b75e5e087928e238d241f6b6c2b0bd4e3 /lib/MC/ELFObjectWriter.cpp | |
parent | 24dc9ecdc55d732ac93fc782d6232413fe2c1160 (diff) |
Relocate with .bss instead of using the symbol. Matches gas behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 1e0d535251..b5943ec717 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -560,6 +560,9 @@ static bool ShouldRelocOnSymbol(const MCSymbolData &SD, const MCSectionELF &Sec2 = static_cast<const MCSectionELF&>(F.getParent()->getSection()); + if (Section.getKind().isBSS()) + return false; + if (&Sec2 != &Section && (Kind == MCSymbolRefExpr::VK_PLT || Kind == MCSymbolRefExpr::VK_GOTPCREL || |