sample hle function loading (libc)

This commit is contained in:
georgemoralis 2023-06-28 20:15:19 +03:00
parent e0cee2d7fd
commit 79a6464c58
7 changed files with 45 additions and 3 deletions

25
src/Core/PS4/HLE/LibC.cpp Normal file
View file

@ -0,0 +1,25 @@
#include "LibC.h"
#include "../Loader/Elf.h"
namespace HLE::Libs::LibC {
static void init_env() //every game/demo should probably
{
__debugbreak();//if we reach here it will be a great progress :D
}
void LibC_RegisterFunc(SymbolsResolver* sym)
{
//TODO this will be convert to macro probably once we decide how will it work and what's the best
SymbolRes sr {};
sr.name = "bzQExy189ZI";
sr.library = "libc";
sr.library_version = 1;
sr.module = "libc";
sr.module_version_major = 1;
sr.module_version_minor = 1;
sr.type = STT_FUN;
auto func = reinterpret_cast<u64>(init_env);
sym->AddSymbol(sr, func);
}
};