mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
UE: only write libc and libsystem location once
This is important when emulating UE itself, which maps these files two times, and then we forget the original location of it.
This commit is contained in:
parent
58e373c0f2
commit
2469e07784
1 changed files with 2 additions and 3 deletions
|
@ -880,13 +880,12 @@ u32 Emulator::virt$mmap(u32 params_addr)
|
|||
mmu().add_region(MmapRegion::create_anonymous(final_address, final_size, params.prot, move(name_str)));
|
||||
} else {
|
||||
auto region = MmapRegion::create_file_backed(final_address, final_size, params.prot, params.flags, params.fd, params.offset, move(name_str));
|
||||
if (region->name() == "libc.so: .text") {
|
||||
if (region->name() == "libc.so: .text" && !m_libc_start) {
|
||||
m_libc_start = final_address;
|
||||
m_libc_end = final_address + final_size;
|
||||
bool rc = find_malloc_symbols(*region);
|
||||
VERIFY(rc);
|
||||
}
|
||||
if (region->name() == "libsystem.so: .text") {
|
||||
} else if (region->name() == "libsystem.so: .text" && !m_libsystem_start) {
|
||||
m_libsystem_start = final_address;
|
||||
m_libsystem_end = final_address + final_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue