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

LibELF: Move validation methods to their own file

These validate_elf_* methods really had no business being static
methods of ELF::Image. Now that the ELF namespace exists, it makes
sense to just move them to be free functions in the namespace.
This commit is contained in:
Andrew Kaster 2020-04-11 12:32:38 -06:00 committed by Andreas Kling
parent 21b5909dc6
commit 61acca223f
7 changed files with 234 additions and 163 deletions

View file

@ -203,9 +203,6 @@ public:
VirtualAddress entry() const { return VirtualAddress(header().e_entry); }
static bool validate_elf_header(const Elf32_Ehdr& elf_header, size_t file_size);
static bool validate_program_headers(const Elf32_Ehdr& elf_header, size_t file_size, u8* buffer, size_t buffer_size, String& interpreter_path);
private:
bool parse_header();
const char* raw_data(unsigned offset) const;