mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Correctly compute the offset of the symbol. Forgot these bits from the
last commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
16c9a64c28
commit
a5c6b78bf8
@ -504,7 +504,10 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
||||
if (Base) {
|
||||
if (F && !SD.isExternal()) {
|
||||
Index = F->getParent()->getOrdinal() + LocalSymbolData.size() + 1;
|
||||
Value += Layout.getSymbolAddress(&SD);
|
||||
|
||||
MCSectionData *FSD = F->getParent();
|
||||
// Offset of the symbol in the section
|
||||
Value += Layout.getSymbolAddress(&SD) - Layout.getSectionAddress(FSD);
|
||||
} else
|
||||
Index = getSymbolIndexInSymbolTable(Asm, Symbol);
|
||||
if (Base != &SD)
|
||||
|
Loading…
Reference in New Issue
Block a user