mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +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
Notes:
sideshowbarker
2024-07-18 20:38:26 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 2469e07784
Pull-request: https://github.com/SerenityOS/serenity/pull/6179
Reviewed-by: https://github.com/awesomekling
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)));
|
mmu().add_region(MmapRegion::create_anonymous(final_address, final_size, params.prot, move(name_str)));
|
||||||
} else {
|
} else {
|
||||||
auto region = MmapRegion::create_file_backed(final_address, final_size, params.prot, params.flags, params.fd, params.offset, move(name_str));
|
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_start = final_address;
|
||||||
m_libc_end = final_address + final_size;
|
m_libc_end = final_address + final_size;
|
||||||
bool rc = find_malloc_symbols(*region);
|
bool rc = find_malloc_symbols(*region);
|
||||||
VERIFY(rc);
|
VERIFY(rc);
|
||||||
}
|
} else if (region->name() == "libsystem.so: .text" && !m_libsystem_start) {
|
||||||
if (region->name() == "libsystem.so: .text") {
|
|
||||||
m_libsystem_start = final_address;
|
m_libsystem_start = final_address;
|
||||||
m_libsystem_end = final_address + final_size;
|
m_libsystem_end = final_address + final_size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue