mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +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();
|
const MCSymbol &SymbolB = RefB->getSymbol();
|
||||||
MCSymbolData &SDB = Asm.getSymbolData(SymbolB);
|
MCSymbolData &SDB = Asm.getSymbolData(SymbolB);
|
||||||
IsPCRel = true;
|
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
|
// Check that this case has already been fully resolved before we get
|
||||||
|
@ -19,7 +19,8 @@
|
|||||||
// CHECK-NEXT: ),
|
// CHECK-NEXT: ),
|
||||||
// CHECK-NEXT: ])
|
// CHECK-NEXT: ])
|
||||||
|
|
||||||
.zero 4
|
.zero 1
|
||||||
|
.align 4
|
||||||
foo:
|
foo:
|
||||||
.zero 8
|
.zero 8
|
||||||
.long baz - foo
|
.long baz - foo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user