LibELF: ELF now has methods for accessing more attributes

You can now access the program headers and the memory itself
This commit is contained in:
Bananymous
2023-04-22 15:31:05 +03:00
parent ff8c0086e2
commit 4588e25d27
2 changed files with 30 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ namespace LibELF
const char* lookup_section_name(uint32_t) const;
const char* lookup_string(size_t, uint32_t) const;
const uint8_t* data() const { return m_data.data(); }
private:
ELF(BAN::Vector<uint8_t>&& data)
: m_data(BAN::move(data))
@@ -26,6 +28,7 @@ namespace LibELF
BAN::ErrorOr<void> load();
bool parse_elf64_file_header(const Elf64FileHeader&);
bool parse_elf64_program_header(const Elf64ProgramHeader&);
bool parse_elf64_section_header(const Elf64SectionHeader&);
private: