1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00

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
parent 91f25c8f91
commit 15753e9633

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));