UserspaceEmulator: Don't hardcode the amount of thread-local data

This made it impossible to add more thread-local things to LibC. :^)
This commit is contained in:
Andreas Kling 2020-07-21 18:35:09 +02:00
commit 15753e9633
Notes: sideshowbarker 2024-07-19 04:41:18 +09:00

View file

@ -121,7 +121,7 @@ bool Emulator::load_elf()
memset(tcb_region->shadow_data(), 0x01, program_header.size_in_memory());
auto tls_region = make<SimpleRegion>(0, 4);
tls_region->write32(0, shadow_wrap_as_initialized(tcb_region->base() + 8));
tls_region->write32(0, shadow_wrap_as_initialized(tcb_region->base() + program_header.size_in_memory()));
memset(tls_region->shadow_data(), 0x01, 4);
mmu().add_region(move(tcb_region));