| 228 | } |
| 229 | |
| 230 | bool validHeader() { |
| 231 | unsigned char* ident = _header->e_ident; |
| 232 | return ident[0] == 0x7f && ident[1] == 'E' && ident[2] == 'L' && ident[3] == 'F' |
| 233 | && ident[4] == ELFCLASS_SUPPORTED && ident[5] == ELFDATA2LSB && ident[6] == EV_CURRENT |
| 234 | && _header->e_shstrndx != SHN_UNDEF; |
| 235 | } |
| 236 | |
| 237 | ElfSection* section(int index) { |
| 238 | return (ElfSection*)(_sections + index * _header->e_shentsize); |
no outgoing calls
no test coverage detected