about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-06-06 17:02:41 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-06-06 17:02:41 +0200
commit1057b88ba72c8c0cd241a7f4de3308a91fe321f9 (patch)
tree6d288c51e5455a3a74daca075386518345f433fd /src/main.c
parentde21088bc4d7bcfc97a5cf12fbe22d02ec8c3641 (diff)
downloadbox64-1057b88ba72c8c0cd241a7f4de3308a91fe321f9.tar.gz
box64-1057b88ba72c8c0cd241a7f4de3308a91fe321f9.zip
Fixed some issue with TLS data not beeing updated correctly after ElfInit (fixes Steam version of Ion Fury)
Diffstat (limited to 'src/main.c')
-rwxr-xr-xsrc/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 42b2e600..9a75ee07 100755
--- a/src/main.c
+++ b/src/main.c
@@ -1356,6 +1356,8 @@ int main(int argc, const char **argv, char **env) {
     RelocateElfPlt(my_context->maplib, NULL, 0, elf_header);
     // defered init
     RunDeferedElfInit(emu);
+    // update TLS of main elf
+    RefreshElfTLS(elf_header);
     // do some special case check, _IO_2_1_stderr_ and friends, that are setup by libc, but it's already done here, so need to do a copy
     ResetSpecialCaseMainElf(elf_header);
     // init...