mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
Implement loading of linked ELF executables.
This took me a couple hours. :^) The ELF loading code now allocates a single region for the entire file and creates virtual memory mappings for the sections as needed. Very nice!
This commit is contained in:
@@ -49,8 +49,8 @@ ByteBuffer procfs$pid_stack(Task& task)
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
if (current != &task) {
|
||||
MemoryManager::the().unmapRegionsForTask(*current);
|
||||
MemoryManager::the().mapRegionsForTask(task);
|
||||
MM.unmapRegionsForTask(*current);
|
||||
MM.mapRegionsForTask(task);
|
||||
}
|
||||
struct RecognizedSymbol {
|
||||
dword address;
|
||||
@@ -78,8 +78,8 @@ ByteBuffer procfs$pid_stack(Task& task)
|
||||
}
|
||||
buffer.trim(bufptr - (char*)buffer.pointer());
|
||||
if (current != &task) {
|
||||
MemoryManager::the().unmapRegionsForTask(task);
|
||||
MemoryManager::the().mapRegionsForTask(*current);
|
||||
MM.unmapRegionsForTask(task);
|
||||
MM.mapRegionsForTask(*current);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user