about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-04-09 18:19:42 +0200
committerGitHub <noreply@github.com>2021-04-09 18:19:42 +0200
commit0a37f1cc30f9d31b1cc4b3cae353d134a66a1ffc (patch)
treeacea39fed7c69642c71a6ba0db7928d4c31044f5 /src/include
parent0e0f1e203747a3b7a625d1d57d47036c796bc7f7 (diff)
parent70018a774bf7411ef7550aa4fb3eb153d17dcfd6 (diff)
downloadbox64-0a37f1cc30f9d31b1cc4b3cae353d134a66a1ffc.tar.gz
box64-0a37f1cc30f9d31b1cc4b3cae353d134a66a1ffc.zip
Merge pull request #3 from rajdakin/exitFix
box64 exit fix
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/box64context.h8
-rwxr-xr-xsrc/include/elfloader.h4
-rwxr-xr-xsrc/include/librarian.h4
-rwxr-xr-xsrc/include/library.h4
-rwxr-xr-xsrc/include/pathcoll.h2
5 files changed, 12 insertions, 10 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h
index c52ac53b..ffcacc36 100755
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -50,6 +50,8 @@ typedef struct needed_libs_s {
 
 void add_neededlib(needed_libs_t* needed, library_t* lib);
 void free_neededlib(needed_libs_t* needed);
+void add_dependedlib(needed_libs_t* depended, library_t* lib);
+void free_dependedlib(needed_libs_t* depended);
 
 typedef struct base_segment_s {
     uintptr_t       base;
@@ -70,7 +72,7 @@ typedef struct box64context_s {
     uint32_t            sel_serial;     // will be increment each time selectors changes
 
     zydis_t             *zydis;         // dlopen the zydis dissasembler
-    void*               box64lib;       // dlopen on box86 itself
+    void*               box64lib;       // dlopen on box64 itself
 
     int                 argc;
     char**              argv;
@@ -79,7 +81,7 @@ typedef struct box64context_s {
     char**              envv;
 
     char*               fullpath;
-    char*               box64path;      // path of current box86 executable
+    char*               box64path;      // path of current box64 executable
 
     uint32_t            stacksz;
     int                 stackalign;
@@ -198,4 +200,4 @@ int AddTLSPartition(box64context_t* context, int tlssize);
 void thread_set_emu(x64emu_t* emu);
 x64emu_t* thread_get_emu();
 
-#endif //__BOX64CONTEXT_H_
\ No newline at end of file
+#endif //__BOX64CONTEXT_H_
diff --git a/src/include/elfloader.h b/src/include/elfloader.h
index 241c25e7..a46d9b05 100755
--- a/src/include/elfloader.h
+++ b/src/include/elfloader.h
@@ -30,7 +30,7 @@ void CalcStack(elfheader_t* h, uint32_t* stacksz, int* stackalign);
 uintptr_t GetEntryPoint(lib_t* maplib, elfheader_t* h);
 uintptr_t GetLastByte(elfheader_t* h);
 void AddSymbols(lib_t *maplib, kh_mapsymbols_t* mapsymbols, kh_mapsymbols_t* weaksymbols, kh_mapsymbols_t* localsymbols, elfheader_t* h);
-int LoadNeededLibs(elfheader_t* h, lib_t *maplib, needed_libs_t* neededlibs, int local, box64context_t *box86, x64emu_t* emu);
+int LoadNeededLibs(elfheader_t* h, lib_t *maplib, needed_libs_t* neededlibs, library_t *deplib, int local, box64context_t *box64, x64emu_t* emu);
 uintptr_t GetElfInit(elfheader_t* h);
 uintptr_t GetElfFini(elfheader_t* h);
 void RunElfInit(elfheader_t* h, x64emu_t *emu);
@@ -56,4 +56,4 @@ void CreateMemorymapFile(box64context_t* context, int fd);
 int ElfCheckIfUseTCMallocMinimal(elfheader_t* h);   // return 1 if tcmalloc is used
 
 
-#endif //__ELF_LOADER_H_
\ No newline at end of file
+#endif //__ELF_LOADER_H_
diff --git a/src/include/librarian.h b/src/include/librarian.h
index f63b500f..6e69349b 100755
--- a/src/include/librarian.h
+++ b/src/include/librarian.h
@@ -24,7 +24,7 @@ kh_mapsymbols_t* GetMapSymbol(lib_t* maplib);
 kh_mapsymbols_t* GetWeakSymbol(lib_t* maplib);
 kh_mapsymbols_t* GetLocalSymbol(lib_t* maplib);
 kh_mapsymbols_t* GetGlobalData(lib_t* maplib);
-int AddNeededLib(lib_t* maplib, needed_libs_t* neededlibs, int local, const char* path, box64context_t* box86, x64emu_t* emu); // 0=success, 1=error
+int AddNeededLib(lib_t* maplib, needed_libs_t* neededlibs, library_t *deplib, int local, const char* path, box64context_t* box64, x64emu_t* emu); // 0=success, 1=error
 library_t* GetLibMapLib(lib_t* maplib, const char* name);
 library_t* GetLibInternal(const char* name);
 uintptr_t FindGlobalSymbol(lib_t *maplib, const char* name);
@@ -48,4 +48,4 @@ const char* FindSymbolName(lib_t *maplib, void* p, void** start, uint32_t* sz, c
 void AddOffsetSymbol(lib_t *maplib, void* offs, const char* name);
 const char* GetNameOffset(lib_t *maplib, void* offs);
 
-#endif //__LIBRARIAN_H_
\ No newline at end of file
+#endif //__LIBRARIAN_H_
diff --git a/src/include/library.h b/src/include/library.h
index 9af07c34..26f395dc 100755
--- a/src/include/library.h
+++ b/src/include/library.h
@@ -9,7 +9,7 @@ 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);
+library_t *NewLibrary(const char* path, box64context_t* box64);
 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);
@@ -33,4 +33,4 @@ 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
+#endif //__LIBRARY_H_
diff --git a/src/include/pathcoll.h b/src/include/pathcoll.h
index f1a0b93e..5b730d34 100755
--- a/src/include/pathcoll.h
+++ b/src/include/pathcoll.h
@@ -1,7 +1,7 @@
 #ifndef __PATHCOLL_H_
 #define __PATHCOLL_H_
 
-// utility to handle path collection (like BOX86_PATH or BOX86_LD_LIBRARY_PATH)
+// utility to handle path collection (like BOX64_PATH or BOX64_LD_LIBRARY_PATH)
 
 // paths can be resized with realloc, so don't take address as invariant
 typedef struct path_collection_s