mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-21 02:45:00 +00:00
initial dynamic loader , parsing DT_HASH atm
This commit is contained in:
parent
e02c0a9398
commit
672e2b2d77
3 changed files with 41 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
#include "../../Loader/Elf.h"
|
||||
#include <vector>
|
||||
|
||||
struct DynamicModuleInfo;
|
||||
|
||||
/*this struct keeps neccesary info about loaded modules.Main executeable is included too as well*/
|
||||
struct Module
|
||||
{
|
||||
|
@ -11,6 +13,12 @@ struct Module
|
|||
|
||||
void* m_dynamic = nullptr;
|
||||
void* m_dynamic_data = nullptr;
|
||||
DynamicModuleInfo* dynamic_info = nullptr;
|
||||
};
|
||||
|
||||
struct DynamicModuleInfo
|
||||
{
|
||||
void* hash_table = nullptr;
|
||||
};
|
||||
|
||||
class Linker
|
||||
|
@ -22,6 +30,7 @@ public:
|
|||
Module* LoadModule(const std::string& elf_name);
|
||||
Module* FindModule(/*u32 id*/);
|
||||
void LoadModuleToMemory(Module* m);
|
||||
void LoadDynamicInfo(Module* program);
|
||||
|
||||
private:
|
||||
std::vector<Module*> m_modules;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue