void * elf_getSection(void *elfFile, int i) { return ISELF32 (elfFile) ? elf32_getSection(elfFile, i) : elf64_getSection(elfFile, i); }
void * elf32_getSectionNamed(struct Elf32_Header *elfFile, char *str) { int numSections = elf32_getNumSections(elfFile); int i; for (i = 0; i < numSections; i++) { if (strcmp(str, elf32_getSectionName(elfFile, i)) == 0) { return elf32_getSection(elfFile, i); } } return NULL; }