mirror of
https://github.com/SysRay/psOff_public.git
synced 2024-11-27 08:30:25 +00:00
runtime| fix modulinfo
This commit is contained in:
parent
f5ad20ae72
commit
dd2d60d2be
@ -21,8 +21,8 @@ struct alignas(32) EntryParams {
|
||||
};
|
||||
|
||||
struct ModulInfo {
|
||||
uint64_t address;
|
||||
uint64_t size;
|
||||
uint64_t seg0Addr;
|
||||
uint64_t seg0Size;
|
||||
uint64_t procParamAddr;
|
||||
};
|
||||
|
||||
|
@ -302,7 +302,7 @@ class RuntimeLinker: public IRuntimeLinker {
|
||||
|
||||
ModulInfo mainModuleInfo() const final {
|
||||
auto prog = accessMainProg();
|
||||
return {prog->baseVaddr, prog->baseSize, prog->procParamVaddr};
|
||||
return {prog->moduleInfoEx.segments[0].address, prog->moduleInfoEx.segments[0].size, prog->procParamVaddr};
|
||||
}
|
||||
|
||||
SceKernelModuleInfoEx const* getModuleInfoEx(uint64_t vaddr) const final {
|
||||
|
@ -100,10 +100,17 @@ EXPORT SYSV_ABI void* _sceModuleParam() {
|
||||
return reinterpret_cast<void*>(procParamVaddr);
|
||||
}
|
||||
|
||||
EXPORT SYSV_ABI int sceKernelInternalMemoryGetModuleSegmentInfo(ModulInfo* info) {
|
||||
struct ModuleSegmentInfo {
|
||||
uint64_t addr;
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
EXPORT SYSV_ABI int sceKernelInternalMemoryGetModuleSegmentInfo(ModuleSegmentInfo* info) {
|
||||
if (info == nullptr) return getErr(ErrCode::_EFAULT);
|
||||
|
||||
*info = accessRuntimeLinker().mainModuleInfo();
|
||||
auto mainInfo = accessRuntimeLinker().mainModuleInfo();
|
||||
info->addr = mainInfo.seg0Addr;
|
||||
info->size = mainInfo.seg0Size;
|
||||
return Ok;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user