mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-18 14:41:11 +01:00
[rpcsx-os/linker] Fix ehframe setup
This commit is contained in:
parent
f6b73f6f29
commit
4ee7d2d54a
|
|
@ -403,8 +403,8 @@ Ref<orbis::Module> rx::linker::loadModule(std::span<std::byte> image, orbis::Pro
|
|||
}
|
||||
|
||||
if (gnuEhFramePhdrIndex >= 0 && phdrs[gnuEhFramePhdrIndex].p_vaddr > 0) {
|
||||
result->ehFrame = imageBase + phdrs[gnuEhFramePhdrIndex].p_vaddr;
|
||||
result->ehFrameSize = phdrs[gnuEhFramePhdrIndex].p_memsz;
|
||||
result->ehFrameHdr = imageBase + phdrs[gnuEhFramePhdrIndex].p_vaddr;
|
||||
result->ehFrameHdrSize = phdrs[gnuEhFramePhdrIndex].p_memsz;
|
||||
|
||||
struct GnuExceptionInfo {
|
||||
uint8_t version;
|
||||
|
|
@ -458,8 +458,8 @@ Ref<orbis::Module> rx::linker::loadModule(std::span<std::byte> image, orbis::Pro
|
|||
dataBufferIt += size;
|
||||
}
|
||||
|
||||
result->ehFrameHdr = imageBase + phdrs[gnuEhFramePhdrIndex].p_vaddr + (dataBuffer - image.data() - phdrs[gnuEhFramePhdrIndex].p_offset);
|
||||
result->ehFrameHdrSize = dataBufferIt - dataBuffer;
|
||||
result->ehFrame = imageBase + phdrs[gnuEhFramePhdrIndex].p_vaddr + (dataBuffer - image.data() - phdrs[gnuEhFramePhdrIndex].p_offset);
|
||||
result->ehFrameSize = dataBufferIt - dataBuffer;
|
||||
}
|
||||
|
||||
for (auto &phdr : phdrs) {
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ SysResult processNeeded(Thread *thread) {
|
|||
|
||||
SysResult registerEhFrames(Thread *thread) {
|
||||
for (auto [id, module] : thread->tproc->modulesMap) {
|
||||
__register_frame(module->ehFrameHdr);
|
||||
__register_frame(module->ehFrame);
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue