summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c2
-rw-r--r--sys/compat/freebsd32/freebsd32_util.h4
-rw-r--r--sys/compat/ia32/ia32_sysvec.c17
3 files changed, 13 insertions, 10 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 3d52a5c..1fdde15 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$");
#include <compat/freebsd32/freebsd32.h>
#include <compat/freebsd32/freebsd32_proto.h>
-extern const char freebsd32_emul_path[];
-
/*
* [ taken from the linux emulator ]
* Search an alternate path before passing pathname arguments on
diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h
index c2672db..75f76ca 100644
--- a/sys/compat/freebsd32/freebsd32_util.h
+++ b/sys/compat/freebsd32/freebsd32_util.h
@@ -44,6 +44,10 @@ struct freebsd32_ps_strings {
int ps_nenvstr; /* the number of environment strings */
};
+#if defined(__amd64__) || defined(__ia64__)
+#include <compat/ia32/ia32_util.h>
+#endif
+
#define FREEBSD32_PS_STRINGS \
(FREEBSD32_USRSTACK - sizeof(struct freebsd32_ps_strings))
diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c
index a8426c9..5efb4d8 100644
--- a/sys/compat/ia32/ia32_sysvec.c
+++ b/sys/compat/ia32/ia32_sysvec.c
@@ -64,9 +64,9 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_object.h>
#include <vm/vm_extern.h>
-#include <amd64/ia32/ia32_util.h>
-#include <amd64/ia32/ia32_proto.h>
-#include <amd64/ia32/ia32_signal.h>
+#include <compat/freebsd32/freebsd32_util.h>
+#include <compat/freebsd32/freebsd32_proto.h>
+#include <compat/ia32/ia32_signal.h>
#include <machine/psl.h>
#include <machine/segments.h>
#include <machine/specialreg.h>
@@ -101,15 +101,16 @@ struct sysentvec ia32_freebsd_sysvec = {
MINSIGSTKSZ,
PAGE_SIZE,
0,
- IA32_USRSTACK,
- IA32_USRSTACK,
- IA32_PS_STRINGS,
+ FREEBSD32_USRSTACK,
+ FREEBSD32_USRSTACK,
+ FREEBSD32_PS_STRINGS,
VM_PROT_ALL,
ia32_copyout_strings,
ia32_setregs
};
+const char freebsd32_emul_path[] = "/compat/ia32";
static Elf32_Brandinfo ia32_brand_info = {
ELFOSABI_FREEBSD,
@@ -132,14 +133,14 @@ ia32_copyout_strings(struct image_params *imgp)
u_int32_t *vectp;
char *stringp, *destp;
u_int32_t *stack_base;
- struct ia32_ps_strings *arginfo;
+ struct freebsd32_ps_strings *arginfo;
int szsigcode;
/*
* Calculate string base and vector table pointers.
* Also deal with signal trampoline code for this exec type.
*/
- arginfo = (struct ia32_ps_strings *)IA32_PS_STRINGS;
+ arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS;
szsigcode = *(imgp->proc->p_sysent->sv_szsigcode);
destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE -
roundup((ARG_MAX - imgp->stringspace), sizeof(char *));
OpenPOWER on IntegriCloud