diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-10-15 20:52:16 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-10-15 20:52:16 +0200 |
| commit | d0045b158b30434c2077693d970e2167a1089e84 (patch) | |
| tree | b2951427e4870055cf79f6388d9755a227e843f7 /src/include/elfloader.h | |
| parent | 1d4a9e8863d7e32f0bb1472674a94f05df1409b5 (diff) | |
| download | box64-d0045b158b30434c2077693d970e2167a1089e84.tar.gz box64-d0045b158b30434c2077693d970e2167a1089e84.zip | |
Some Segments/Selector handling refactoring , removing some pthread_getspecific use
Diffstat (limited to 'src/include/elfloader.h')
| -rw-r--r-- | src/include/elfloader.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/include/elfloader.h b/src/include/elfloader.h index 56a0571e..c2cc529d 100644 --- a/src/include/elfloader.h +++ b/src/include/elfloader.h @@ -51,10 +51,11 @@ void CalcStack(elfheader_t* h, uint64_t* stacksz, size_t* stackalign); uintptr_t GetEntryPoint(lib_t* maplib, elfheader_t* h); uintptr_t GetLastByte(elfheader_t* h); void AddSymbols(lib_t *maplib, elfheader_t* h); +int NeededLibs(elfheader_t* h); int LoadNeededLibs(elfheader_t* h, lib_t *maplib, int local, int bindnow, int deepbind, box64context_t *box64, x64emu_t* emu); uintptr_t GetElfInit(elfheader_t* h); uintptr_t GetElfFini(elfheader_t* h); -void RefreshElfTLS(elfheader_t* h); +void RefreshElfTLS(elfheader_t* h, x64emu_t* emu); void RunElfInit(elfheader_t* h, x64emu_t *emu); void RunElfFini(elfheader_t* h, x64emu_t *emu); void RunDeferredElfInit(x64emu_t *emu); @@ -67,8 +68,8 @@ elfheader_t* FindElfAddress(box64context_t *context, uintptr_t addr); const char* FindNearestSymbolName(elfheader_t* h, void* p, uintptr_t* start, uint64_t* sz); int32_t GetTLSBase(elfheader_t* h); uint32_t GetTLSSize(elfheader_t* h); -void* GetTLSPointer(box64context_t* context, elfheader_t* h); -void* GetDTatOffset(box64context_t* context, unsigned long int index, unsigned long int offset); +void* GetTLSPointer(x64emu_t* emu, elfheader_t* h); +void* GetDTatOffset(x64emu_t* emu, unsigned long int index, unsigned long int offset); void ResetSpecialCaseMainElf(elfheader_t* h); void CreateMemorymapFile(box64context_t* context, int fd); void* GetDynamicSection(elfheader_t* h); |