mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-09 05:13:01 +00:00
Index external symbols by symbol table instead of parent section, by Roman Divacky.
llvm-svn: 112472
This commit is contained in:
parent
3aabb3eb53
commit
ca65cc9222
@ -470,7 +470,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
|||||||
MCFragment *F = SD.getFragment();
|
MCFragment *F = SD.getFragment();
|
||||||
|
|
||||||
if (Base) {
|
if (Base) {
|
||||||
if (F && (!Symbol->isInSection() || SD.isCommon())) {
|
if (F && (!Symbol->isInSection() || SD.isCommon()) && !SD.isExternal()) {
|
||||||
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
|
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
|
||||||
Value += Layout.getSymbolAddress(&SD);
|
Value += Layout.getSymbolAddress(&SD);
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user