Lines Matching refs:ehdr
266 has_freebsd_abi_tag(const char *fname, Elf *elf, GElf_Ehdr *ehdr, off_t offset, in has_freebsd_abi_tag() argument
295 if (gelf_xlatetom(elf, &dst, &src, ehdr->e_ident[EI_DATA]) == NULL) { in has_freebsd_abi_tag()
334 is_pie(const char *fname, Elf *elf, GElf_Ehdr *ehdr, off_t offset, size_t len) in is_pie() argument
369 if (gelf_xlatetom(elf, &dst, &src, ehdr->e_ident[EI_DATA]) == NULL) { in is_pie()
393 GElf_Ehdr ehdr; in is_executable() local
418 if (gelf_getehdr(elf, &ehdr) == NULL) { in is_executable()
431 freebsd = ehdr.e_ident[EI_OSABI] == ELFOSABI_FREEBSD; in is_executable()
432 for (i = 0; i < ehdr.e_phnum; i++) { in is_executable()
440 if (ehdr.e_ident[EI_OSABI] == ELFOSABI_NONE && !freebsd) in is_executable()
441 freebsd = has_freebsd_abi_tag(fname, elf, &ehdr, in is_executable()
446 if (ehdr.e_type == ET_DYN) in is_executable()
447 pie = is_pie(fname, elf, &ehdr, phdr.p_offset, in is_executable()
459 if (ehdr.e_type == ET_DYN && !pie) { in is_executable()