summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /fs/binfmt_aout.c
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'fs/binfmt_aout.c')
-rw-r--r--fs/binfmt_aout.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index 122491c7a..f4d37d3c5 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -318,7 +318,6 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
return -ENOEXEC;
}
- current->personality = PER_LINUX;
fd_offset = N_TXTOFF(ex);
#ifdef __i386__
@@ -350,6 +349,8 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
return retval;
/* OK, This is the point of no return */
+ current->personality = PER_LINUX;
+
#if defined(__sparc__) && !defined(__sparc_v9__)
memcpy(&current->tss.core_exec, &ex, sizeof(struct exec));
#endif
@@ -396,6 +397,8 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
MAP_FIXED|MAP_PRIVATE, 0);
read_exec(bprm->dentry, 32, (char *) 0, ex.a_text+ex.a_data, 0);
#endif
+ flush_icache_range((unsigned long) 0,
+ (unsigned long) ex.a_text+ex.a_data);
} else {
if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
(N_MAGIC(ex) != NMAGIC))
@@ -413,6 +416,9 @@ static inline int do_load_aout_binary(struct linux_binprm * bprm, struct pt_regs
MAP_FIXED|MAP_PRIVATE, 0);
read_exec(bprm->dentry, fd_offset,
(char *) N_TXTADDR(ex), ex.a_text+ex.a_data, 0);
+ flush_icache_range((unsigned long) N_TXTADDR(ex),
+ (unsigned long) N_TXTADDR(ex) +
+ ex.a_text+ex.a_data);
goto beyond_if;
}
@@ -563,7 +569,7 @@ load_aout_library(int fd)
}
-__initfunc(int init_aout_binfmt(void))
+int __init init_aout_binfmt(void)
{
return register_binfmt(&aout_format);
}