1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00:00

Kernel: Simplify ELF loader by removing the allocator indirections.

This commit is contained in:
Andreas Kling 2019-05-16 14:16:08 +02:00
parent 07df2fa7ec
commit c5434e0cfa
2 changed files with 19 additions and 17 deletions

View file

@ -4,7 +4,8 @@
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include "ELFImage.h"
#include <Kernel/LinearAddress.h>
#include <Kernel/ELF/ELFImage.h>
class ELFLoader {
public:
@ -15,8 +16,6 @@ public:
Function<void*(LinearAddress, size_t, size_t, bool, bool, const String&)> alloc_section_hook;
Function<void*(LinearAddress, size_t, size_t, size_t, bool, bool, const String&)> map_section_hook;
char* symbol_ptr(const char* name);
bool allocate_section(LinearAddress, size_t, size_t alignment, bool is_readable, bool is_writable);
bool map_section(LinearAddress, size_t, size_t alignment, size_t offset_in_image, bool is_readable, bool is_writable);
LinearAddress entry() const { return m_image.entry(); }
private: