Lines Matching refs:elf_ex
416 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, in load_elf_phdrs() argument
421 loff_t pos = elf_ex->e_phoff; in load_elf_phdrs()
428 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
433 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; in load_elf_phdrs()
689 struct elfhdr elf_ex; in load_elf_binary() member
702 loc->elf_ex = *((struct elfhdr *)bprm->buf); in load_elf_binary()
706 if (memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
709 if (loc->elf_ex.e_type != ET_EXEC && loc->elf_ex.e_type != ET_DYN) in load_elf_binary()
711 if (!elf_check_arch(&loc->elf_ex)) in load_elf_binary()
713 if (elf_check_fdpic(&loc->elf_ex)) in load_elf_binary()
718 elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file); in load_elf_binary()
723 for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { in load_elf_binary()
786 for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) in load_elf_binary()
796 retval = arch_elf_pt_proc(&loc->elf_ex, elf_ppnt, in load_elf_binary()
840 retval = arch_check_elf(&loc->elf_ex, in load_elf_binary()
853 SET_PERSONALITY2(loc->elf_ex, &arch_state); in load_elf_binary()
854 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) in load_elf_binary()
881 i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { in load_elf_binary()
925 if (loc->elf_ex.e_type == ET_EXEC || load_addr_set) { in load_elf_binary()
927 } else if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
976 loc->elf_ex.e_phnum); in load_elf_binary()
994 if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
1035 loc->elf_ex.e_entry += load_bias; in load_elf_binary()
1081 elf_entry = loc->elf_ex.e_entry; in load_elf_binary()
1099 retval = create_elf_tables(bprm, &loc->elf_ex, in load_elf_binary()
1118 loc->elf_ex.e_type == ET_DYN && !interpreter) in load_elf_binary()
1181 struct elfhdr elf_ex; in load_elf_library() local
1185 retval = kernel_read(file, &elf_ex, sizeof(elf_ex), &pos); in load_elf_library()
1186 if (retval != sizeof(elf_ex)) in load_elf_library()
1189 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_library()
1193 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 || in load_elf_library()
1194 !elf_check_arch(&elf_ex) || !file->f_op->mmap) in load_elf_library()
1196 if (elf_check_fdpic(&elf_ex)) in load_elf_library()
1201 j = sizeof(struct elf_phdr) * elf_ex.e_phnum; in load_elf_library()
1211 pos = elf_ex.e_phoff; in load_elf_library()
1216 for (j = 0, i = 0; i<elf_ex.e_phnum; i++) in load_elf_library()