mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
[MCJIT] Replace memcpy with readBytesUnaligned in RuntimeDyldMachOI386.
This should fix the failures of the MachO_i386_DynNoPIC_relocations.s test case on MIPS hosts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219543 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
add74ff5ff
commit
458b495075
@ -142,8 +142,7 @@ private:
|
|||||||
RelI->getOffset(Offset);
|
RelI->getOffset(Offset);
|
||||||
uint8_t *LocalAddress = Section.Address + Offset;
|
uint8_t *LocalAddress = Section.Address + Offset;
|
||||||
unsigned NumBytes = 1 << Size;
|
unsigned NumBytes = 1 << Size;
|
||||||
int64_t Addend = 0;
|
uint64_t Addend = readBytesUnaligned(LocalAddress, NumBytes);
|
||||||
memcpy(&Addend, LocalAddress, NumBytes);
|
|
||||||
|
|
||||||
++RelI;
|
++RelI;
|
||||||
MachO::any_relocation_info RE2 =
|
MachO::any_relocation_info RE2 =
|
||||||
@ -202,8 +201,7 @@ private:
|
|||||||
RelI->getOffset(Offset);
|
RelI->getOffset(Offset);
|
||||||
uint8_t *LocalAddress = Section.Address + Offset;
|
uint8_t *LocalAddress = Section.Address + Offset;
|
||||||
unsigned NumBytes = 1 << Size;
|
unsigned NumBytes = 1 << Size;
|
||||||
int64_t Addend = 0;
|
int64_t Addend = readBytesUnaligned(LocalAddress, NumBytes);
|
||||||
memcpy(&Addend, LocalAddress, NumBytes);
|
|
||||||
|
|
||||||
unsigned SymbolBaseAddr = MachO->getScatteredRelocationValue(RE);
|
unsigned SymbolBaseAddr = MachO->getScatteredRelocationValue(RE);
|
||||||
section_iterator TargetSI = getSectionByAddress(*MachO, SymbolBaseAddr);
|
section_iterator TargetSI = getSectionByAddress(*MachO, SymbolBaseAddr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user