13 lines
441 B
C++
13 lines
441 B
C++
#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);
|
|
}
|
|
} |