Kernel/LibC: Replace SYS_{GET,SET}_TLS with SYS_{SET,GET}_{FS,GS}BASE
This allows userspace to use both registers
This commit is contained in:
@@ -1366,7 +1366,13 @@ static void initialize_tls(MasterTLS master_tls)
|
||||
uthread.dtv[elf.tls_module] = reinterpret_cast<uintptr_t>(tls_addr) + uthread.master_tls_size - elf.tls_offset;
|
||||
}
|
||||
|
||||
syscall(SYS_SET_TLS, &uthread);
|
||||
#if defined(__x86_64__)
|
||||
syscall(SYS_SET_FSBASE, &uthread);
|
||||
#elif defined(__i686__)
|
||||
syscall(SYS_SET_GSBASE, &uthread);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
}
|
||||
|
||||
static void initialize_environ(char** envp)
|
||||
|
||||
Reference in New Issue
Block a user