Added handling of ARCH_GET_FS to arch_prctl

This commit is contained in:
ptitSeb 2021-11-01 13:19:44 +01:00
parent 5494d417c0
commit fbd9604dc1

View File

@ -153,6 +153,9 @@ int my_arch_prctl(x64emu_t *emu, int code, void* addr)
my_context->segtls[3].present = 1;
pthread_setspecific(my_context->segtls[3].key, (void*)my_context->segtls[3].base);
return 0;
case ARCH_GET_FS:
*(void**)addr = GetSegmentBase(emu->segs[_FS]);
return 0;
}
// other are unsupported
printf_log(LOG_INFO, "warning, call to unsupported arch_prctl(0x%x, %p)\n", code, addr);