MCPcopy Create free account
hub / github.com/catboost/catboost / GetSectionByType

Method GetSectionByType

tools/fix_elf/patch.h:39–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 2

TVerneedSectionMethod · 0.80
PatchFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected