| 201 | } |
| 202 | |
| 203 | struct SegmentEntry { |
| 204 | ELFIO::Elf64_Off data_offset; |
| 205 | ELFIO::Elf64_Addr physical_address; |
| 206 | ELFIO::Elf_Xword memory_size; |
| 207 | }; |
| 208 | |
| 209 | std::optional<size_t> get_segment(const std::vector<SegmentEntry>& segments, ELFIO::Elf_Xword section_size, ELFIO::Elf64_Off section_offset) { |
| 210 | // A linear search is safest even if the segment list is sorted, as there may be overlapping segments |
nothing calls this directly
no outgoing calls
no test coverage detected