From 4ee7d2d54a9af4692e15b00e3fbf561673b7869d Mon Sep 17 00:00:00 2001 From: DH Date: Thu, 29 Jun 2023 13:30:24 +0300 Subject: [PATCH] [rpcsx-os/linker] Fix ehframe setup --- rpcsx-os/linker.cpp | 8 ++++---- rpcsx-os/ops.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcsx-os/linker.cpp b/rpcsx-os/linker.cpp index 28cd8274b..912513a2d 100644 --- a/rpcsx-os/linker.cpp +++ b/rpcsx-os/linker.cpp @@ -403,8 +403,8 @@ Ref rx::linker::loadModule(std::span 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 rx::linker::loadModule(std::span 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) { diff --git a/rpcsx-os/ops.cpp b/rpcsx-os/ops.cpp index 7b34ddf1d..1cb7331c1 100644 --- a/rpcsx-os/ops.cpp +++ b/rpcsx-os/ops.cpp @@ -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 {};