• Ken Thomases's avatar
    ntdll: For Mac 64-bit, poke the TEB address to %gs:0x30 and re-enable the… · 75019420
    Ken Thomases authored
    ntdll: For Mac 64-bit, poke the TEB address to %gs:0x30 and re-enable the inlining of NtCurrentTeb().
    
    64-bit Windows apps have hard-coded accesses to %gs:0x30 baked into them.  They
    need to find the TEB self pointer there.
    
    Technically, the gsbase register and the memory it points to belong to the
    pthread implementation on macOS.  It's used for the pthread TLS implementation.
    However, study of the sources and experimentation reveal that TLS slot 6
    (offset 0x30) is not currently used.  Furthermore, Apple has promised to not
    use that slot in the future.  So, we hijack it for our purposes.
    Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    75019420
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
actctx.c Loading commit data...
atom.c Loading commit data...
cdrom.c Loading commit data...
critsection.c Loading commit data...
debugbuffer.c Loading commit data...
debugtools.c Loading commit data...
directory.c Loading commit data...
env.c Loading commit data...
error.c Loading commit data...
exception.c Loading commit data...
file.c Loading commit data...
handletable.c Loading commit data...
heap.c Loading commit data...
large_int.c Loading commit data...
loader.c Loading commit data...
loadorder.c Loading commit data...
misc.c Loading commit data...
nt.c Loading commit data...
ntdll.spec Loading commit data...
ntdll_misc.h Loading commit data...
om.c Loading commit data...
path.c Loading commit data...
printf.c Loading commit data...
process.c Loading commit data...
reg.c Loading commit data...
relay.c Loading commit data...
resource.c Loading commit data...
rtl.c Loading commit data...
rtlbitmap.c Loading commit data...
rtlstr.c Loading commit data...
sec.c Loading commit data...
serial.c Loading commit data...
server.c Loading commit data...
signal_arm.c Loading commit data...
signal_arm64.c Loading commit data...
signal_i386.c Loading commit data...
signal_powerpc.c Loading commit data...
signal_x86_64.c Loading commit data...
string.c Loading commit data...
sync.c Loading commit data...
tape.c Loading commit data...
thread.c Loading commit data...
threadpool.c Loading commit data...
time.c Loading commit data...
version.c Loading commit data...
version.rc Loading commit data...
virtual.c Loading commit data...
wcstring.c Loading commit data...