diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-03 16:43:42 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-03 16:43:42 +0100 |
| commit | f4829a8ce42b1abbcc8621802d6c6fad3a56cd5d (patch) | |
| tree | 211276c3587721126ded00be46487bf23b605591 /src/include/library.h | |
| parent | f73fbd3cee38b4c0086c934d73972375c9c8c7d6 (diff) | |
| download | box64-f4829a8ce42b1abbcc8621802d6c6fad3a56cd5d.tar.gz box64-f4829a8ce42b1abbcc8621802d6c6fad3a56cd5d.zip | |
More infrastructure added to elf and x64 emu
Diffstat (limited to 'src/include/library.h')
| -rwxr-xr-x | src/include/library.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/include/library.h b/src/include/library.h new file mode 100755 index 00000000..d33b1126 --- /dev/null +++ b/src/include/library.h @@ -0,0 +1,36 @@ +#ifndef __LIBRARY_H_ +#define __LIBRARY_H_ +#include <stdint.h> + +typedef struct library_s library_t; +typedef struct lib_s lib_t; +typedef struct kh_symbolmap_s kh_symbolmap_t; +typedef struct box64context_s box64context_t; +typedef struct x64emu_s x64emu_t; +typedef struct needed_libs_s needed_libs_t; + +library_t *NewLibrary(const char* path, box64context_t* box86); +int AddSymbolsLibrary(lib_t* maplib, library_t* lib, x64emu_t* emu); +int FinalizeLibrary(library_t* lib, lib_t* local_maplib, x64emu_t* emu); +int ReloadLibrary(library_t* lib, x64emu_t* emu); +void InactiveLibrary(library_t* lib); +void Free1Library(library_t **lib); + +char* GetNameLib(library_t *lib); +int IsSameLib(library_t* lib, const char* path); // check if lib is same (path -> name) +int GetLibSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end); +int GetLibNoWeakSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end); +int GetLibLocalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end); +void fillGLProcWrapper(box64context_t* context); +void freeGLProcWrapper(box64context_t* context); +void fillALProcWrapper(box64context_t* context); +void freeALProcWrapper(box64context_t* context); +needed_libs_t* GetNeededLibs(library_t* lib); +int GetNeededLibN(library_t* lib); +library_t* GetNeededLib(library_t* lib, int idx); +lib_t* GetMaplib(library_t* lib); + +int GetElfIndex(library_t* lib); // -1 if no elf (i.e. native) +void* GetHandle(library_t* lib); // NULL if not native + +#endif //__LIBRARY_H_ \ No newline at end of file |