Lines Matching refs:ex

264 	struct exec ex;  in load_aout_binary()  local
270 ex = *((struct exec *) bprm->buf); /* exec-header */ in load_aout_binary()
271 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC && in load_aout_binary()
272 N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) || in load_aout_binary()
273 N_TRSIZE(ex) || N_DRSIZE(ex) || in load_aout_binary()
274 bprm->file->f_dentry->d_inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout_binary()
278 fd_offset = N_TXTOFF(ex); in load_aout_binary()
287 if (ex.a_data + ex.a_bss > rlim) in load_aout_binary()
297 SET_AOUT_PERSONALITY(bprm, ex); in load_aout_binary()
301 memcpy(&current->thread.core_exec, &ex, sizeof(struct exec)); in load_aout_binary()
307 current->mm->end_code = ex.a_text + in load_aout_binary()
308 (current->mm->start_code = N_TXTADDR(ex)); in load_aout_binary()
309 current->mm->end_data = ex.a_data + in load_aout_binary()
310 (current->mm->start_data = N_DATADDR(ex)); in load_aout_binary()
311 current->mm->brk = ex.a_bss + in load_aout_binary()
312 (current->mm->start_brk = N_BSSADDR(ex)); in load_aout_binary()
319 if (N_MAGIC(ex) == NMAGIC) { in load_aout_binary()
324 error = do_brk(N_TXTADDR(ex), ex.a_text); in load_aout_binary()
326 bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex), in load_aout_binary()
327 ex.a_text, &pos); in load_aout_binary()
329 error = do_brk(N_DATADDR(ex), ex.a_data); in load_aout_binary()
331 bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex), in load_aout_binary()
332 ex.a_data, &pos); in load_aout_binary()
337 if (N_MAGIC(ex) == OMAGIC) { in load_aout_binary()
341 text_addr = N_TXTADDR(ex); in load_aout_binary()
345 map_size = ex.a_text+ex.a_data + PAGE_SIZE - 1; in load_aout_binary()
348 map_size = ex.a_text+ex.a_data; in load_aout_binary()
359 ex.a_text+ex.a_data, &pos); in load_aout_binary()
365 flush_icache_range(text_addr, text_addr+ex.a_text+ex.a_data); in load_aout_binary()
368 if ((ex.a_text & 0xfff || ex.a_data & 0xfff) && in load_aout_binary()
369 (N_MAGIC(ex) != NMAGIC) && (jiffies-error_time2) > 5*HZ) in load_aout_binary()
387 do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data); in load_aout_binary()
389 bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex), in load_aout_binary()
390 ex.a_text+ex.a_data, &pos); in load_aout_binary()
391 flush_icache_range((unsigned long) N_TXTADDR(ex), in load_aout_binary()
392 (unsigned long) N_TXTADDR(ex) + in load_aout_binary()
393 ex.a_text+ex.a_data); in load_aout_binary()
398 error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text, in load_aout_binary()
404 if (error != N_TXTADDR(ex)) { in load_aout_binary()
410 error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data, in load_aout_binary()
413 fd_offset + ex.a_text); in load_aout_binary()
415 if (error != N_DATADDR(ex)) { in load_aout_binary()
439 regs->gp = ex.a_gpvalue; in load_aout_binary()
441 start_thread(regs, ex.a_entry, current->mm->start_stack); in load_aout_binary()
453 struct exec ex; in load_aout_library() local
458 error = kernel_read(file, 0, (char *) &ex, sizeof(ex)); in load_aout_library()
459 if (error != sizeof(ex)) in load_aout_library()
463 if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != QMAGIC) || N_TRSIZE(ex) || in load_aout_library()
464 N_DRSIZE(ex) || ((ex.a_entry & 0xfff) && N_MAGIC(ex) == ZMAGIC) || in load_aout_library()
465 inode->i_size < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout_library()
469 if (N_FLAGS(ex)) in load_aout_library()
475 start_addr = ex.a_entry & 0xfffff000; in load_aout_library()
477 if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) { in load_aout_library()
479 loff_t pos = N_TXTOFF(ex); in load_aout_library()
490 do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss); in load_aout_library()
494 ex.a_text + ex.a_data, &pos); in load_aout_library()
496 (unsigned long) start_addr + ex.a_text + ex.a_data); in load_aout_library()
503 error = do_mmap(file, start_addr, ex.a_text + ex.a_data, in load_aout_library()
506 N_TXTOFF(ex)); in load_aout_library()
512 len = PAGE_ALIGN(ex.a_text + ex.a_data); in load_aout_library()
513 bss = ex.a_text + ex.a_data + ex.a_bss; in load_aout_library()