Lines Matching refs:elf_ex

399 static struct elf_phdr *load_elf_phdrs(struct elfhdr *elf_ex,  in load_elf_phdrs()  argument
409 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
413 if (elf_ex->e_phnum < 1 || in load_elf_phdrs()
414 elf_ex->e_phnum > 65536U / sizeof(struct elf_phdr)) in load_elf_phdrs()
418 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; in load_elf_phdrs()
427 retval = kernel_read(elf_file, elf_ex->e_phoff, in load_elf_phdrs()
681 struct elfhdr elf_ex; in load_elf_binary() member
693 loc->elf_ex = *((struct elfhdr *)bprm->buf); in load_elf_binary()
697 if (memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
700 if (loc->elf_ex.e_type != ET_EXEC && loc->elf_ex.e_type != ET_DYN) in load_elf_binary()
702 if (!elf_check_arch(&loc->elf_ex)) in load_elf_binary()
707 elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file); in load_elf_binary()
720 for (i = 0; i < loc->elf_ex.e_phnum; i++) { in load_elf_binary()
778 for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) in load_elf_binary()
788 retval = arch_elf_pt_proc(&loc->elf_ex, elf_ppnt, in load_elf_binary()
831 retval = arch_check_elf(&loc->elf_ex, !!interpreter, &arch_state); in load_elf_binary()
842 SET_PERSONALITY2(loc->elf_ex, &arch_state); in load_elf_binary()
843 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) in load_elf_binary()
863 i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { in load_elf_binary()
907 if (loc->elf_ex.e_type == ET_EXEC || load_addr_set) { in load_elf_binary()
909 } else if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
919 loc->elf_ex.e_phnum); in load_elf_binary()
937 if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
976 loc->elf_ex.e_entry += load_bias; in load_elf_binary()
1023 elf_entry = loc->elf_ex.e_entry; in load_elf_binary()
1042 retval = create_elf_tables(bprm, &loc->elf_ex, in load_elf_binary()
1113 struct elfhdr elf_ex; in load_elf_library() local
1116 retval = kernel_read(file, 0, (char *)&elf_ex, sizeof(elf_ex)); in load_elf_library()
1117 if (retval != sizeof(elf_ex)) in load_elf_library()
1120 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_library()
1124 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 || in load_elf_library()
1125 !elf_check_arch(&elf_ex) || !file->f_op->mmap) in load_elf_library()
1130 j = sizeof(struct elf_phdr) * elf_ex.e_phnum; in load_elf_library()
1140 retval = kernel_read(file, elf_ex.e_phoff, (char *)eppnt, j); in load_elf_library()
1144 for (j = 0, i = 0; i<elf_ex.e_phnum; i++) in load_elf_library()