about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKreitinnSoftware <80591934+KreitinnSoftware@users.noreply.github.com>2023-10-01 14:25:03 -0300
committerGitHub <noreply@github.com>2023-10-01 19:25:03 +0200
commite558912a360809cd90796b061e3001c9ade5dba7 (patch)
tree266322d1cc8cd94f282c3f5e5e5d791ae2d019ae /src
parent00ea757e770a8d5b5149ba07875905690ea91c52 (diff)
downloadbox64-e558912a360809cd90796b061e3001c9ade5dba7.tar.gz
box64-e558912a360809cd90796b061e3001c9ade5dba7.zip
[ANDROID] Remove PreInit Array Warning and Fix libdl name (#1001)
Diffstat (limited to 'src')
-rw-r--r--src/elfs/elfparser.c6
-rw-r--r--src/main.c6
-rw-r--r--src/wrapped/wrappedlibdl.c6
3 files changed, 14 insertions, 4 deletions
diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c
index 61799dae..994581f6 100644
--- a/src/elfs/elfparser.c
+++ b/src/elfs/elfparser.c
@@ -247,8 +247,10 @@ elfheader_t* ParseElfHeader(FILE* f, const char* name, int exec)
                     printf_dump(LOG_DEBUG, "The DT_INIT_ARRAYSZ is %zu\n", h->initarray_sz);
                     break;
                 case DT_PREINIT_ARRAYSZ:
-                    if(val)
-                        printf_log(LOG_NONE, "Warning, PreInit Array (size=%d) present and ignored!\n", val);
+                    #ifndef ANDROID
+                        if(val)
+                            printf_log(LOG_NONE, "Warning, PreInit Array (size=%d) present and ignored!\n", val);
+                    #endif
                     break;
                 case DT_FINI: // Exit hook
                     h->finientry = ptr;
diff --git a/src/main.c b/src/main.c
index e7957bf5..90e3575d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1532,7 +1532,11 @@ int main(int argc, const char **argv, char **env) {
     else
         ++prgname;
     if(box64_wine) {
-        AddPath("libdl.so.2", &ld_preload, 0);
+        #ifdef ANDROID
+            AddPath("libdl.so", &ld_preload, 0);
+        #else
+            AddPath("libdl.so.2", &ld_preload, 0);
+        #endif
     }
     // special case for zoom
     if(strstr(prgname, "zoom")==prgname) {
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c
index 9ed55135..217ae012 100644
--- a/src/wrapped/wrappedlibdl.c
+++ b/src/wrapped/wrappedlibdl.c
@@ -57,7 +57,11 @@ void* my_dlvsym(x64emu_t* emu, void *handle, void *symbol, const char *vername)
 int my_dlinfo(x64emu_t* emu, void* handle, int request, void* info) EXPORT;
 
 #define LIBNAME libdl
-const char* libdlName = "libdl.so.2";
+#ifdef ANDROID
+    const char* libdlName = "libdl.so";
+#else
+    const char* libdlName = "libdl.so.2";
+#endif
 
 #define CLEARERR    if(dl->last_error) {box_free(dl->last_error); dl->last_error = NULL;}