Lines Matching defs:elf_ex

450  * @elf_ex:   ELF header of the binary whose program headers should be loaded
454 * header pointed to by elf_ex, into a newly allocated array. The caller is
457 static struct elf_phdr *load_elf_phdrs(const struct elfhdr *elf_ex,
468 if (elf_ex->e_phentsize != sizeof(struct elf_phdr))
473 size = sizeof(struct elf_phdr) * elf_ex->e_phnum;
482 retval = elf_read(elf_file, elf_phdata, size, elf_ex->e_phoff);
837 struct elfhdr *elf_ex = (struct elfhdr *)bprm->buf;
845 if (memcmp(elf_ex->e_ident, ELFMAG, SELFMAG) != 0)
848 if (elf_ex->e_type != ET_EXEC && elf_ex->e_type != ET_DYN)
850 if (!elf_check_arch(elf_ex))
852 if (elf_check_fdpic(elf_ex))
857 elf_phdata = load_elf_phdrs(elf_ex, bprm->file);
862 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++) {
927 for (i = 0; i < elf_ex->e_phnum; i++, elf_ppnt++)
937 retval = arch_elf_pt_proc(elf_ex, elf_ppnt,
991 retval = arch_check_elf(elf_ex,
1004 SET_PERSONALITY2(*elf_ex, &arch_state);
1005 if (elf_read_implies_exec(*elf_ex, executable_stack))
1031 i < elf_ex->e_phnum; i++, elf_ppnt++) {
1101 if (elf_ex->e_type == ET_EXEC || load_addr_set) {
1103 } else if (elf_ex->e_type == ET_DYN) {
1138 alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
1155 elf_ex->e_phnum);
1173 if (elf_ex->e_type == ET_DYN) {
1185 if (elf_ppnt->p_offset <= elf_ex->e_phoff &&
1186 elf_ex->e_phoff < elf_ppnt->p_offset + elf_ppnt->p_filesz) {
1187 phdr_addr = elf_ex->e_phoff - elf_ppnt->p_offset +
1225 e_entry = elf_ex->e_entry + load_bias;
1290 retval = create_elf_tables(bprm, elf_ex, interp_load_addr,
1311 elf_ex->e_type == ET_DYN && !interpreter) {
1373 struct elfhdr elf_ex;
1376 retval = elf_read(file, &elf_ex, sizeof(elf_ex), 0);
1380 if (memcmp(elf_ex.e_ident, ELFMAG, SELFMAG) != 0)
1384 if (elf_ex.e_type != ET_EXEC || elf_ex.e_phnum > 2 ||
1385 !elf_check_arch(&elf_ex) || !file->f_op->mmap)
1387 if (elf_check_fdpic(&elf_ex))
1392 j = sizeof(struct elf_phdr) * elf_ex.e_phnum;
1393 /* j < ELF_MIN_ALIGN because elf_ex.e_phnum <= 2 */
1402 retval = elf_read(file, eppnt, j, elf_ex.e_phoff);
1406 for (j = 0, i = 0; i<elf_ex.e_phnum; i++)