diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-11-01 10:37:44 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-11-01 10:37:44 +0100 |
| commit | 24cc0c8422f4917fc8d0d03044d930ee91163674 (patch) | |
| tree | aa36455ad4889d1d1a72cc7fd27e256d7e375c64 /src/main.c | |
| parent | 8459ea0d31a851e847318273233c9a8b2b079eae (diff) | |
| download | box64-24cc0c8422f4917fc8d0d03044d930ee91163674.tar.gz box64-24cc0c8422f4917fc8d0d03044d930ee91163674.zip | |
Detect when program is linked with glibc 2.34+ to workaround the default libc libs to load
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 5f081257..a8f3eb9f 100755 --- a/src/main.c +++ b/src/main.c @@ -91,6 +91,7 @@ int box64_nogtk = 0; int box64_novulkan = 0; int box64_showsegv = 0; int box64_showbt = 0; +int box64_isglibc234 = 0; char* libGL = NULL; uintptr_t fmod_smc_start = 0; uintptr_t fmod_smc_end = 0; @@ -1491,6 +1492,9 @@ int main(int argc, const char **argv, char **env) { setupTraceInit(); // export symbols AddSymbols(my_context->maplib, GetMapSymbols(elf_header), GetWeakSymbols(elf_header), GetLocalSymbols(elf_header), elf_header); + box64_isglibc234 = GetVersionIndice(elf_header, "GLIBC_2.34")?1:0; + if(box64_isglibc234) + printf_log(LOG_DEBUG, "Program linked with GLIBC 2.34+\n"); if(wine_preloaded) { uintptr_t wineinfo = FindSymbol(GetMapSymbols(elf_header), "wine_main_preload_info", -1, NULL, 1, NULL); if(!wineinfo) wineinfo = FindSymbol(GetWeakSymbols(elf_header), "wine_main_preload_info", -1, NULL, 1, NULL); |