summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-09-23 17:25:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-09-23 17:25:18 +0000
commit48e108753b6ea0ce3113fdb1ecba06c73d388137 (patch)
tree94b1916fd57e9c51a7aae7bc69ecfb766d41a8b6 /llvm/lib/MC
parent3aecb15f0afb9c92ca1f6de33653e75fa1240a6b (diff)
downloadbcm5719-llvm-48e108753b6ea0ce3113fdb1ecba06c73d388137.tar.gz
bcm5719-llvm-48e108753b6ea0ce3113fdb1ecba06c73d388137.zip
Represent relocations against local symbols as relocations against the section
they are in. Both ways should be equivalent, but gas produces relocations against the section. Roman wrote the patch, I added the test. llvm-svn: 114667
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 513a509b69a..7960a07499a 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -502,7 +502,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
}
if (Base) {
- if (F && (!Symbol->isInSection() || SD.isCommon()) && !SD.isExternal()) {
+ if (F && !SD.isExternal()) {
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
Value += Layout.getSymbolAddress(&SD);
} else
OpenPOWER on IntegriCloud