mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Correctly compute the relocation when it is not in the first fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115506 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2e0affb428
commit
01263d35d4
@ -539,7 +539,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
|
||||
const MCSymbol &SymbolB = RefB->getSymbol();
|
||||
MCSymbolData &SDB = Asm.getSymbolData(SymbolB);
|
||||
IsPCRel = true;
|
||||
Value += Fixup.getOffset() - Layout.getSymbolAddress(&SDB);
|
||||
Value += Layout.getFragmentOffset(Fragment) + Fixup.getOffset() - Layout.getSymbolAddress(&SDB);
|
||||
}
|
||||
|
||||
// Check that this case has already been fully resolved before we get
|
||||
|
@ -19,7 +19,8 @@
|
||||
// CHECK-NEXT: ),
|
||||
// CHECK-NEXT: ])
|
||||
|
||||
.zero 4
|
||||
.zero 1
|
||||
.align 4
|
||||
foo:
|
||||
.zero 8
|
||||
.long baz - foo
|
||||
|
Loading…
Reference in New Issue
Block a user