MCPcopy Create free account
hub / github.com/cinit/TMoe / findSegmentByType64

Function findSegmentByType64

app/src/main/cpp/utils/elfsym/ElfView.cpp:373–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373[[nodiscard]]
374static 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
386template<class T>
387[[nodiscard]]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected