summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-11-05 10:41:35 +0000
committerobrien <obrien@FreeBSD.org>2000-11-05 10:41:35 +0000
commitc3b27201d1fa4f0149196757101c35192e8d247c (patch)
tree06093410ddc7b9a6576c1cff177b4583be027172
parentf95e798de355aef37ac46a3f764905a0d0b6c0e6 (diff)
downloadFreeBSD-src-c3b27201d1fa4f0149196757101c35192e8d247c.zip
FreeBSD-src-c3b27201d1fa4f0149196757101c35192e8d247c.tar.gz
ELF kernels should use an ELF sysvec. This allows us to move a.out
specific files to those platforms that acutally support a.out.
-rw-r--r--sys/conf/files3
-rw-r--r--sys/conf/files.i3863
-rw-r--r--sys/kern/imgact_elf.c2
-rw-r--r--sys/kern/init_main.c4
-rw-r--r--sys/sys/sysent.h1
5 files changed, 9 insertions, 4 deletions
diff --git a/sys/conf/files b/sys/conf/files
index a9e93bd..5a13ace 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -598,9 +598,7 @@ isofs/cd9660/cd9660_rrip.c optional cd9660
isofs/cd9660/cd9660_util.c optional cd9660
isofs/cd9660/cd9660_vfsops.c optional cd9660
isofs/cd9660/cd9660_vnops.c optional cd9660
-kern/imgact_aout.c standard
kern/imgact_elf.c standard
-kern/imgact_gzip.c optional gzip
kern/imgact_shell.c standard
kern/inflate.c optional gzip
kern/init_main.c standard
@@ -646,7 +644,6 @@ kern/kern_threads.c standard
kern/kern_time.c standard
kern/kern_timeout.c standard
kern/kern_xxx.c standard
-kern/link_aout.c standard
kern/link_elf.c standard
kern/md5c.c standard
kern/subr_autoconf.c standard
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 1ac09b9..493fa07 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -351,6 +351,9 @@ isa/psm.c optional psm
isa/sio.c count sio
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
+kern/imgact_aout.c standard
+kern/imgact_gzip.c optional gzip
+kern/link_aout.c standard
kern/subr_diskmbr.c standard
libkern/divdi3.c standard
libkern/moddi3.c standard
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 1ab4181..069bc9a 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -84,7 +84,7 @@ static int exec_elf_imgact __P((struct image_params *imgp));
static int elf_trace = 0;
SYSCTL_INT(_debug, OID_AUTO, elf_trace, CTLFLAG_RW, &elf_trace, 0, "");
-static struct sysentvec elf_freebsd_sysvec = {
+struct sysentvec elf_freebsd_sysvec = {
SYS_MAXSYSCALL,
sysent,
0,
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 344dac2..de702bc 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -295,7 +295,11 @@ proc0_init(void *dummy __unused)
session0.s_count = 1;
session0.s_leader = p;
+#ifdef __ELF__
+ p->p_sysent = &elf_freebsd_sysvec;
+#else
p->p_sysent = &aout_sysvec;
+#endif
p->p_flag = P_INMEM | P_SYSTEM;
p->p_stat = SRUN;
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index 15dbdbf..fc06f77 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -84,6 +84,7 @@ struct sysentvec {
#ifdef _KERNEL
extern struct sysentvec aout_sysvec;
+extern struct sysentvec elf_freebsd_sysvec;
extern struct sysent sysent[];
#define NO_SYSCALL (-1)
OpenPOWER on IntegriCloud