aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r--fs/binfmt_aout.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index 8a3b32f5b781..b639dcf7c778 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -95,12 +95,10 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, u
95 int has_dumped = 0; 95 int has_dumped = 0;
96 unsigned long dump_start, dump_size; 96 unsigned long dump_start, dump_size;
97 struct user dump; 97 struct user dump;
98#if defined(__alpha__) 98#ifdef __alpha__
99# define START_DATA(u) (u.start_data) 99# define START_DATA(u) (u.start_data)
100#elif defined(__arm__) 100#else
101# define START_DATA(u) ((u.u_tsize << PAGE_SHIFT) + u.start_code) 101# define START_DATA(u) ((u.u_tsize << PAGE_SHIFT) + u.start_code)
102#elif defined(__i386__) || defined(__mc68000__) || defined(__arch_um__)
103# define START_DATA(u) (u.u_tsize << PAGE_SHIFT)
104#endif 102#endif
105# define START_STACK(u) (u.start_stack) 103# define START_STACK(u) (u.start_stack)
106 104
@@ -176,18 +174,18 @@ static unsigned long __user *create_aout_tables(char __user *p, struct linux_bin
176 put_user(0, --sp); 174 put_user(0, --sp);
177 if (bprm->loader) { 175 if (bprm->loader) {
178 put_user(0, --sp); 176 put_user(0, --sp);
179 put_user(0x3eb, --sp); 177 put_user(1003, --sp);
180 put_user(bprm->loader, --sp); 178 put_user(bprm->loader, --sp);
181 put_user(0x3ea, --sp); 179 put_user(1002, --sp);
182 } 180 }
183 put_user(bprm->exec, --sp); 181 put_user(bprm->exec, --sp);
184 put_user(0x3e9, --sp); 182 put_user(1001, --sp);
185#endif 183#endif
186 sp -= envc+1; 184 sp -= envc+1;
187 envp = (char __user * __user *) sp; 185 envp = (char __user * __user *) sp;
188 sp -= argc+1; 186 sp -= argc+1;
189 argv = (char __user * __user *) sp; 187 argv = (char __user * __user *) sp;
190#if defined(__i386__) || defined(__mc68000__) || defined(__arm__) || defined(__arch_um__) 188#ifndef __alpha__
191 put_user((unsigned long) envp,--sp); 189 put_user((unsigned long) envp,--sp);
192 put_user((unsigned long) argv,--sp); 190 put_user((unsigned long) argv,--sp);
193#endif 191#endif
@@ -260,7 +258,7 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
260 return retval; 258 return retval;
261 259
262 /* OK, This is the point of no return */ 260 /* OK, This is the point of no return */
263#if defined(__alpha__) 261#ifdef __alpha__
264 SET_AOUT_PERSONALITY(bprm, ex); 262 SET_AOUT_PERSONALITY(bprm, ex);
265#else 263#else
266 set_personality(PER_LINUX); 264 set_personality(PER_LINUX);