mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 16:29:50 +08:00
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
llvm-svn: 111925
This commit is contained in:
@@ -477,7 +477,8 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
||||
const MCSymbolData *Base = Asm.getAtom(Layout, &SD);
|
||||
|
||||
if (Base) {
|
||||
if (MCFragment *F = SD.getFragment()) {
|
||||
MCFragment *F = SD.getFragment();
|
||||
if (F && (!Symbol->isInSection() || SD.isCommon())) {
|
||||
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
|
||||
Value += Layout.getSymbolAddress(&SD);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user