mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Better const handling for RuntimeDyld and MCJIT.
mapSectionAddress() wasn't consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0067567927
commit
e940c1bb6c
@ -244,7 +244,7 @@ public:
|
|||||||
/// Map the address of a JIT section as returned from the memory manager
|
/// Map the address of a JIT section as returned from the memory manager
|
||||||
/// to the address in the target process as the running code will see it.
|
/// to the address in the target process as the running code will see it.
|
||||||
/// This is the address which will be used for relocation resolution.
|
/// This is the address which will be used for relocation resolution.
|
||||||
virtual void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress) {
|
virtual void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress) {
|
||||||
llvm_unreachable("Re-mapping of section addresses not supported with this "
|
llvm_unreachable("Re-mapping of section addresses not supported with this "
|
||||||
"EE!");
|
"EE!");
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
/// Map the address of a JIT section as returned from the memory manager
|
/// Map the address of a JIT section as returned from the memory manager
|
||||||
/// to the address in the target process as the running code will see it.
|
/// to the address in the target process as the running code will see it.
|
||||||
/// This is the address which will be used for relocation resolution.
|
/// This is the address which will be used for relocation resolution.
|
||||||
void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress);
|
void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress);
|
||||||
|
|
||||||
StringRef getErrorString();
|
StringRef getErrorString();
|
||||||
};
|
};
|
||||||
|
@ -71,7 +71,8 @@ public:
|
|||||||
/// Map the address of a JIT section as returned from the memory manager
|
/// Map the address of a JIT section as returned from the memory manager
|
||||||
/// to the address in the target process as the running code will see it.
|
/// to the address in the target process as the running code will see it.
|
||||||
/// This is the address which will be used for relocation resolution.
|
/// This is the address which will be used for relocation resolution.
|
||||||
virtual void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress) {
|
virtual void mapSectionAddress(const void *LocalAddress,
|
||||||
|
uint64_t TargetAddress) {
|
||||||
Dyld.mapSectionAddress(LocalAddress, TargetAddress);
|
Dyld.mapSectionAddress(LocalAddress, TargetAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void RuntimeDyldImpl::resolveRelocations() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuntimeDyldImpl::mapSectionAddress(void *LocalAddress,
|
void RuntimeDyldImpl::mapSectionAddress(const void *LocalAddress,
|
||||||
uint64_t TargetAddress) {
|
uint64_t TargetAddress) {
|
||||||
for (unsigned i = 0, e = Sections.size(); i != e; ++i) {
|
for (unsigned i = 0, e = Sections.size(); i != e; ++i) {
|
||||||
if (Sections[i].Address == LocalAddress) {
|
if (Sections[i].Address == LocalAddress) {
|
||||||
@ -492,7 +492,7 @@ void RuntimeDyld::reassignSectionAddress(unsigned SectionID,
|
|||||||
Dyld->reassignSectionAddress(SectionID, Addr);
|
Dyld->reassignSectionAddress(SectionID, Addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuntimeDyld::mapSectionAddress(void *LocalAddress,
|
void RuntimeDyld::mapSectionAddress(const void *LocalAddress,
|
||||||
uint64_t TargetAddress) {
|
uint64_t TargetAddress) {
|
||||||
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
|
Dyld->mapSectionAddress(LocalAddress, TargetAddress);
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ public:
|
|||||||
|
|
||||||
void reassignSectionAddress(unsigned SectionID, uint64_t Addr);
|
void reassignSectionAddress(unsigned SectionID, uint64_t Addr);
|
||||||
|
|
||||||
void mapSectionAddress(void *LocalAddress, uint64_t TargetAddress);
|
void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress);
|
||||||
|
|
||||||
// Is the linker in an error state?
|
// Is the linker in an error state?
|
||||||
bool hasError() { return HasError; }
|
bool hasError() { return HasError; }
|
||||||
|
Loading…
Reference in New Issue
Block a user