mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-17 17:05:02 +00:00
started work on elf class
This commit is contained in:
parent
1290756b3d
commit
9c3e9b3bef
7 changed files with 243 additions and 28 deletions
19
emulator/Loader/Elf.cpp
Normal file
19
emulator/Loader/Elf.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "Elf.h"
|
||||
|
||||
|
||||
static self_header* load_self(FsFile& f)
|
||||
{
|
||||
//read self header
|
||||
auto* self = new self_header;
|
||||
f.Read(self, sizeof(self_header));
|
||||
return self;
|
||||
}
|
||||
|
||||
void Elf::Open(const std::string& file_name)
|
||||
{
|
||||
m_f = new FsFile;
|
||||
m_f->Open(file_name, fsOpenMode::fsRead);
|
||||
|
||||
m_self = load_self(*m_f);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue