loader: Fix calculation of thread_data address in Linux x86-64 preloader.

Fixes: ac1761d1da
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55508
This commit is contained in:
Jinoh Kang 2023-09-02 17:50:56 +09:00 committed by Alexandre Julliard
parent 73c9bb0710
commit 81f7329f4c

View file

@ -353,7 +353,7 @@ __ASM_GLOBAL_FUNC(_start,
"movq %rsp,%rax\n\t"
"leaq -144(%rsp),%rsp\n\t" /* allocate some space for extra aux values */
"movq %rax,(%rsp)\n\t" /* orig stack pointer */
"movq thread_data(%rip),%rsi\n\t"
"leaq thread_data(%rip),%rsi\n\t"
"movq $0x1002,%rdi\n\t" /* ARCH_SET_FS */
"movq $158,%rax\n\t" /* SYS_arch_prctl */
"syscall\n\t"