mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
29 lines
586 B
C++
29 lines
586 B
C++
#pragma once
|
|
|
|
#include <AK/HashMap.h>
|
|
#include <AK/MappedFile.h>
|
|
#include <AK/OwnPtr.h>
|
|
#include <AK/Vector.h>
|
|
#include "ExecSpace.h"
|
|
#include "ELFImage.h"
|
|
|
|
class ELFLoader {
|
|
public:
|
|
ELFLoader(ExecSpace&, MappedFile&&);
|
|
~ELFLoader();
|
|
|
|
bool load();
|
|
|
|
private:
|
|
void layout();
|
|
void performRelocations();
|
|
void exportSymbols();
|
|
void* lookup(const ELFImage::Symbol&);
|
|
char* areaForSection(const ELFImage::Section&);
|
|
char* areaForSectionName(const char*);
|
|
|
|
ExecSpace& m_execSpace;
|
|
HashMap<String, char*> m_sections;
|
|
OwnPtr<ELFImage> m_image;
|
|
};
|
|
|