mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 06:06:52 +00:00
Correctly compute the relocation when it is not in the first fragment.
llvm-svn: 115506
This commit is contained in:
parent
7b644f3291
commit
ce6ea76503
@ -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…
x
Reference in New Issue
Block a user