=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: loader: Setup the TLS register on ARM64.

Alexandre Julliard julliard at winehq.org
Thu Nov 16 15:21:09 CST 2017


Module: wine
Branch: master
Commit: c08e5560c4179443f8b5f587a4fa0d3555958d03
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c08e5560c4179443f8b5f587a4fa0d3555958d03

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Nov 15 23:32:02 2017 +0100

loader: Setup the TLS register on ARM64.

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 loader/preloader.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/loader/preloader.c b/loader/preloader.c
index e519457..725926e 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -457,6 +457,8 @@ SYSCALL_NOERR( wld_getegid, 108 /* SYS_getegid */ );
 
 #elif defined(__aarch64__)
 
+void *thread_data[256];
+
 /*
  * The _start function is the entry and exit point of this program
  *
@@ -469,6 +471,8 @@ __ASM_GLOBAL_FUNC(_start,
                   "mov x0, SP\n\t"
                   "sub SP, SP, #144\n\t" /* allocate some space for extra aux values */
                   "str x0, [SP]\n\t"     /* orig stack pointer */
+                  "ldr x0, =thread_data\n\t"
+                  "msr tpidr_el0, x0\n\t"
                   "mov x0, SP\n\t"       /* ptr to orig stack pointer */
                   "bl wld_start\n\t"
                   "ldr x1, [SP]\n\t"     /* new stack pointer */




More information about the wine-cvs mailing list