| 37 | } |
| 38 | |
| 39 | Elf64_Shdr* GetSectionByType(Elf64_Word type) const { |
| 40 | Elf64_Shdr* r = nullptr; |
| 41 | |
| 42 | for (Elf64_Shdr* p = GetSectionBegin(), *end = GetSectionEnd(); p != end; ++p) { |
| 43 | if (p->sh_type == type) { |
| 44 | if (r) { |
| 45 | ythrow yexception() << "More than one section of type " << type << Endl; |
| 46 | } |
| 47 | |
| 48 | r = p; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | return r; |
| 53 | } |
| 54 | |
| 55 | size_t GetSectionCount() const noexcept { |
| 56 | size_t count = GetHeader()->e_shnum; |
no outgoing calls
no test coverage detected