Lines Matching refs:elf_ex
457 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex, in load_elf_phdrs() argument
468 if (elf_ex->e_phentsize != sizeof(struct elf_phdr)) in load_elf_phdrs()
473 size = sizeof(struct elf_phdr) * elf_ex->e_phnum; in load_elf_phdrs()
482 retval = elf_read(elf_file, elf_phdata, size, elf_ex->e_phoff); in load_elf_phdrs()
837 struct elfhdr *elf_ex = (struct elfhdr *)bprm->buf; in load_elf_binary() local
845 if (memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0) in load_elf_binary()
848 if (elf_ex->e_type != ET_EXEC && elf_ex->e_type != ET_DYN) in load_elf_binary()
850 if (!elf_check_arch(elf_ex)) in load_elf_binary()
852 if (elf_check_fdpic(elf_ex)) in load_elf_binary()
857 elf_phdata = load_elf_phdrs(elf_ex, bprm->file); in load_elf_binary()
862 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++) { in load_elf_binary()
927 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++) in load_elf_binary()
937 retval = arch_elf_pt_proc(elf_ex, elf_ppnt, in load_elf_binary()
991 retval = arch_check_elf(elf_ex, in load_elf_binary()
1004 SET_PERSONALITY2(*elf_ex, &arch_state); in load_elf_binary()
1005 if (elf_read_implies_exec(*elf_ex, executable_stack)) in load_elf_binary()
1031 i < elf_ex->e_phnum; i++, elf_ppnt++) { in load_elf_binary()
1077 if (elf_ex->e_type == ET_EXEC || load_addr_set) { in load_elf_binary()
1079 } else if (elf_ex->e_type == ET_DYN) { in load_elf_binary()
1114 alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum); in load_elf_binary()
1131 elf_ex->e_phnum); in load_elf_binary()
1149 if (elf_ex->e_type == ET_DYN) { in load_elf_binary()
1161 if (elf_ppnt->p_offset <= elf_ex->e_phoff && in load_elf_binary()
1162 elf_ex->e_phoff < elf_ppnt->p_offset + elf_ppnt->p_filesz) { in load_elf_binary()
1163 phdr_addr = elf_ex->e_phoff - elf_ppnt->p_offset + in load_elf_binary()
1201 e_entry = elf_ex->e_entry + load_bias; in load_elf_binary()
1266 retval = create_elf_tables(bprm, elf_ex, interp_load_addr, in load_elf_binary()
1287 elf_ex->e_type == ET_DYN && !interpreter) { in load_elf_binary()
1349 struct elfhdr elf_ex; in load_elf_library() local
1352 retval = elf_read(file, &elf_ex, sizeof(elf_ex), 0); in load_elf_library()
1356 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0) in load_elf_library()
1360 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 || in load_elf_library()
1361 !elf_check_arch(&elf_ex) || !file->f_op->mmap) in load_elf_library()
1363 if (elf_check_fdpic(&elf_ex)) in load_elf_library()
1368 j = sizeof(struct elf_phdr) * elf_ex.e_phnum; in load_elf_library()
1378 retval = elf_read(file, eppnt, j, elf_ex.e_phoff); in load_elf_library()
1382 for (j = 0, i = 0; i<elf_ex.e_phnum; i++) in load_elf_library()