diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-10-31 15:38:31 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-10-31 15:38:31 +0100 |
| commit | 362a3fde10a3bb2738fcf30ae2e2eaf4a53df042 (patch) | |
| tree | ff6233f6cba44c0326cbe366d79fb7a46e1b8d60 /src/include/elfloader.h | |
| parent | 5c13f8f10ac82ca642a6c930585989cc0d75a664 (diff) | |
| download | box64-362a3fde10a3bb2738fcf30ae2e2eaf4a53df042.tar.gz box64-362a3fde10a3bb2738fcf30ae2e2eaf4a53df042.zip | |
[ELFLOADER] Changed how memory is managed in elfloader
Diffstat (limited to 'src/include/elfloader.h')
| -rw-r--r-- | src/include/elfloader.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/elfloader.h b/src/include/elfloader.h index d9d7f152..bc09ad31 100644 --- a/src/include/elfloader.h +++ b/src/include/elfloader.h @@ -14,6 +14,7 @@ typedef struct kh_defaultversion_s kh_defaultversion_t; typedef struct dynablock_s dynablock_t; #endif +// Open an elfheader. Transfert control of f to elfheader also! elfheader_t* LoadAndCheckElfHeader(FILE* f, const char* name, int exec); // exec : 0 = lib, 1 = exec void FreeElfHeader(elfheader_t** head); const char* ElfName(elfheader_t* head); @@ -22,11 +23,9 @@ void ElfAttachLib(elfheader_t* head, library_t* lib); // return 0 if OK int CalcLoadAddr(elfheader_t* head); -int AllocElfMemory(box64context_t* context, elfheader_t* head, int mainbin); +int AllocLoadElfMemory(box64context_t* context, elfheader_t* head, int mainbin); void FreeElfMemory(elfheader_t* head); -int LoadElfMemory(FILE* f, box64context_t* context, elfheader_t* head); int isElfHasNeededVer(elfheader_t* head, const char* libname, elfheader_t* verneeded); -int ReloadElfMemory(FILE* f, box64context_t* context, elfheader_t* head); int RelocateElf(lib_t *maplib, lib_t* local_maplib, int bindnow, elfheader_t* head); int RelocateElfPlt(lib_t *maplib, lib_t* local_maplib, int bindnow, elfheader_t* head); void CalcStack(elfheader_t* h, uint64_t* stacksz, size_t* stackalign); |