From b142bef30b2e2ef0c978f5f3041f1d4a429eb9b2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 23 Sep 2010 17:25:18 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114667 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/ELFObjectWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MC') diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 513a509..7960a07 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/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 -- cgit v1.1