forked from OSchip/llvm-project
Index external symbols by symbol table instead of parent section, by Roman Divacky.
llvm-svn: 112472
This commit is contained in:
parent
6ebea89316
commit
f791b9fc56
|
@ -470,7 +470,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
|||
MCFragment *F = SD.getFragment();
|
||||
|
||||
if (Base) {
|
||||
if (F && (!Symbol->isInSection() || SD.isCommon())) {
|
||||
if (F && (!Symbol->isInSection() || SD.isCommon()) && !SD.isExternal()) {
|
||||
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
|
||||
Value += Layout.getSymbolAddress(&SD);
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue