Output Section to Segment mapping

This commit is contained in:
Serge Lamikhov-Center 2024-06-14 19:53:10 +03:00
parent a872f7cdde
commit 5dd192cce6

View File

@ -705,10 +705,10 @@ class dump
<< std::endl
<< " Version: " << str_version( reader.get_version() )
<< std::endl
<< " Entry: "
<< "0x" << std::hex << reader.get_entry() << std::endl
<< " Flags: "
<< "0x" << std::hex << reader.get_flags() << std::endl
<< " Entry: " << "0x" << std::hex << reader.get_entry()
<< std::endl
<< " Flags: " << "0x" << std::hex << reader.get_flags()
<< std::endl
<< std::endl;
}
@ -820,6 +820,18 @@ class dump
segment_header( out, i, seg, reader.get_class() );
}
out << std::endl;
for ( Elf_Half i = 0; i < n; ++i ) {
out << "[" << i << "]" << " ";
const segment* seg = reader.segments[i];
for ( Elf_Half j = 0; j < seg->get_sections_num(); j++ ) {
const section* sec =
reader.sections[seg->get_section_index_at( j )];
out << sec->get_name() << " ";
}
out << std::endl;
}
out << std::endl;
}