mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +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:
parent
99ee6acd69
commit
9a71c7759a
16 changed files with 258 additions and 57 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue