mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[SystemZ] Support missing relocation types in RuntimeDyldELF
Handle some more relocation types in RuntimeDyldELF::resolveSystemZRelocation This fixes a number of failing LLDB test cases. llvm-svn: 302565
This commit is contained in:
parent
c698370461
commit
21e9c1e728
@ -802,20 +802,35 @@ void RuntimeDyldELF::resolveSystemZRelocation(const SectionEntry &Section,
|
||||
writeInt32BE(LocalAddress, Delta / 2);
|
||||
break;
|
||||
}
|
||||
case ELF::R_390_PC16: {
|
||||
int64_t Delta = (Value + Addend) - Section.getLoadAddressWithOffset(Offset);
|
||||
assert(int16_t(Delta) == Delta && "R_390_PC16 overflow");
|
||||
writeInt16BE(LocalAddress, Delta);
|
||||
break;
|
||||
}
|
||||
case ELF::R_390_PC32: {
|
||||
int64_t Delta = (Value + Addend) - Section.getLoadAddressWithOffset(Offset);
|
||||
assert(int32_t(Delta) == Delta && "R_390_PC32 overflow");
|
||||
writeInt32BE(LocalAddress, Delta);
|
||||
break;
|
||||
}
|
||||
case ELF::R_390_64:
|
||||
writeInt64BE(LocalAddress, Value + Addend);
|
||||
break;
|
||||
case ELF::R_390_PC64: {
|
||||
int64_t Delta = (Value + Addend) - Section.getLoadAddressWithOffset(Offset);
|
||||
writeInt64BE(LocalAddress, Delta);
|
||||
break;
|
||||
}
|
||||
case ELF::R_390_8:
|
||||
*LocalAddress = (uint8_t)(Value + Addend);
|
||||
break;
|
||||
case ELF::R_390_16:
|
||||
writeInt16BE(LocalAddress, Value + Addend);
|
||||
break;
|
||||
case ELF::R_390_32:
|
||||
writeInt32BE(LocalAddress, Value + Addend);
|
||||
break;
|
||||
case ELF::R_390_64:
|
||||
writeInt64BE(LocalAddress, Value + Addend);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user