mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
53c36c41ae
commit
2f6e0e68a4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user