apio
dc389da74e
This struct allows us to keep track of what memory is used by the loaded executable. For some reason, freeing this memory when the task exits triggers a kernel page fault, so I'm not doing that right now.
15 lines
195 B
C
15 lines
195 B
C
#pragma once
|
|
#include <stdint.h>
|
|
|
|
struct ELFSection
|
|
{
|
|
uintptr_t base;
|
|
uint64_t pages;
|
|
};
|
|
|
|
struct ELFImage
|
|
{
|
|
uintptr_t entry;
|
|
uint64_t section_count;
|
|
ELFSection sections[1];
|
|
}; |