1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:27:45 +00:00

Kernel+LibELF: Add support for validating and loading ELF64 executables

This commit is contained in:
Gunnar Beutner 2021-06-28 17:24:08 +02:00 committed by Andreas Kling
parent e35b060501
commit 158355e0d7
13 changed files with 109 additions and 78 deletions

View file

@ -85,7 +85,7 @@ private:
class ProgramHeaderRegion {
public:
void set_program_header(const Elf32_Phdr& header) { m_program_header = header; }
void set_program_header(const ElfW(Phdr) & header) { m_program_header = header; }
// Information from ELF Program header
u32 type() const { return m_program_header.p_type; }
@ -104,7 +104,7 @@ private:
bool is_relro() const { return type() == PT_GNU_RELRO; }
private:
Elf32_Phdr m_program_header; // Explicitly a copy of the PHDR in the image
ElfW(Phdr) m_program_header; // Explicitly a copy of the PHDR in the image
};
const DynamicObject& dynamic_object() const;