Skip to content

Commit

Permalink
Output Section to Segment mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Serge Lamikhov-Center committed Jun 14, 2024
1 parent a872f7c commit 5dd192c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions elfio/elfio_dump.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 5dd192c

Please sign in to comment.