Lines Matching refs:elf_ex
400 static struct elf_phdr *load_elf_phdrs(struct elfhdr *elf_ex, in load_elf_phdrs() argument
410 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
414 if (elf_ex->e_phnum < 1 || in load_elf_phdrs()
415 elf_ex->e_phnum > 65536U / sizeof(struct elf_phdr)) in load_elf_phdrs()
419 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; in load_elf_phdrs()
428 retval = kernel_read(elf_file, elf_ex->e_phoff, in load_elf_phdrs()
682 struct elfhdr elf_ex; in load_elf_binary() member
694 loc->elf_ex = *((struct elfhdr *)bprm->buf); in load_elf_binary()
698 if (memcmp(loc->elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
701 if (loc->elf_ex.e_type != ET_EXEC && loc->elf_ex.e_type != ET_DYN) in load_elf_binary()
703 if (!elf_check_arch(&loc->elf_ex)) in load_elf_binary()
708 elf_phdata = load_elf_phdrs(&loc->elf_ex, bprm->file); in load_elf_binary()
721 for (i = 0; i < loc->elf_ex.e_phnum; i++) { in load_elf_binary()
779 for (i = 0; i < loc->elf_ex.e_phnum; i++, elf_ppnt++) in load_elf_binary()
789 retval = arch_elf_pt_proc(&loc->elf_ex, elf_ppnt, in load_elf_binary()
832 retval = arch_check_elf(&loc->elf_ex, !!interpreter, &arch_state); in load_elf_binary()
843 SET_PERSONALITY2(loc->elf_ex, &arch_state); in load_elf_binary()
844 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) in load_elf_binary()
864 i < loc->elf_ex.e_phnum; i++, elf_ppnt++) { in load_elf_binary()
908 if (loc->elf_ex.e_type == ET_EXEC || load_addr_set) { in load_elf_binary()
910 } else if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
920 loc->elf_ex.e_phnum); in load_elf_binary()
938 if (loc->elf_ex.e_type == ET_DYN) { in load_elf_binary()
977 loc->elf_ex.e_entry += load_bias; in load_elf_binary()
1024 elf_entry = loc->elf_ex.e_entry; in load_elf_binary()
1043 retval = create_elf_tables(bprm, &loc->elf_ex, in load_elf_binary()
1114 struct elfhdr elf_ex; in load_elf_library() local
1117 retval = kernel_read(file, 0, (char *)&elf_ex, sizeof(elf_ex)); in load_elf_library()
1118 if (retval != sizeof(elf_ex)) in load_elf_library()
1121 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_library()
1125 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 || in load_elf_library()
1126 !elf_check_arch(&elf_ex) || !file->f_op->mmap) in load_elf_library()
1131 j = sizeof(struct elf_phdr) * elf_ex.e_phnum; in load_elf_library()
1141 retval = kernel_read(file, elf_ex.e_phoff, (char *)eppnt, j); in load_elf_library()
1145 for (j = 0, i = 0; i<elf_ex.e_phnum; i++) in load_elf_library()