From 186fa35f1330efd2efba979b1523d95f0fbcba7d Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Sun, 31 Mar 2024 17:14:21 +0300 Subject: [PATCH] added ps4_ prefix to libkernel to make sure it deosn't conflict with linux function names --- src/core/libraries/libkernel.cpp | 11 ++++++----- src/core/libraries/libkernel.h | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/core/libraries/libkernel.cpp b/src/core/libraries/libkernel.cpp index c2e68241..c689964f 100644 --- a/src/core/libraries/libkernel.cpp +++ b/src/core/libraries/libkernel.cpp @@ -9,6 +9,7 @@ namespace Libraries::Kernel { +/* int PS4_SYSV_ABI __elf_phdr_match_addr() { LOG_ERROR(Kernel, "(STUBBED) called"); return ORBIS_OK; @@ -458,8 +459,8 @@ int PS4_SYSV_ABI _wait4() { LOG_ERROR(Kernel, "(STUBBED) called"); return ORBIS_OK; } - -s64 PS4_SYSV_ABI _write(int d, const void* buf, std::size_t nbytes) { +*/ +s64 PS4_SYSV_ABI ps4__write(int d, const void* buf, std::size_t nbytes) { if (d <= 2) { // stdin,stdout,stderr LOG_INFO(Kernel, "{}", (const char*)buf); return nbytes; @@ -468,7 +469,7 @@ s64 PS4_SYSV_ABI _write(int d, const void* buf, std::size_t nbytes) { UNREACHABLE(); // normal write , is it a posix call?? return ORBIS_OK; } - +/* int PS4_SYSV_ABI _writev() { LOG_ERROR(Kernel, "(STUBBED) called"); return ORBIS_OK; @@ -5258,7 +5259,7 @@ int PS4_SYSV_ABI sceCoredumpDebugTriggerCoredump() { LOG_ERROR(Kernel, "(STUBBED) called"); return ORBIS_OK; } - +*/ void Registerlibkernel(Core::Loader::SymbolsResolver* sym) { /* LIB_FUNCTION("Fjc4-n1+y2g", "libkernel", 1, "libkernel", 1, 1, __elf_phdr_match_addr); LIB_FUNCTION("9BcDykPmo1I", "libkernel", 1, "libkernel", 1, 1, __error); @@ -5355,7 +5356,7 @@ void Registerlibkernel(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("9zpLsLESzTs", "libkernel", 1, "libkernel", 1, 1, _sigsuspend); LIB_FUNCTION("04AjkP0jO9U", "libkernel", 1, "libkernel", 1, 1, _umtx_op); LIB_FUNCTION("RFlsu7nfopM", "libkernel", 1, "libkernel", 1, 1, _wait4);*/ - LIB_FUNCTION("FxVZqBAA7ks", "libkernel", 1, "libkernel", 1, 1, _write); + LIB_FUNCTION("FxVZqBAA7ks", "libkernel", 1, "libkernel", 1, 1, ps4__write); /* LIB_FUNCTION("YSHRBRLn2pI", "libkernel", 1, "libkernel", 1, 1, _writev); LIB_FUNCTION("3e+4Iv7IJ8U", "libkernel", 1, "libkernel", 1, 1, accept); LIB_FUNCTION("8vE6Z6VEYyk", "libkernel", 1, "libkernel", 1, 1, access); diff --git a/src/core/libraries/libkernel.h b/src/core/libraries/libkernel.h index 0609a108..72b6a804 100644 --- a/src/core/libraries/libkernel.h +++ b/src/core/libraries/libkernel.h @@ -6,7 +6,7 @@ #include "library_common.h" namespace Libraries::Kernel { - +/* int PS4_SYSV_ABI __elf_phdr_match_addr(); int PS4_SYSV_ABI __error(); int PS4_SYSV_ABI __freeze(); @@ -96,9 +96,9 @@ int PS4_SYSV_ABI _sigintr(); int PS4_SYSV_ABI _sigprocmask(); int PS4_SYSV_ABI _sigsuspend(); int PS4_SYSV_ABI _umtx_op(); -int PS4_SYSV_ABI _wait4(); -s64 PS4_SYSV_ABI _write(int d, const void* buf, std::size_t nbytes); -int PS4_SYSV_ABI _writev(); +int PS4_SYSV_ABI _wait4();*/ +s64 PS4_SYSV_ABI ps4__write(int d, const void* buf, std::size_t nbytes); +/* int PS4_SYSV_ABI _writev(); int PS4_SYSV_ABI accept(); int PS4_SYSV_ABI access(); int PS4_SYSV_ABI amd64_set_fsbase(); @@ -1055,7 +1055,7 @@ int PS4_SYSV_ABI sceCoredumpUnregisterCoredumpHandler(); int PS4_SYSV_ABI sceCoredumpWriteUserData(); int PS4_SYSV_ABI Func_9889095293F9BCAA(); int PS4_SYSV_ABI sceCoredumpDebugForceCoredumpOnAppClose(); -int PS4_SYSV_ABI sceCoredumpDebugTriggerCoredump(); +int PS4_SYSV_ABI sceCoredumpDebugTriggerCoredump();*/ void Registerlibkernel(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::Kernel \ No newline at end of file