about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorrajdakin <rajdakin@gmail.com>2021-04-12 00:53:14 +0200
committerrajdakin <rajdakin@gmail.com>2021-04-14 13:11:51 +0200
commit48d61351061dcf1ee3148c67d208f20bdf22a3b8 (patch)
tree9859835d868d88cd8e151e0efd8308ac93581190 /src/include
parent0d38b1cd91d4265042396d3d1dbacac2e662ba00 (diff)
downloadbox64-48d61351061dcf1ee3148c67d208f20bdf22a3b8.tar.gz
box64-48d61351061dcf1ee3148c67d208f20bdf22a3b8.zip
First pass
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/box64context.h6
-rw-r--r--src/include/custommem.h4
-rwxr-xr-xsrc/include/elfloader.h5
-rwxr-xr-xsrc/include/librarian.h8
-rwxr-xr-xsrc/include/wrappedlibs.h3
5 files changed, 12 insertions, 14 deletions
diff --git a/src/include/box64context.h b/src/include/box64context.h
index 1b215378..d5e8b82d 100755
--- a/src/include/box64context.h
+++ b/src/include/box64context.h
@@ -82,8 +82,8 @@ typedef struct box64context_s {
     char*               fullpath;
     char*               box64path;      // path of current box64 executable
 
-    uint32_t            stacksz;
-    int                 stackalign;
+    uint64_t            stacksz;
+    size_t              stackalign;
     void*               stack;          // alocated stack
 
     elfheader_t         **elfs;         // elf headers and memory
@@ -152,7 +152,7 @@ typedef struct box64context_s {
 
     pthread_key_t       tlskey;     // then tls key to have actual tlsdata
     void*               tlsdata;    // the initial global tlsdata
-    int32_t             tlssize;    // wanted size of tlsdata
+    int64_t             tlssize;    // wanted size of tlsdata
     base_segment_t      segtls[3];  // only handling 0/1/2 descriptors
 
     uintptr_t           *auxval_start;
diff --git a/src/include/custommem.h b/src/include/custommem.h
index 1b86d251..bd687468 100644
--- a/src/include/custommem.h
+++ b/src/include/custommem.h
@@ -20,7 +20,7 @@ void customFree(void* p);
 typedef struct dynablock_s dynablock_t;
 typedef struct dynablocklist_s dynablocklist_t;
 // custom protection flag to mark Page that are Write protected for Dynarec purpose
-uintptr_t AllocDynarecMap(dynablock_t* db, int size);
+uintptr_t AllocDynarecMap(dynablock_t* db, size_t size);
 void FreeDynarecMap(dynablock_t* db, uintptr_t addr, uint32_t size);
 
 void addDBFromAddressRange(uintptr_t addr, uintptr_t size);
@@ -60,4 +60,4 @@ void relockCustommemMutex(int locks);
 void init_custommem_helper(box64context_t* ctx);
 void fini_custommem_helper(box64context_t* ctx);
 
-#endif //__CUSTOM_MEM__H_
\ No newline at end of file
+#endif //__CUSTOM_MEM__H_
diff --git a/src/include/elfloader.h b/src/include/elfloader.h
index a46d9b05..aef5ae35 100755
--- a/src/include/elfloader.h
+++ b/src/include/elfloader.h
@@ -26,7 +26,7 @@ int LoadElfMemory(FILE* f, box64context_t* context, elfheader_t* head);
 int ReloadElfMemory(FILE* f, box64context_t* context, elfheader_t* head);
 int RelocateElf(lib_t *maplib, lib_t* local_maplib, elfheader_t* head);
 int RelocateElfPlt(lib_t *maplib, lib_t* local_maplib, elfheader_t* head);
-void CalcStack(elfheader_t* h, uint32_t* stacksz, int* stackalign);
+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, kh_mapsymbols_t* mapsymbols, kh_mapsymbols_t* weaksymbols, kh_mapsymbols_t* localsymbols, elfheader_t* h);
@@ -41,7 +41,7 @@ void* GetElfDelta(elfheader_t* h);
 uint32_t GetBaseSize(elfheader_t* h);
 int IsAddressInElfSpace(elfheader_t* h, uintptr_t addr);
 elfheader_t* FindElfAddress(box64context_t *context, uintptr_t addr);
-const char* FindNearestSymbolName(elfheader_t* h, void* p, uintptr_t* start, uint32_t* sz);
+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);
@@ -55,5 +55,4 @@ void CreateMemorymapFile(box64context_t* context, int fd);
 
 int ElfCheckIfUseTCMallocMinimal(elfheader_t* h);   // return 1 if tcmalloc is used
 
-
 #endif //__ELF_LOADER_H_
diff --git a/src/include/librarian.h b/src/include/librarian.h
index 6e69349b..37eda132 100755
--- a/src/include/librarian.h
+++ b/src/include/librarian.h
@@ -37,13 +37,13 @@ int GetNoWeakSymbolStartEnd(lib_t *maplib, const char* name, uintptr_t* start, u
 elfheader_t* GetGlobalSymbolElf(lib_t *maplib, const char* name);
 int IsGlobalNoWeakSymbolInNative(lib_t *maplib, const char* name);
 
-void AddSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz); // replace if already there
+void AddSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint64_t sz); // replace if already there
 uintptr_t FindSymbol(kh_mapsymbols_t *mapsymbols, const char* name);
-void AddWeakSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint32_t sz); // don't add if already there
+void AddWeakSymbol(kh_mapsymbols_t *mapsymbols, const char* name, uintptr_t addr, uint64_t sz); // don't add if already there
 int GetSymbolStartEnd(kh_mapsymbols_t* mapsymbols, const char* name, uintptr_t* start, uintptr_t* end);
-const char* GetSymbolName(kh_mapsymbols_t* mapsymbols, void* p, uintptr_t* offs, uint32_t* sz);
+const char* GetSymbolName(kh_mapsymbols_t* mapsymbols, void* p, uintptr_t* offs, uint64_t* sz);
 
-const char* FindSymbolName(lib_t *maplib, void* p, void** start, uint32_t* sz, const char** libname, void** base);
+const char* FindSymbolName(lib_t *maplib, void* p, void** start, uint64_t* sz, const char** libname, void** base);
 
 void AddOffsetSymbol(lib_t *maplib, void* offs, const char* name);
 const char* GetNameOffset(lib_t *maplib, void* offs);
diff --git a/src/include/wrappedlibs.h b/src/include/wrappedlibs.h
index d8cf3a64..41e27765 100755
--- a/src/include/wrappedlibs.h
+++ b/src/include/wrappedlibs.h
@@ -15,7 +15,6 @@ typedef struct wrappedlib_s {
     wrappedlib_fini_t   fini;
     wrappedlib_get_t    get;
     wrappedlib_get_t    getnoweak;
-    wrappedlib_get_t    getlocal;
 } wrappedlib_t;
 
-#endif //__WRAPPEDLIBS_H__
\ No newline at end of file
+#endif //__WRAPPEDLIBS_H__