| 371 | } |
| 372 | |
| 373 | [[nodiscard]] |
| 374 | static inline const Elf64_Phdr *findSegmentByType64(const ElfView::ElfInfo &info, Elf64_Word type) { |
| 375 | const Elf64_Phdr *target = nullptr; |
| 376 | const auto *phdr = (const Elf64_Phdr *) info.phdr; |
| 377 | for (int i = 0; i < ((const Elf64_Ehdr *) info.ehdr)->e_phnum; i++) { |
| 378 | if (phdr[i].p_type == type) { |
| 379 | target = phdr + i; |
| 380 | break; |
| 381 | } |
| 382 | } |
| 383 | return target; |
| 384 | } |
| 385 | |
| 386 | template<class T> |
| 387 | [[nodiscard]] |
no outgoing calls
no test coverage detected