5 void map_over_sections(Elf *elf,
6 section_match_fn_t match,
9 Elf_Scn* section = NULL;
10 while ((section = elf_nextscn(elf, section)) != NULL) {
11 if (match(elf, section, user_data))
16 void map_over_segments(Elf *elf,
17 segment_match_fn_t match,
24 ehdr = elf32_getehdr(elf);
25 phdr = elf32_getphdr(elf);
27 INFO("Scanning over %d program segments...\n",
30 for (index = ehdr->e_phnum; index; index--) {
31 if (match(elf, phdr++, user_data))