Lines Matching defs:elf_ex
459 * @elf_ex: ELF header of the binary whose program headers should be loaded
463 * header pointed to by elf_ex, into a newly allocated array. The caller is
466 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex,
477 if (elf_ex->e_phentsize != sizeof(struct elf_phdr))
482 size = sizeof(struct elf_phdr) * elf_ex->e_phnum;
491 retval = elf_read(elf_file, elf_phdata, size, elf_ex->e_phoff);
840 struct elfhdr *elf_ex = (struct elfhdr *)bprm->buf;
848 if (memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)
851 if (elf_ex->e_type != ET_EXEC && elf_ex->e_type != ET_DYN)
853 if (!elf_check_arch(elf_ex))
855 if (elf_check_fdpic(elf_ex))
860 elf_phdata = load_elf_phdrs(elf_ex, bprm->file);
865 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++) {
930 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++)
940 retval = arch_elf_pt_proc(elf_ex, elf_ppnt,
994 retval = arch_check_elf(elf_ex,
1007 SET_PERSONALITY2(*elf_ex, &arch_state);
1008 if (elf_read_implies_exec(*elf_ex, executable_stack))
1034 i < elf_ex->e_phnum; i++, elf_ppnt++) {
1084 } else if (elf_ex->e_type == ET_EXEC) {
1091 } else if (elf_ex->e_type == ET_DYN) {
1123 alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
1158 elf_ex->e_phnum);
1175 if (elf_ex->e_type == ET_DYN) {
1186 if (elf_ppnt->p_offset <= elf_ex->e_phoff &&
1187 elf_ex->e_phoff < elf_ppnt->p_offset + elf_ppnt->p_filesz) {
1188 phdr_addr = elf_ex->e_phoff - elf_ppnt->p_offset +
1226 e_entry = elf_ex->e_entry + load_bias;
1286 retval = ARCH_SETUP_ADDITIONAL_PAGES(bprm, elf_ex, !!interpreter);
1291 retval = create_elf_tables(bprm, elf_ex, interp_load_addr,
1312 elf_ex->e_type == ET_DYN && !interpreter) {
1347 START_THREAD(elf_ex, regs, elf_entry, bprm->p);
1374 struct elfhdr elf_ex;
1377 retval = elf_read(file, &elf_ex, sizeof(elf_ex), 0);
1381 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0)
1385 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
1386 !elf_check_arch(&elf_ex) || !file->f_op->mmap)
1388 if (elf_check_fdpic(&elf_ex))
1393 j = sizeof(struct elf_phdr) * elf_ex.e_phnum;
1394 /* j < ELF_MIN_ALIGN because elf_ex.e_phnum <= 2 */
1403 retval = elf_read(file, eppnt, j, elf_ex.e_phoff);
1407 for (j = 0, i = 0; i<elf_ex.e_phnum; i++)