summaryrefslogtreecommitdiff
path: root/sys/compat/freebsd/freebsd_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/freebsd/freebsd_exec.c')
-rw-r--r--sys/compat/freebsd/freebsd_exec.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c
index 9c41c48103d..f8f496577a6 100644
--- a/sys/compat/freebsd/freebsd_exec.c
+++ b/sys/compat/freebsd/freebsd_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: freebsd_exec.c,v 1.15 2003/05/16 05:30:47 millert Exp $ */
+/* $OpenBSD: freebsd_exec.c,v 1.16 2004/04/15 00:22:42 tedu Exp $ */
/* $NetBSD: freebsd_exec.c,v 1.2 1996/05/18 16:02:08 christos Exp $ */
/*
@@ -55,7 +55,7 @@ extern char *freebsd_syscallnames[];
extern const char freebsd_emul_path[];
-struct emul emul_aout_freebsd = {
+struct emul emul_freebsd_aout = {
"freebsd",
NULL,
freebsd_sendsig,
@@ -75,7 +75,7 @@ struct emul emul_aout_freebsd = {
freebsd_esigcode,
};
-struct emul emul_elf_freebsd = {
+struct emul emul_freebsd_elf = {
"freebsd",
NULL,
freebsd_sendsig,
@@ -137,7 +137,7 @@ exec_freebsd_aout_makecmds(p, epp)
break;
}
if (error == 0)
- epp->ep_emul = &emul_aout_freebsd;
+ epp->ep_emul = &emul_freebsd_aout;
else
kill_vmcmds(&epp->ep_vmcmds);
@@ -145,6 +145,15 @@ exec_freebsd_aout_makecmds(p, epp)
}
int
+exec_freebsd_elf32_makecmds(struct proc *p, struct exec_package *epp)
+{
+ if (!(emul_freebsd_elf.e_flags & EMUL_ENABLED))
+ return (ENOEXEC);
+ return exec_elf32_makecmds(p, epp);
+
+}
+
+int
freebsd_elf_probe(p, epp, itp, pos, os)
struct proc *p;
struct exec_package *epp;
@@ -172,7 +181,7 @@ freebsd_elf_probe(p, epp, itp, pos, os)
return (error);
free(bp, M_TEMP);
}
- epp->ep_emul = &emul_elf_freebsd;
+ epp->ep_emul = &emul_freebsd_elf;
*pos = ELF32_NO_ADDR;
if (*os == OOS_NULL)
*os = OOS_FREEBSD;