patch-1.3.39 linux/fs/exec.c
Next file: linux/fs/ext/inode.c
Previous file: linux/fs/binfmt_elf.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Thu Nov 9 10:04:33 1995
- Orig file:
v1.3.38/linux/fs/exec.c
- Orig date:
Tue Oct 10 18:46:37 1995
diff -u --recursive --new-file v1.3.38/linux/fs/exec.c linux/fs/exec.c
@@ -853,10 +853,19 @@
current->suid = current->euid = current->fsuid = bprm->e_uid;
current->sgid = current->egid = current->fsgid = bprm->e_gid;
if (N_MAGIC(ex) == OMAGIC) {
+#ifdef __alpha__
+ do_mmap(NULL, N_TXTADDR(ex) & PAGE_MASK,
+ ex.a_text+ex.a_data + PAGE_SIZE - 1,
+ PROT_READ|PROT_WRITE|PROT_EXEC,
+ MAP_FIXED|MAP_PRIVATE, 0);
+ read_exec(bprm->inode, fd_offset, (char *) N_TXTADDR(ex),
+ ex.a_text+ex.a_data, 0);
+#else
do_mmap(NULL, 0, ex.a_text+ex.a_data,
PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_FIXED|MAP_PRIVATE, 0);
read_exec(bprm->inode, 32, (char *) 0, ex.a_text+ex.a_data, 0);
+#endif
} else {
if (ex.a_text & 0xfff || ex.a_data & 0xfff)
printk(KERN_NOTICE "executable not page aligned\n");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this