about summary refs log tree commit diff stats
path: root/src/include/library.h
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-10-22 20:57:31 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-10-22 20:57:31 +0200
commit58cdb1bda2f2dd6a0bc5ea42e99b279fc687c06b (patch)
tree099bf5dc7d814272d6842df6656c2e672d5a1143 /src/include/library.h
parenta530f565110875c431ff9600ee9da4a640599ec7 (diff)
downloadbox64-58cdb1bda2f2dd6a0bc5ea42e99b279fc687c06b.tar.gz
box64-58cdb1bda2f2dd6a0bc5ea42e99b279fc687c06b.zip
Refactored, again, elfloader symbol fetching (ported from box86)
Diffstat (limited to 'src/include/library.h')
-rwxr-xr-xsrc/include/library.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/library.h b/src/include/library.h
index 1bd9be3a..b62e122d 100755
--- a/src/include/library.h
+++ b/src/include/library.h
@@ -9,8 +9,9 @@ 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;
+typedef struct elfheader_s     elfheader_t;
 
-#define LIB_NATIVE      0
+#define LIB_WRAPPED     0
 #define LIB_EMULATED    1
 #define LIB_UNNKNOW     -1
 
@@ -23,9 +24,9 @@ void Free1Library(library_t **lib, x64emu_t* emu);
 
 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 version, const char* vername, int local);
-int GetLibNoWeakSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, int version, const char* vername, int local);
-int GetLibLocalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, int version, const char* vername, int local);
+int GetLibGlobalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, int* weak, int version, const char* vername, int local);
+int GetLibWeakSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, int* weak, int version, const char* vername, int local);
+int GetLibLocalSymbolStartEnd(library_t* lib, const char* name, uintptr_t* start, uintptr_t* end, int* weak, int version, const char* vername, int local);
 void fillGLProcWrapper(box64context_t* context);
 void freeGLProcWrapper(box64context_t* context);
 void fillALProcWrapper(box64context_t* context);
@@ -35,7 +36,8 @@ 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
+int GetElfIndex(library_t* lib);    // -1 if no elf (i.e. wrapped)
+elfheader_t* GetElf(library_t* lib);    // NULL if no elf (i.e. wrapped)
+void* GetHandle(library_t* lib);    // NULL if not wrapped
 
 #endif //__LIBRARY_H_