read ELF
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#include <print>
|
||||
#include <elfio/elfio.hpp>
|
||||
|
||||
int main() {
|
||||
ELFIO::elfio reader;
|
||||
if(!reader.load("tests/elf/application.elf"))
|
||||
return 1;
|
||||
|
||||
for(ELFIO::Elf_Half i = 1; i < reader.sections.size(); i++) {
|
||||
const auto& section = reader.sections[i];
|
||||
std::println(R"(Section n.{} "{}": 0x{:08X} -> 0x{:08X})", i, section->get_name(), section->get_address(), section->get_address() + section->get_size() - 1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user