return near;
 }
 
+static bool is_executable_section(struct elf_info *elf, unsigned int secndx)
+{
+       if (secndx > elf->num_sections)
+               return false;
+
+       return (elf->sechdrs[secndx].sh_flags & SHF_EXECINSTR) != 0;
+}
+
 static void default_mismatch_handler(const char *modname, struct elf_info *elf,
                                     const struct sectioncheck* const mismatch,
                                     Elf_Rela *r, Elf_Sym *sym, const char *fromsec)
        }
 }
 
-static int is_executable_section(struct elf_info* elf, unsigned int section_index)
-{
-       if (section_index > elf->num_sections)
-               fatal("section_index is outside elf->num_sections!\n");
-
-       return ((elf->sechdrs[section_index].sh_flags & SHF_EXECINSTR) == SHF_EXECINSTR);
-}
-
 static void extable_mismatch_handler(const char* modname, struct elf_info *elf,
                                     const struct sectioncheck* const mismatch,
                                     Elf_Rela* r, Elf_Sym* sym,