@@ -51,7 +51,7 @@ static PS4_SYSV_ABI void* RunMainEntry [[noreturn]] (EntryParams* params) {
5151}
5252#endif
5353
54- OrbisProcParam Linker::s_proc_param {};
54+ s32 Linker::s_compiled_sdk_version {};
5555
5656Linker::Linker () : memory{Memory::Instance ()} {}
5757
@@ -182,7 +182,7 @@ s32 Linker::LoadAndStartModule(const std::filesystem::path& path, u64 args, cons
182182 }
183183
184184 // Retrieve and verify proc param according to libkernel.
185- auto * param = GetProcParam ();
185+ auto * param = module -> GetProcParam <OrbisProcParam*> ();
186186 ASSERT_MSG (!param || param->size >= 0x18 , " Invalid module param size: {}" , param->size );
187187 s32 ret = module ->Start (args, argp, param);
188188 if (pRes) {
@@ -450,7 +450,7 @@ void Linker::DebugDump() {
450450 }
451451}
452452
453- void Linker::InitializeProcParams (const std::filesystem::path& file) {
453+ void Linker::ReadCompiledSdkVersion (const std::filesystem::path& file) {
454454 Core::Loader::Elf elf;
455455 elf.Open (file);
456456 if (!elf.IsElfFile ()) {
@@ -462,7 +462,9 @@ void Linker::InitializeProcParams(const std::filesystem::path& file) {
462462
463463 if (it != elf_pheader.end ()) {
464464 // Initialize Proc Param in Linker
465- elf.LoadSegment (u64 (Core::Linker::GetProcParam ()), it->p_offset , it->p_filesz );
465+ Core::OrbisProcParam param{};
466+ elf.LoadSegment (u64 (¶m), it->p_offset , it->p_filesz );
467+ s_compiled_sdk_version = param.sdk_version ;
466468 }
467469}
468470
0 commit comments