2023-06-26 17:45:16 +00:00
|
|
|
#pragma once
|
|
|
|
#include "../Loader/SymbolsResolver.h"
|
|
|
|
|
2023-07-13 09:56:36 +00:00
|
|
|
|
|
|
|
#define LIB_FUNCTION(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, function) \
|
|
|
|
{\
|
|
|
|
SymbolRes sr{}; \
|
|
|
|
sr.name = nid; \
|
|
|
|
sr.library = lib; \
|
|
|
|
sr.library_version = libversion;\
|
|
|
|
sr.module = mod;\
|
|
|
|
sr.module_version_major = moduleVersionMajor;\
|
|
|
|
sr.module_version_minor = moduleVersionMinor;\
|
|
|
|
sr.type = STT_FUN;\
|
|
|
|
auto func = reinterpret_cast<u64>(function);\
|
|
|
|
sym->AddSymbol(sr, func);\
|
|
|
|
}
|
|
|
|
|
2023-07-17 10:53:27 +00:00
|
|
|
#define LIB_OBJ(nid, lib, libversion, mod, moduleVersionMajor, moduleVersionMinor, function) \
|
|
|
|
{ \
|
|
|
|
SymbolRes sr{}; \
|
|
|
|
sr.name = nid; \
|
|
|
|
sr.library = lib; \
|
|
|
|
sr.library_version = libversion; \
|
|
|
|
sr.module = mod; \
|
|
|
|
sr.module_version_major = moduleVersionMajor; \
|
|
|
|
sr.module_version_minor = moduleVersionMinor; \
|
|
|
|
sr.type = STT_OBJECT; \
|
|
|
|
auto func = reinterpret_cast<u64>(function); \
|
|
|
|
sym->AddSymbol(sr, func); \
|
|
|
|
}
|
2023-07-27 14:56:57 +00:00
|
|
|
|
|
|
|
#define PRINT_FUNCTION_NAME() \
|
|
|
|
{ \
|
|
|
|
LOG_INFO_IF(true, "{}()\n", __func__); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define PRINT_DUMMY_FUNCTION_NAME() \
|
|
|
|
{ LOG_INFO_IF(true, "dummy {}()\n", __func__); }
|
|
|
|
|
2023-06-26 17:45:16 +00:00
|
|
|
namespace HLE::Libs {
|
|
|
|
void Init_HLE_Libs(SymbolsResolver* sym);
|
|
|
|
}
|