iBCS 940226
This commit is contained in:
parent
295ae241fe
commit
45601c8065
138
.depend
138
.depend
|
@ -1,7 +1,48 @@
|
|||
coff.o : coff.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
binfmt_coff.o : binfmt_coff.c /usr/include/linux/fs.h /usr/include/linux/linkage.h \
|
||||
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
|
||||
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/net.h \
|
||||
/usr/include/linux/socket.h /usr/include/linux/sockios.h /usr/include/linux/pipe_fs_i.h \
|
||||
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/ext2_fs_i.h \
|
||||
/usr/include/linux/hpfs_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
|
||||
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/xia_fs_i.h \
|
||||
/usr/include/linux/sysv_fs_i.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
|
||||
/usr/include/linux/ext2_fs_sb.h /usr/include/linux/hpfs_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
|
||||
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/xia_fs_sb.h \
|
||||
/usr/include/linux/sysv_fs_sb.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
/usr/include/asm/system.h /usr/include/linux/segment.h /usr/include/linux/head.h \
|
||||
/usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \
|
||||
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
|
||||
/usr/include/linux/mm.h /usr/include/linux/page.h /usr/include/linux/errno.h \
|
||||
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
|
||||
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
|
||||
/usr/include/linux/math_emu.h /usr/include/linux/mman.h /usr/include/linux/a.out.h \
|
||||
/usr/include/linux/binfmts.h /usr/include/linux/ptrace.h /usr/include/asm/segment.h \
|
||||
/usr/include/linux/string.h /usr/include/linux/fcntl.h /usr/include/linux/coff.h \
|
||||
/usr/include/linux/malloc.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \
|
||||
/usr/include/linux/personality.h /usr/include/linux/module.h
|
||||
binfmt_elf.o : binfmt_elf.c /usr/include/linux/fs.h /usr/include/linux/linkage.h \
|
||||
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
|
||||
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/net.h \
|
||||
/usr/include/linux/socket.h /usr/include/linux/sockios.h /usr/include/linux/pipe_fs_i.h \
|
||||
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/ext2_fs_i.h \
|
||||
/usr/include/linux/hpfs_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
|
||||
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/xia_fs_i.h \
|
||||
/usr/include/linux/sysv_fs_i.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
|
||||
/usr/include/linux/ext2_fs_sb.h /usr/include/linux/hpfs_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
|
||||
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/xia_fs_sb.h \
|
||||
/usr/include/linux/sysv_fs_sb.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
/usr/include/asm/system.h /usr/include/linux/segment.h /usr/include/linux/head.h \
|
||||
/usr/include/linux/mm.h /usr/include/linux/page.h /usr/include/linux/errno.h \
|
||||
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
|
||||
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
|
||||
/usr/include/linux/math_emu.h /usr/include/linux/mman.h /usr/include/linux/a.out.h \
|
||||
/usr/include/linux/binfmts.h /usr/include/linux/ptrace.h /usr/include/linux/string.h \
|
||||
/usr/include/linux/fcntl.h /usr/include/linux/malloc.h /usr/include/linux/config.h \
|
||||
/usr/include/linux/autoconf.h /usr/include/linux/shm.h /usr/include/linux/ipc.h \
|
||||
/usr/include/linux/personality.h /usr/include/asm/segment.h /usr/include/linux/module.h \
|
||||
/usr/include/linux/elf.h
|
||||
coff.o : coff.c /usr/include/linux/types.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
|
||||
/usr/include/linux/tasks.h /usr/include/asm/system.h /usr/include/linux/segment.h \
|
||||
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/linkage.h \
|
||||
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/dirent.h \
|
||||
/usr/include/linux/vfs.h /usr/include/linux/net.h /usr/include/linux/socket.h \
|
||||
/usr/include/linux/sockios.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
|
||||
/usr/include/linux/ext_fs_i.h /usr/include/linux/ext2_fs_i.h /usr/include/linux/hpfs_fs_i.h \
|
||||
|
@ -15,8 +56,25 @@ coff.o : coff.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/inclu
|
|||
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
|
||||
/usr/include/linux/stddef.h /usr/include/linux/unistd.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/fcntl.h \
|
||||
/usr/include/asm/segment.h /usr/include/linux/sys.h /usr/include/ibcs/ibcs.h \
|
||||
/usr/include/ibcs/trace.h
|
||||
/usr/include/asm/segment.h /usr/include/linux/sys.h /usr/include/linux/malloc.h \
|
||||
/usr/include/ibcs/ibcs.h
|
||||
emu.stub.o : emu.stub.c /usr/include/linux/errno.h /usr/include/linux/sched.h \
|
||||
/usr/include/linux/tasks.h /usr/include/asm/system.h /usr/include/linux/segment.h \
|
||||
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/linkage.h \
|
||||
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
|
||||
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/net.h \
|
||||
/usr/include/linux/socket.h /usr/include/linux/sockios.h /usr/include/linux/pipe_fs_i.h \
|
||||
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/ext2_fs_i.h \
|
||||
/usr/include/linux/hpfs_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
|
||||
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/xia_fs_i.h \
|
||||
/usr/include/linux/sysv_fs_i.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
|
||||
/usr/include/linux/ext2_fs_sb.h /usr/include/linux/hpfs_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
|
||||
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/xia_fs_sb.h \
|
||||
/usr/include/linux/sysv_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/page.h \
|
||||
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
|
||||
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
|
||||
/usr/include/linux/math_emu.h /usr/include/linux/stddef.h /usr/include/linux/unistd.h \
|
||||
/usr/include/linux/ptrace.h /usr/include/asm/segment.h
|
||||
emulate.o : emulate.c /usr/include/linux/errno.h /usr/include/linux/sched.h \
|
||||
/usr/include/linux/tasks.h /usr/include/asm/system.h /usr/include/linux/segment.h \
|
||||
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/linkage.h \
|
||||
|
@ -35,27 +93,9 @@ emulate.o : emulate.c /usr/include/linux/errno.h /usr/include/linux/sched.h \
|
|||
/usr/include/linux/math_emu.h /usr/include/linux/stddef.h /usr/include/linux/unistd.h \
|
||||
/usr/include/linux/ptrace.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \
|
||||
/usr/include/linux/fcntl.h /usr/include/asm/segment.h /usr/include/linux/sys.h \
|
||||
/usr/include/linux/personality.h /usr/include/ibcs/ibcs.h /usr/include/ibcs/abi4.h \
|
||||
/usr/include/ibcs/trace.h /usr/include/ibcs/xnx.h callmap.inc
|
||||
fcntl.o : fcntl.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
/usr/include/asm/system.h /usr/include/linux/segment.h /usr/include/linux/head.h \
|
||||
/usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \
|
||||
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
|
||||
/usr/include/linux/vfs.h /usr/include/linux/net.h /usr/include/linux/socket.h \
|
||||
/usr/include/linux/sockios.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
|
||||
/usr/include/linux/ext_fs_i.h /usr/include/linux/ext2_fs_i.h /usr/include/linux/hpfs_fs_i.h \
|
||||
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
|
||||
/usr/include/linux/nfs.h /usr/include/linux/xia_fs_i.h /usr/include/linux/sysv_fs_i.h \
|
||||
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/ext2_fs_sb.h \
|
||||
/usr/include/linux/hpfs_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
|
||||
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/xia_fs_sb.h /usr/include/linux/sysv_fs_sb.h \
|
||||
/usr/include/linux/mm.h /usr/include/linux/page.h /usr/include/linux/kernel.h \
|
||||
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
|
||||
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
|
||||
/usr/include/linux/stddef.h /usr/include/linux/unistd.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/asm/segment.h \
|
||||
/usr/include/linux/sys.h /usr/include/linux/ipc.h /usr/include/linux/sem.h /usr/include/linux/string.h \
|
||||
/usr/include/linux/fcntl.h /usr/include/ibcs/ibcs.h /usr/include/ibcs/trace.h
|
||||
/usr/include/linux/personality.h /usr/include/linux/binfmts.h /usr/include/linux/module.h \
|
||||
/usr/include/ibcs/ibcs.h /usr/include/ibcs/abi4.h /usr/include/ibcs/xnx.h callmap.inc \
|
||||
errmap.inc
|
||||
ioctl.o : ioctl.c /usr/include/linux/errno.h /usr/include/linux/stat.h /usr/include/linux/fs.h \
|
||||
/usr/include/linux/linkage.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
|
||||
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
|
||||
|
@ -126,6 +166,7 @@ open.o : open.c /usr/include/linux/vfs.h /usr/include/linux/types.h /usr/include
|
|||
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
|
||||
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
|
||||
/usr/include/linux/math_emu.h /usr/include/linux/tty.h /usr/include/linux/termios.h \
|
||||
/usr/include/linux/malloc.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \
|
||||
/usr/include/asm/segment.h /usr/include/ibcs/ibcs.h /usr/include/linux/sys.h \
|
||||
/usr/include/linux/ptrace.h
|
||||
signal.o : signal.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
|
@ -145,9 +186,30 @@ signal.o : signal.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/i
|
|||
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
|
||||
/usr/include/linux/stddef.h /usr/include/linux/unistd.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/fcntl.h \
|
||||
/usr/include/asm/segment.h /usr/include/linux/sys.h /usr/include/ibcs/ibcs.h \
|
||||
/usr/include/ibcs/trace.h /usr/include/ibcs/xnx.h /usr/include/signal.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/sys/types.h
|
||||
/usr/include/linux/personality.h /usr/include/asm/segment.h /usr/include/linux/sys.h \
|
||||
/usr/include/ibcs/ibcs.h /usr/include/ibcs/trace.h /usr/include/ibcs/xnx.h /usr/include/ibcs/abi4.h \
|
||||
/usr/include/signal.h /usr/include/features.h /usr/include/sys/cdefs.h /usr/include/sys/types.h
|
||||
socksys.o : socksys.c /usr/include/linux/types.h /usr/include/linux/errno.h \
|
||||
/usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \
|
||||
/usr/include/linux/wait.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
|
||||
/usr/include/linux/net.h /usr/include/linux/socket.h /usr/include/linux/sockios.h \
|
||||
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
|
||||
/usr/include/linux/ext2_fs_i.h /usr/include/linux/hpfs_fs_i.h /usr/include/linux/msdos_fs_i.h \
|
||||
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
|
||||
/usr/include/linux/xia_fs_i.h /usr/include/linux/sysv_fs_i.h /usr/include/linux/minix_fs_sb.h \
|
||||
/usr/include/linux/ext_fs_sb.h /usr/include/linux/ext2_fs_sb.h /usr/include/linux/hpfs_fs_sb.h \
|
||||
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
|
||||
/usr/include/linux/xia_fs_sb.h /usr/include/linux/sysv_fs_sb.h /usr/include/linux/fcntl.h \
|
||||
/usr/include/linux/major.h /usr/include/asm/segment.h /usr/include/linux/kernel.h \
|
||||
/usr/include/linux/sched.h /usr/include/linux/tasks.h /usr/include/asm/system.h \
|
||||
/usr/include/linux/segment.h /usr/include/linux/head.h /usr/include/linux/mm.h \
|
||||
/usr/include/linux/page.h /usr/include/linux/signal.h /usr/include/linux/time.h \
|
||||
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
|
||||
/usr/include/linux/math_emu.h /usr/include/linux/sockfunc.h /usr/include/linux/utsname.h \
|
||||
/usr/include/linux/termios.h /usr/include/linux/sys.h /usr/include/linux/config.h \
|
||||
/usr/include/linux/autoconf.h /usr/include/ibcs/ibcs.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/module.h socksys.h /usr/include/linux/route.h /usr/include/linux/if.h \
|
||||
/usr/include/linux/if_arp.h
|
||||
stat.o : stat.c /usr/include/linux/errno.h /usr/include/linux/stat.h /usr/include/linux/fs.h \
|
||||
/usr/include/linux/linkage.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
|
||||
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
|
||||
|
@ -239,7 +301,7 @@ ulimit.o : ulimit.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/i
|
|||
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
|
||||
/usr/include/linux/stddef.h /usr/include/linux/unistd.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/asm/segment.h \
|
||||
/usr/include/linux/sys.h
|
||||
/usr/include/linux/sys.h /usr/include/ibcs/ibcs.h /usr/include/ibcs/trace.h
|
||||
wysev386.o : wysev386.c /usr/include/asm/segment.h /usr/include/linux/mm.h /usr/include/linux/page.h \
|
||||
/usr/include/linux/sched.h /usr/include/linux/tasks.h /usr/include/asm/system.h \
|
||||
/usr/include/linux/segment.h /usr/include/linux/head.h /usr/include/linux/fs.h \
|
||||
|
@ -257,6 +319,11 @@ wysev386.o : wysev386.c /usr/include/asm/segment.h /usr/include/linux/mm.h /usr/
|
|||
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
|
||||
/usr/include/linux/kernel.h /usr/include/linux/utsname.h /usr/include/linux/sys.h \
|
||||
/usr/include/ibcs/ibcs.h /usr/include/linux/ptrace.h
|
||||
wysev386i.o : wysev386i.c /usr/include/linux/types.h /usr/include/linux/errno.h \
|
||||
/usr/include/linux/sockios.h /usr/include/linux/kernel.h /usr/include/ibcs/ibcs.h \
|
||||
/usr/include/linux/sys.h /usr/include/linux/ptrace.h /usr/include/linux/signal.h \
|
||||
/usr/include/ibcs/trace.h /usr/include/ibcs/wysev386i.h /usr/include/linux/route.h \
|
||||
/usr/include/linux/if.h /usr/include/linux/socket.h /usr/include/linux/if_arp.h
|
||||
xnx.o : xnx.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/tasks.h \
|
||||
/usr/include/asm/system.h /usr/include/linux/segment.h /usr/include/linux/head.h \
|
||||
/usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \
|
||||
|
@ -274,11 +341,12 @@ xnx.o : xnx.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include
|
|||
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
|
||||
/usr/include/linux/stddef.h /usr/include/linux/unistd.h /usr/include/linux/ptrace.h \
|
||||
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/fcntl.h \
|
||||
/usr/include/asm/segment.h /usr/include/linux/sys.h /usr/include/ibcs/xnx.h
|
||||
xstat.o : xstat.c /usr/include/linux/kernel.h /usr/include/linux/linkage.h /usr/include/sys/types.h \
|
||||
/usr/include/linux/types.h /usr/include/sys/stat.h /usr/include/features.h /usr/include/sys/cdefs.h \
|
||||
/usr/include/linux/stat.h /usr/include/sys/time.h /usr/include/linux/time.h \
|
||||
/usr/include/time.h /usr/include/asm/segment.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
|
||||
/usr/include/asm/segment.h /usr/include/linux/sys.h /usr/include/linux/termios.h \
|
||||
/usr/include/ibcs/ibcs.h /usr/include/ibcs/xnx.h
|
||||
xstat.o : xstat.c /usr/include/linux/kernel.h /usr/include/sys/types.h /usr/include/linux/types.h \
|
||||
/usr/include/sys/stat.h /usr/include/features.h /usr/include/sys/cdefs.h /usr/include/linux/stat.h \
|
||||
/usr/include/sys/time.h /usr/include/linux/time.h /usr/include/time.h /usr/include/asm/segment.h \
|
||||
/usr/include/linux/fs.h /usr/include/linux/linkage.h /usr/include/linux/limits.h \
|
||||
/usr/include/linux/wait.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
|
||||
/usr/include/linux/net.h /usr/include/linux/socket.h /usr/include/linux/sockios.h \
|
||||
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
|
||||
|
|
12
ChangeLog
12
ChangeLog
|
@ -1,5 +1,17 @@
|
|||
25 February 1994
|
||||
|
||||
* Pedantic change to call maps so that IBCS_function contains
|
||||
a void * instead of a function pointer - we cast it as
|
||||
necessary later in emulate.c. The warning were annoying me.
|
||||
|
||||
* Moved struct abi_sigaction from signal.c to abi4.h so it is
|
||||
available for prototype declarations. Changed prototype for
|
||||
abi_sigsuspend to correspond to implementation in signal.c.
|
||||
-- Mike
|
||||
|
||||
* Reversed out Eric's earlier signal patches and added new ones.
|
||||
-- Mike
|
||||
|
||||
* Updated trace code and trace control program to be useful.
|
||||
Control of tracing individual functions is still not there
|
||||
yet - perhaps another day.
|
||||
|
|
83
HOWTO
83
HOWTO
|
@ -1,4 +1,4 @@
|
|||
$Id: HOWTO,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
$Id: HOWTO,v 1.2 1994/02/28 09:15:25 mike Exp $
|
||||
$Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/Attic/HOWTO,v $
|
||||
|
||||
LICENSE (well, sort of . . . .)
|
||||
|
@ -6,7 +6,9 @@ LICENSE (well, sort of . . . .)
|
|||
This is development level code. It is assumed that you received this code
|
||||
in good faith and that you will honor the trust placed in you by the
|
||||
developers. Specifically, please do no reveal the location to the development
|
||||
code to usenet (newsgroups).
|
||||
code to usenet (newsgroups). If you wish to respond to a message requesting
|
||||
this data, the best solution is to invite them to join the mail list and give
|
||||
them short instructions on how to do that.
|
||||
|
||||
Do not post problems anywhere except the mailing list. Problems about this code
|
||||
will not be answered if they are received by any other means.
|
||||
|
@ -30,16 +32,32 @@ release.
|
|||
MAILING LIST
|
||||
|
||||
Since you had previously joined the mailing list to find the location of the
|
||||
development code, this is only documetated for the sake of being complete.
|
||||
development code, this is only documented for the sake of being complete.
|
||||
|
||||
The mail list for this project is located at: linux-activists@joker.cs.hut.fi.
|
||||
Please send all messages to this location. Either include in the header
|
||||
or as the first line of the message the following:
|
||||
|
||||
X-Mn-Key: IBSC2
|
||||
X-Mn-Key: IBCS2
|
||||
|
||||
[Note, the mail list name is being changed to IBCS2. If the IBSC2 location does
|
||||
not work, then use the new name of IBCS2.]
|
||||
[This list _was_ called IBSC2. The list has been renamed.]
|
||||
|
||||
|
||||
|
||||
CODE LOCATION
|
||||
|
||||
Since you obtained this file, you probably know the code location. However,
|
||||
to be complete, let me state it here as well:
|
||||
|
||||
The project code is kept in the directory
|
||||
/pub/linux/ALPHA/ibcs2/private/.devel on the system tsx-11.mit.edu.
|
||||
|
||||
This directory is "world-writable". This means that you can use ftp to "put"
|
||||
as well as "get". Files up-loaded to this directory must be made readable. If
|
||||
you wish to contribute something to the group, then please put the file on
|
||||
tsx-11 and send a message to either Eric Youndale (eric@tantalus.nrl.navy.mil)
|
||||
or Drew Sullivan and they will make them readable to the world. After that,
|
||||
it is a good idea to announce the up-load to the mail list.
|
||||
|
||||
|
||||
|
||||
|
@ -86,27 +104,32 @@ to /linux/ibcs. This file should then be called /linux/ibcs/HOWTO.
|
|||
ln -s /linux/ibcs /usr/include/ibcs
|
||||
|
||||
|
||||
3. Apply the patches to the kernel.
|
||||
3. Apply the patches to the kernel (if any supplied).
|
||||
|
||||
Tools/apply-patches
|
||||
patch -p0 < kernel.patch
|
||||
|
||||
The patches included are for the original ALPHA-pl15h (or later) kernel. If
|
||||
you have a patched kernel for some other reason, then they will not apply
|
||||
cleanly. You may either obtain an "un-patched" kernel from nic.funet.fi or
|
||||
correct the patches by hand. Hopefully, they will not be major.
|
||||
|
||||
4. Change ibcs.h to decide if you want to be SCO or SysVr4 compatible.
|
||||
This will change when we figure out how to do it dynamically.
|
||||
4. Make the kernel. If you have answered 'y' to the iBCS support question
|
||||
during the 'make config' for the kernel the iBCS emulator will be linked
|
||||
to the kernel. If you answered 'n' then the kernel will be built with
|
||||
hooks for the iBCS loadable module to attach itself and the iBCS loadable
|
||||
module will be created in the ibcs directory. It is recommended that you
|
||||
get the modutils tools and use the loadable module rather than linking
|
||||
to the kernel.
|
||||
|
||||
#define SCO_COMPAT 1 /* 0 if SysVr4 compatible */
|
||||
|
||||
|
||||
5. Make the kernel. The emulator is used if you select either the COFF
|
||||
or ELF object file formats. (If you select both, the you will get the
|
||||
emulator as well.)
|
||||
|
||||
Instructions on how to make the kernel are include in the /linux/README
|
||||
Instructions on how to make the kernel are included in the /linux/README
|
||||
file.
|
||||
|
||||
6. Install the kernel. Use either LILO or a separate diskette.
|
||||
5. Install the kernel. Use either LILO or a separate diskette.
|
||||
|
||||
7. Boot that version of the kernel.
|
||||
6. Boot that version of the kernel.
|
||||
|
||||
7. If you are using the loadable module version of the iBCS emulator
|
||||
load it using 'insmod iBCS'.
|
||||
|
||||
8. Run the SCO or iBCS2 programs.
|
||||
|
||||
|
@ -115,7 +138,7 @@ file.
|
|||
UTILITIES
|
||||
|
||||
The emulator has the ability to trace the events which it processes. The
|
||||
program to enable the tracing funcition is contained in the Tools directory.
|
||||
program to enable the tracing function is contained in the Tools directory.
|
||||
|
||||
To make the trace utility, go to the Tools directory and enter the command:
|
||||
|
||||
|
@ -155,16 +178,26 @@ Linux. They are specific to the SCO system. It is probably not much of
|
|||
concern as the three libraries listed above are the only ones which are
|
||||
specified in iBCS specification.
|
||||
|
||||
The source for the libc_s library is in the development directory on
|
||||
tsx-11.mit.edu. Instructions on building the library are in that package.
|
||||
At this time, the library will build but the test programs which I am using
|
||||
do not run. So, until I can get the programs run run correctly, stick with
|
||||
the SCO (or whatever) library that you have.
|
||||
|
||||
|
||||
LIMITATIONS
|
||||
|
||||
Until the network services shared library is implemented, the network
|
||||
programs probably will not work.
|
||||
programs probably will not work. There is some network code in the emulator.
|
||||
This allows the Wyse iBCS system to work with the network. If you wish to
|
||||
try other systems, then please do so. A lot of work has been done in the
|
||||
network area as far as the emulator is concerned. Please let us know about
|
||||
the results.
|
||||
|
||||
Until the X library is implemented, any X windows application _will_not_work_
|
||||
on this system. Even if you use the SCO system's version, there is no hope
|
||||
of getting it to work under Linux.
|
||||
Until the X library is implemented, X windows applications _probably_will_
|
||||
_not_work_ on this system. Mike Jagdis has reported that he can get the X
|
||||
version of WordPerfect to work on his system. It does not use shared
|
||||
libraries. There is hope. :-)
|
||||
|
||||
|
||||
|
||||
|
|
94
Makefile
94
Makefile
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Makefile for the iBCS emulator files
|
||||
#
|
||||
# $Id: Makefile,v 1.1 1994/02/10 09:31:21 mike Exp $
|
||||
# $Id: Makefile,v 1.2 1994/02/28 09:15:26 mike Exp $
|
||||
# $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/Makefile,v $
|
||||
#
|
||||
# Note! Dependencies are done automagically by 'make dep', which also
|
||||
|
@ -9,12 +9,54 @@
|
|||
# unless it's something special (ie not a .c file).
|
||||
#
|
||||
# Note 2! The CFLAGS definitions are now in the main makefile...
|
||||
#
|
||||
# Feb 14 1994
|
||||
# Dual mode. If iBCS support is configured in to the kernel and this
|
||||
# source replaces the ibcs in the standard distribution an ibcs.o
|
||||
# will be built and linked with the kernel. If iBCS support isn't
|
||||
# configured in to the kernel then a loadable module is built which
|
||||
# can be attached to the iBCS interface stubs in the kernel. Using the
|
||||
# loadable module form of iBCS emulation introduces a small overhead
|
||||
# (a variable read and function call) on each system call.
|
||||
# -- Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
|
||||
|
||||
# CONFIGURATION SECTION
|
||||
|
||||
# SOCKSYS_MAJOR is the major number to use for the /dev/socksys socket
|
||||
# interface to streams based TCP/IP (i.e. Lachman as used by many SVR3s).
|
||||
# Setting this to zero tells the module initialisation code to attempt
|
||||
# to auto allocate the next available major number. This is not currently
|
||||
# supported by any kernel known, so don't do it!
|
||||
# You also need to create the file /dev/socksys with mknod, e.g.:
|
||||
# mknod /dev/socksys c <n> 0
|
||||
# where <n> is the chosen major number.
|
||||
SOCKSYS_MAJOR=30
|
||||
|
||||
# The following compile time options are available:
|
||||
#
|
||||
# -DIBCS_TRACE Add code to trace the iBCS emulator.
|
||||
#
|
||||
# -DVERBOSE_ERRORS Give textual error message as well as number in
|
||||
# the trace log. (This only makes sense if IBCS_TRACE
|
||||
# is also defined)
|
||||
#
|
||||
# -DSOCKSYS_DEBUG Give some useful(?) information from the socksys
|
||||
# driver.
|
||||
OPTIONS=-DIBCS_TRACE -DVERBOSE_ERRORS -DSOCKSYS_DEBUG
|
||||
|
||||
# END CONFIGURATION SECTION
|
||||
|
||||
|
||||
ifeq (${CFLAGS},)
|
||||
CFLAGS = -D__KERNEL__=1 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486
|
||||
CFLAGS = -D__KERNEL__=1 \
|
||||
-Wall -Wstrict-prototypes \
|
||||
-O2 -fomit-frame-pointer -m486 \
|
||||
-DSOCKSYS_MAJOR=$(SOCKSYS_MAJOR) \
|
||||
$(OPTIONS)
|
||||
endif
|
||||
|
||||
include /linux/.config
|
||||
include /usr/src/linux/.config
|
||||
|
||||
.S.s:
|
||||
$(CPP) -traditional $< -o $*.s
|
||||
|
@ -25,43 +67,37 @@ include /linux/.config
|
|||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
OBJS = emulate.o
|
||||
OTHER_OBJ = coff.o fcntl.o ioctl.o ipc.o mmap.o open.o \
|
||||
signal.o stat.o sysconf.o sysfs.o sysi86.o \
|
||||
OBJS = binfmt_coff.o binfmt_elf.o coff.o ioctl.o ipc.o mmap.o open.o \
|
||||
signal.o stat.o sysconf.o sysfs.o sysi86.o socksys.o \
|
||||
ulimit.o wysev386.o wysev386i.o xnx.o xstat.o
|
||||
OBJS_CODE =
|
||||
|
||||
#
|
||||
# If the IBCS flag is set then include the other modules
|
||||
ifdef CONFIG_IBCS
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
#
|
||||
# IBCS will be used if ELF object format is allowed
|
||||
ifdef CONFIG_BINFMT_ELF
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
#
|
||||
# IBCS will be used if COFF object format is allowed
|
||||
ifdef CONFIG_BINFMT_COFF
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
|
||||
OBJS := $(OBJS) $(OBJS_CODE)
|
||||
ifdef CONFIG_BINFMT_IBCS
|
||||
all: ibcs.o
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
ibcs.o: $(OBJS)
|
||||
$(LD) -r -o ibcs.o $(OBJS)
|
||||
ibcs.o: emulate.o $(OBJS)
|
||||
$(LD) -r -o ibcs.o emulate.o $(OBJS)
|
||||
sync
|
||||
else
|
||||
all: ibcs.o iBCS
|
||||
|
||||
ibcs.o: emu.stub.o
|
||||
$(LD) -r -o ibcs.o emu.stub.o
|
||||
|
||||
iBCS: emulate2.o $(OBJS)
|
||||
$(LD) -r -o iBCS emulate2.o $(OBJS)
|
||||
endif
|
||||
|
||||
emulate2.o: emulate.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-DKVERSION=\"`uname -r`\" \
|
||||
-c -o emulate2.o emulate.c
|
||||
|
||||
clean:
|
||||
rm -f core *.o *.a *.s
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
|
||||
|
||||
dep:
|
||||
$(CPP) -M *.c > .depend
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep) || exit; done
|
||||
|
||||
dummy:
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@ iBCS module to be loaded by a standard kernel.
|
|||
This patch file is annotated. If you need to apply this you ought to
|
||||
read it first!
|
||||
|
||||
This patch file creates some new header files. To get them in the
|
||||
correct place you should be using 'patch -p0' or 'patch -p1' if you
|
||||
are in the linux source directory already.
|
||||
|
||||
|
||||
===========================================================================
|
||||
|
||||
|
@ -26,8 +30,8 @@ diff -u --unidirectional-new-file --recursive -X xxx /var/linux/config.in linux/
|
|||
*
|
||||
* Program binary formats
|
||||
*
|
||||
-bool 'Elf executables' CONFIG_BINFMT_ELF n
|
||||
-bool 'COFF executables' CONFIG_BINFMT_COFF n
|
||||
-bool 'Elf executables' CONFIG_BINFMT_ELF y
|
||||
-bool 'COFF executables' CONFIG_BINFMT_COFF y
|
||||
+bool 'Elf/COFF executables' CONFIG_BINFMT_IBCS n
|
||||
*
|
||||
* SCSI support
|
||||
|
@ -69,7 +73,7 @@ diff -u --unidirectional-new-file --recursive -X xxx /var/linux/fs/Makefile linu
|
|||
(SVR3 vendors tend to extend the base SVR3 set with their own
|
||||
without following any particular standard - symlinks support is
|
||||
a common problem). The "personality" can also be used to emulate
|
||||
lower level kernel "feature". <evil laugh>
|
||||
lower level kernel "features". <evil laugh>
|
||||
|
||||
============================================================================
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
--- signal.c.orig Fri Feb 18 17:01:25 1994
|
||||
+++ signal.c Fri Feb 25 09:59:27 1994
|
||||
These patches are the kernel side of Eric's signal changes. These should
|
||||
be applied *in addition* to and *after* the patches in kernel.patch.
|
||||
|
||||
|
||||
===========================================================================
|
||||
|
||||
--- linux/kernel/signal.c.orig Fri Feb 18 17:01:25 1994
|
||||
+++ linux/kernel/signal.c Fri Feb 25 09:59:27 1994
|
||||
@@ -137,7 +137,7 @@
|
||||
* isn't actually ignored, but does automatic child reaping, while
|
||||
* SIG_DFL is explicitly said by POSIX to force the signal to be ignored..
|
||||
|
@ -30,9 +36,9 @@
|
|||
put_fs_long(regs->gs, frame+2);
|
||||
put_fs_long(regs->fs, frame+3);
|
||||
put_fs_long(regs->es, frame+4);
|
||||
--- ksyms.S.orig Fri Feb 25 09:59:57 1994
|
||||
+++ ksyms.S Fri Feb 25 09:55:42 1994
|
||||
@@ -35,6 +35,7 @@
|
||||
--- linux/kernel/ksyms.S.orig Wed Feb 23 11:01:32 1994
|
||||
+++ linux/kernel/ksyms.S Sat Feb 26 11:57:30 1994
|
||||
@@ -35,15 +35,18 @@
|
||||
# compiled in.
|
||||
#
|
||||
_change_ldt
|
||||
|
@ -40,7 +46,10 @@
|
|||
_copy_strings
|
||||
_create_tables
|
||||
_do_execve
|
||||
@@ -44,6 +45,7 @@
|
||||
_do_mmap
|
||||
+_do_signal
|
||||
_file_systems
|
||||
_flush_old_exec
|
||||
_formats
|
||||
_getname
|
||||
_iABI_hook
|
||||
|
|
BIN
Tools/trace
BIN
Tools/trace
Binary file not shown.
|
@ -6,7 +6,7 @@
|
|||
* to grow...
|
||||
* Copyright (C) 1994 Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
*
|
||||
* $Id: trace.c,v 1.2 1994/02/25 17:28:42 mike Exp $
|
||||
* $Id: trace.c,v 1.3 1994/02/28 09:15:41 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/Tools/trace.c,v $
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
@ -16,18 +16,32 @@
|
|||
#include <ibcs/trace.h>
|
||||
|
||||
|
||||
int set_trace(int val)
|
||||
static int
|
||||
set_trace(int val)
|
||||
{
|
||||
int res;
|
||||
|
||||
__asm__ volatile ("mov\t$0x00FF,%%eax\n\t" \
|
||||
".byte\t0x9a,0,0,0,0,7,0\n\t" \
|
||||
__asm__ volatile ("mov\t$0x00FF,%%eax\n\t"
|
||||
".byte\t0x9a,0,0,0,0,7,0\n\t"
|
||||
: "=a" (res));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
trace_func_set(int per, int call, int val)
|
||||
{
|
||||
int res;
|
||||
|
||||
__asm__ volatile ("mov\t$0x01FF,%%eax\n\t"
|
||||
".byte\t0x9a,0,0,0,0,7,0\n\t"
|
||||
: "=a" (res));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
struct t_code {
|
||||
char *name;
|
||||
int code;
|
||||
|
@ -63,12 +77,20 @@ usage(void)
|
|||
{
|
||||
int i;
|
||||
|
||||
fprintf(stderr,"usage: trace [n]\n"
|
||||
" or [+|-]name - where name could be:\n"
|
||||
fprintf(stderr,
|
||||
"usage: trace n - set trace code to n\n"
|
||||
" or p,n - query tracing for syscall n under personality p\n"
|
||||
" or p,n,[0|1] - set/clear tracing for syscall n under personality p\n"
|
||||
" or [+|-]code - where code could be:\n"
|
||||
" query\n"
|
||||
" off\n");
|
||||
|
||||
for (i=0; i<sizeof(codes)/sizeof(codes[0]); i++)
|
||||
fprintf(stderr, " %s\n", codes[i].name);
|
||||
|
||||
fprintf(stderr, "\n"
|
||||
"WARNING: This is a debugging tool *only*. It is not robust.\n"
|
||||
" Passing bad values can cause iBCS/kernel crashes!\n");
|
||||
}
|
||||
|
||||
|
||||
|
@ -93,13 +115,36 @@ main(int argc, char *argv[])
|
|||
} else if (argv[i][0] == '-') {
|
||||
trace_val &= (~get_code(argv[i]+1));
|
||||
} else {
|
||||
char *endp = NULL;
|
||||
int t = strtoul(argv[i], &endp, 0);
|
||||
int n;
|
||||
long a1,a2,a3;
|
||||
|
||||
if (endp && *endp == '\0')
|
||||
trace_val = t;
|
||||
else
|
||||
trace_val |= get_code(argv[i]);
|
||||
n = sscanf(argv[i], "%li,%li,%li", &a1, &a2, &a3);
|
||||
switch (n) {
|
||||
case 1: /* Single value is a trace code */
|
||||
trace_val = a1;
|
||||
break;
|
||||
|
||||
case 2: /* Two arguments is a syscall query */
|
||||
a3 = -1;
|
||||
/* and drop through... */
|
||||
|
||||
case 3: /* Three arguments is a syscall set */
|
||||
n = trace_func_set(a1, a2, a3);
|
||||
if (n > 0)
|
||||
printf("personality %d, syscall 0x%x - tracing enabled\n",
|
||||
a1, a2);
|
||||
else if (n == 0)
|
||||
printf("personality %d, syscall 0x%x - tracing disabled\n",
|
||||
a1, a2);
|
||||
else
|
||||
printf("personality %d, syscall 0x%x - no such call/personality\n",
|
||||
a1, a2);
|
||||
break;
|
||||
|
||||
default: /* could be a text code */
|
||||
trace_val |= get_code(argv[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Makefile for the iBCS emulator files
|
||||
#
|
||||
# $Id: Makefile,v 1.1 1994/02/10 09:31:21 mike Exp $
|
||||
# $Id: Makefile,v 1.2 1994/02/28 09:15:26 mike Exp $
|
||||
# $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/iBCSemul/Makefile,v $
|
||||
#
|
||||
# Note! Dependencies are done automagically by 'make dep', which also
|
||||
|
@ -9,12 +9,54 @@
|
|||
# unless it's something special (ie not a .c file).
|
||||
#
|
||||
# Note 2! The CFLAGS definitions are now in the main makefile...
|
||||
#
|
||||
# Feb 14 1994
|
||||
# Dual mode. If iBCS support is configured in to the kernel and this
|
||||
# source replaces the ibcs in the standard distribution an ibcs.o
|
||||
# will be built and linked with the kernel. If iBCS support isn't
|
||||
# configured in to the kernel then a loadable module is built which
|
||||
# can be attached to the iBCS interface stubs in the kernel. Using the
|
||||
# loadable module form of iBCS emulation introduces a small overhead
|
||||
# (a variable read and function call) on each system call.
|
||||
# -- Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
|
||||
|
||||
# CONFIGURATION SECTION
|
||||
|
||||
# SOCKSYS_MAJOR is the major number to use for the /dev/socksys socket
|
||||
# interface to streams based TCP/IP (i.e. Lachman as used by many SVR3s).
|
||||
# Setting this to zero tells the module initialisation code to attempt
|
||||
# to auto allocate the next available major number. This is not currently
|
||||
# supported by any kernel known, so don't do it!
|
||||
# You also need to create the file /dev/socksys with mknod, e.g.:
|
||||
# mknod /dev/socksys c <n> 0
|
||||
# where <n> is the chosen major number.
|
||||
SOCKSYS_MAJOR=30
|
||||
|
||||
# The following compile time options are available:
|
||||
#
|
||||
# -DIBCS_TRACE Add code to trace the iBCS emulator.
|
||||
#
|
||||
# -DVERBOSE_ERRORS Give textual error message as well as number in
|
||||
# the trace log. (This only makes sense if IBCS_TRACE
|
||||
# is also defined)
|
||||
#
|
||||
# -DSOCKSYS_DEBUG Give some useful(?) information from the socksys
|
||||
# driver.
|
||||
OPTIONS=-DIBCS_TRACE -DVERBOSE_ERRORS -DSOCKSYS_DEBUG
|
||||
|
||||
# END CONFIGURATION SECTION
|
||||
|
||||
|
||||
ifeq (${CFLAGS},)
|
||||
CFLAGS = -D__KERNEL__=1 -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486
|
||||
CFLAGS = -D__KERNEL__=1 \
|
||||
-Wall -Wstrict-prototypes \
|
||||
-O2 -fomit-frame-pointer -m486 \
|
||||
-DSOCKSYS_MAJOR=$(SOCKSYS_MAJOR) \
|
||||
$(OPTIONS)
|
||||
endif
|
||||
|
||||
include /linux/.config
|
||||
include /usr/src/linux/.config
|
||||
|
||||
.S.s:
|
||||
$(CPP) -traditional $< -o $*.s
|
||||
|
@ -25,43 +67,37 @@ include /linux/.config
|
|||
.c.o:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
||||
OBJS = emulate.o
|
||||
OTHER_OBJ = coff.o fcntl.o ioctl.o ipc.o mmap.o open.o \
|
||||
signal.o stat.o sysconf.o sysfs.o sysi86.o \
|
||||
OBJS = binfmt_coff.o binfmt_elf.o coff.o ioctl.o ipc.o mmap.o open.o \
|
||||
signal.o stat.o sysconf.o sysfs.o sysi86.o socksys.o \
|
||||
ulimit.o wysev386.o wysev386i.o xnx.o xstat.o
|
||||
OBJS_CODE =
|
||||
|
||||
#
|
||||
# If the IBCS flag is set then include the other modules
|
||||
ifdef CONFIG_IBCS
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
#
|
||||
# IBCS will be used if ELF object format is allowed
|
||||
ifdef CONFIG_BINFMT_ELF
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
#
|
||||
# IBCS will be used if COFF object format is allowed
|
||||
ifdef CONFIG_BINFMT_COFF
|
||||
OBJS_CODE = $(OTHER_OBJ)
|
||||
endif
|
||||
|
||||
OBJS := $(OBJS) $(OBJS_CODE)
|
||||
ifdef CONFIG_BINFMT_IBCS
|
||||
all: ibcs.o
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
ibcs.o: $(OBJS)
|
||||
$(LD) -r -o ibcs.o $(OBJS)
|
||||
ibcs.o: emulate.o $(OBJS)
|
||||
$(LD) -r -o ibcs.o emulate.o $(OBJS)
|
||||
sync
|
||||
else
|
||||
all: ibcs.o iBCS
|
||||
|
||||
ibcs.o: emu.stub.o
|
||||
$(LD) -r -o ibcs.o emu.stub.o
|
||||
|
||||
iBCS: emulate2.o $(OBJS)
|
||||
$(LD) -r -o iBCS emulate2.o $(OBJS)
|
||||
endif
|
||||
|
||||
emulate2.o: emulate.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-DKVERSION=\"`uname -r`\" \
|
||||
-c -o emulate2.o emulate.c
|
||||
|
||||
clean:
|
||||
rm -f core *.o *.a *.s
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean); done
|
||||
|
||||
dep:
|
||||
$(CPP) -M *.c > .depend
|
||||
for i in $(SUBDIRS); do (cd $$i && $(MAKE) dep) || exit; done
|
||||
|
||||
dummy:
|
||||
|
||||
|
|
186
iBCSemul/coff.c
186
iBCSemul/coff.c
|
@ -6,7 +6,7 @@
|
|||
* Modified by Eric Youngdale to include all ibcs syscalls.
|
||||
* Re-written by Drew Sullivan to handle lots more of the syscalls correctly.
|
||||
*
|
||||
* $Id: coff.c,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* $Id: coff.c,v 1.2 1994/02/28 09:15:28 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/iBCSemul/coff.c,v $
|
||||
*/
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
|||
/*
|
||||
* Emulate.c contains the entry point for the 'lcall 7,xxx' handler.
|
||||
*/
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/kernel.h>
|
||||
|
@ -24,19 +25,25 @@
|
|||
#include <linux/ptrace.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
#include <asm/segment.h>
|
||||
#include <asm/system.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sys.h>
|
||||
#include <linux/malloc.h>
|
||||
|
||||
#include <ibcs/ibcs.h>
|
||||
|
||||
#ifdef IBCS_TRACE
|
||||
#include <ibcs/trace.h>
|
||||
#endif
|
||||
|
||||
/* Here we handle syscalls that need a little more special treatment */
|
||||
int ibcs_fork(struct pt_regs * regs) {
|
||||
int rvalue;
|
||||
|
||||
regs->eflags &= ~1; /* Clear carry flag */
|
||||
rvalue = sys_fork(regs->ebx, regs->ecx, 1,
|
||||
regs->esi, regs->edi, regs->ebp, regs->eax, regs->ds,
|
||||
regs->es, regs->fs, regs->gs, regs->orig_eax,
|
||||
|
@ -89,7 +96,7 @@ int ibcs_getgid(struct pt_regs * regs) {
|
|||
#define MAGIC_WAITPID_FLAG (FLAG_ZF | FLAG_PF | FLAG_SF | FLAG_OF)
|
||||
|
||||
int ibcs_wait(struct pt_regs * regs) {
|
||||
long result;
|
||||
long result, kopt;
|
||||
int pid, loc, opt;
|
||||
|
||||
/* if ZF,PF,SF,and OF are set then it is waitpid */
|
||||
|
@ -98,11 +105,17 @@ int ibcs_wait(struct pt_regs * regs) {
|
|||
loc = get_fs_long(((unsigned long *) regs->esp) + 2);
|
||||
opt = get_fs_long(((unsigned long *) regs->esp) + 3);
|
||||
|
||||
result = waitpid(pid, loc, opt);
|
||||
/* Now translate the options from the SVr4 numbers */
|
||||
kopt = 0;
|
||||
if(opt & 0100) kopt |= WNOHANG;
|
||||
|
||||
result = waitpid(pid, loc, kopt);
|
||||
} else {
|
||||
loc = get_fs_long(((unsigned long *) regs->esp) + 1);
|
||||
result = waitpid(-1, loc, 0L);
|
||||
}
|
||||
if(loc)
|
||||
regs->edx = get_fs_long((unsigned long *) loc);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -139,11 +152,6 @@ int ibcs_exec(struct pt_regs *regs)
|
|||
/* if you get an error on this undefined, then remove the */
|
||||
/* 'static' declaration in /linux/fs/exec.c */
|
||||
error = do_execve(filename, argv, envp, regs);
|
||||
#if IBCS_TRACE
|
||||
if (ibcs_trace & TRACE_API)
|
||||
printk(KERN_DEBUG "ibcs_exec(\"%s\") == %d\n",
|
||||
filename, error);
|
||||
#endif
|
||||
putname (filename);
|
||||
}
|
||||
return error;
|
||||
|
@ -187,9 +195,163 @@ asmlinkage int ibcs_utsname(int pname)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int ibcs_pause(void)
|
||||
int ibcs_read(int fd, char *buf, int nbytes)
|
||||
{
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule();
|
||||
return -EINTR;
|
||||
int error, here, posn, reclen;
|
||||
struct file *file;
|
||||
struct dirent *d;
|
||||
int old_fs;
|
||||
|
||||
error = sys_read(fd, buf, nbytes);
|
||||
if (error != -EISDIR)
|
||||
return error;
|
||||
|
||||
/* Stupid bloody thing is trying to read a directory. Some old
|
||||
* programs expect this to work. It works on SCO. To emulate it
|
||||
* we have to map a dirent to a direct. This involves shrinking
|
||||
* a long inode to a short. Fortunately nothing this archaic is
|
||||
* likely to care about anything but the filenames of entries
|
||||
* with non-zero inodes. We also assume that anything doing
|
||||
* this doesn't understand names longer than 14 characters
|
||||
* and quietly ignore anything longer.
|
||||
*/
|
||||
|
||||
/* sys_read has already done a verify_area and checked the
|
||||
* decriptor number.
|
||||
*/
|
||||
file = current->filp[fd];
|
||||
|
||||
/* XXXXXX
|
||||
* The size of dirent must be explicit and not rely on the name
|
||||
* array quietly extending past the end of the structure!
|
||||
* It may be safer just to use get_free_page for this?
|
||||
*/
|
||||
d = (struct dirent *)kmalloc(sizeof(struct dirent), GFP_KERNEL);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
||||
error = posn = reclen = 0;
|
||||
|
||||
while (posn + reclen < nbytes) {
|
||||
/* Save the current position and get another dirent */
|
||||
here = file->f_pos;
|
||||
old_fs = get_fs();
|
||||
set_fs (get_ds());
|
||||
error = sys_readdir(fd, d, 1);
|
||||
set_fs(old_fs);
|
||||
if (error <= 0)
|
||||
break;
|
||||
|
||||
/* If it'll fit in the buffer save it otherwise back up
|
||||
* so it is read next time around.
|
||||
* Oh, if we're at the beginning of the buffer there's
|
||||
* no chance that this entry will ever fit so don't
|
||||
* copy it and don't back off - we'll just pretend it
|
||||
* isn't here...
|
||||
*/
|
||||
reclen = 16 * ((d->d_reclen + 13) / 14);
|
||||
if (posn + reclen <= nbytes) {
|
||||
/* SCO (at least) handles long filenames by breaking
|
||||
* them up in to 14 character chunks of which all
|
||||
* but the last have the inode set to 0xffff.
|
||||
*/
|
||||
char *p = d->d_name;
|
||||
|
||||
/* Put all but the last chunk. */
|
||||
while (d->d_reclen > 14) {
|
||||
put_fs_word(0xffff, buf+posn);
|
||||
posn += 2;
|
||||
memcpy_tofs(buf+posn, p, 14);
|
||||
posn += 14;
|
||||
p += 14;
|
||||
d->d_reclen -= 14;
|
||||
}
|
||||
/* Put the last chunk. Note the we have to fold a
|
||||
* long inode number down to a short. Hopefully
|
||||
* nothing uses the inode number!
|
||||
*/
|
||||
if ((unsigned long)d->d_ino > 0xfffe)
|
||||
put_fs_word(0xfffe, buf+posn);
|
||||
else
|
||||
put_fs_word((short)d->d_ino, buf+posn);
|
||||
posn += 2;
|
||||
memcpy_tofs(buf+posn, p, d->d_reclen);
|
||||
|
||||
/* Ensure that filenames that don't fill the array
|
||||
* completely are null filled.
|
||||
*/
|
||||
for (; d->d_reclen < 14; d->d_reclen++)
|
||||
put_fs_byte('\0', buf+posn+d->d_reclen);
|
||||
|
||||
posn += 14;
|
||||
} else if (posn) {
|
||||
sys_lseek(fd, here, 0);
|
||||
} /* else posn == 0 */
|
||||
}
|
||||
|
||||
/* Lose the intermediate buffer. */
|
||||
kfree(d);
|
||||
|
||||
/* If we've put something in the buffer return the byte count
|
||||
* otherwise return the error status.
|
||||
*/
|
||||
return (posn ? posn : error);
|
||||
}
|
||||
|
||||
int ibcs_procids(struct pt_regs * regs)
|
||||
{
|
||||
int op = get_fs_long(((unsigned long *)regs->esp)+1);
|
||||
|
||||
switch (op) {
|
||||
case 0: /* getpgrp */
|
||||
return current->pgrp;
|
||||
|
||||
case 1: /* setpgrp */
|
||||
sys_setpgid(0, 0);
|
||||
return current->pgrp;
|
||||
|
||||
case 2: { /* setpgid */
|
||||
int pid, pgid;
|
||||
|
||||
/* N.B. These arguments are further up the stack
|
||||
* than you might think because there is the
|
||||
* return address for a call in between. Try
|
||||
* tracing the assembler of a program!
|
||||
*/
|
||||
pid = get_fs_long(((unsigned long *)regs->esp)+3);
|
||||
pgid = get_fs_long(((unsigned long *)regs->esp)+4);
|
||||
return sys_setpgid(pid, pgid);
|
||||
}
|
||||
|
||||
case 3: /* setsid */
|
||||
return sys_setsid();
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int ibcs_select(struct pt_regs *regs)
|
||||
{
|
||||
#ifdef IBCS_TRACE
|
||||
int error;
|
||||
struct timeval *t;
|
||||
|
||||
if ((ibcs_trace & TRACE_API) || ibcs_func_p->trace) {
|
||||
error = verify_area(VERIFY_READ,
|
||||
((unsigned long *)regs->esp)+1,
|
||||
5*sizeof(long));
|
||||
if (error)
|
||||
return error;
|
||||
t = (struct timeval *)get_fs_long(((unsigned long *)regs->esp)+5);
|
||||
if (t) {
|
||||
error = verify_area(VERIFY_READ, t, sizeof(struct timeval));
|
||||
if (error)
|
||||
return error;
|
||||
printk(KERN_DEBUG "iBCS: select timeout in %lus, %luus\n",
|
||||
get_fs_long(&(t->tv_sec)),
|
||||
get_fs_long(&(t->tv_usec)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return sys_select(((unsigned long *)regs->esp) + 1);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,19 @@
|
|||
* Rebuilt with handling for multiple binary personalities
|
||||
* -- Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
*
|
||||
* $Id: emulate.c,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* Feb 14 1994
|
||||
* Dual mode. Compiled in if you say yes to the configure iBCS
|
||||
* question during 'make config'. Loadable module with kernel
|
||||
* hooks otherwise.
|
||||
* -- Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
*
|
||||
* Feb 18 1994
|
||||
* Added the /dev/socksys emulator. This allows applications which
|
||||
* use the socket interface to Lachman streams based TCP/IP to use
|
||||
* the Linux TCP/IP stack.
|
||||
* -- Mike Jagdis (jaggy@purplet.demon.co.uk)
|
||||
*
|
||||
* $Id: emulate.c,v 1.2 1994/02/28 09:15:29 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/iBCSemul/emulate.c,v $
|
||||
*/
|
||||
|
||||
|
@ -36,71 +48,40 @@
|
|||
#include <linux/sys.h>
|
||||
#include <linux/personality.h>
|
||||
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
#include <linux/binfmts.h>
|
||||
#include <linux/module.h>
|
||||
#endif
|
||||
|
||||
#include <ibcs/ibcs.h>
|
||||
#include <ibcs/abi4.h>
|
||||
#include <ibcs/trace.h>
|
||||
#include <ibcs/xnx.h>
|
||||
|
||||
/*
|
||||
* ELF and COFF use the IBCS format. If configured for either one then
|
||||
* enable the ibcs support.
|
||||
*/
|
||||
#ifdef CONFIG_BINFMT_ELF
|
||||
#define CONFIG_IBCS
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BINFMT_COFF
|
||||
#define CONFIG_IBCS
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_IBCS
|
||||
/*
|
||||
* This is a special stub that we use *only* if IBCS
|
||||
* is not configured into the kernel
|
||||
*/
|
||||
asmlinkage void iABI_emulate(struct pt_regs * regs)
|
||||
{
|
||||
/* ----+----1----+----2----+----3----+ */
|
||||
sys_write(2, "(coff, gasp, not here you don't :-)", 35);
|
||||
printk(KERN_ERR "iBCS2 binaries not configured\n");
|
||||
do_exit(SIGSEGV);
|
||||
}
|
||||
#else /* CONFIG_IBCS */
|
||||
|
||||
#ifdef IBCS_TRACE
|
||||
#include <ibcs/trace.h>
|
||||
static void plist(int id, char *name, char *args, int *list);
|
||||
static void fail(int id, long eax, char *name);
|
||||
|
||||
int ibcs_trace = TRACE_API | TRACE_IOCTL | TRACE_IOCTL_F;
|
||||
int ibcs_trace = 0;
|
||||
int ibcs_id = 0;
|
||||
|
||||
static char *sig_names[] = {
|
||||
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL",
|
||||
"SIGTRAP", "SIGABRT/SIGIOT","SIGUNUSED", "SIGFPE",
|
||||
"SIGKILL", "SIGUSR1", "SIGSEGV", "SIGUSR2",
|
||||
"SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT",
|
||||
"SIGCHLD", "SIGCONT", "SIGSTOP", "SIGTSTP",
|
||||
"SIGTTIN", "SIGTTOU", "SIGIO/SIGPOLL/SIGURG",
|
||||
"SIGXCPU", "SIGXFSZ", "SIGVTALRM", "SIGPROF",
|
||||
"SIGWINCH", "SIGLOST", "SIGPWR", "SIG 31",
|
||||
"SIG 32"
|
||||
};
|
||||
#else /* IBCS_TRACE */
|
||||
static void fail(long eax);
|
||||
#endif /* IBCS_TRACE */
|
||||
|
||||
IBCS_func *ibcs_func_p;
|
||||
|
||||
|
||||
/* This lookup table is used to determine how many arguments to pull from
|
||||
the user mode stack, and how many to pass to the kernel routine. */
|
||||
|
||||
/* This table is used to convert the errno numbers returned by linux
|
||||
into the iBCS numbers */
|
||||
|
||||
unsigned char errno_cvt[255] = {
|
||||
0,
|
||||
EPERM, ENOENT, ESRCH, EINTR, EIO, ENXIO, E2BIG, ENOEXEC, EBADF, ECHILD,
|
||||
EAGAIN, ENOMEM, EACCES, EFAULT, ENOTBLK, EBUSY, EEXIST, EXDEV, ENODEV,
|
||||
ENOTDIR, EISDIR, EINVAL, ENFILE, EMFILE, ENOTTY, ETXTBSY, EFBIG, ENOSPC,
|
||||
ESPIPE, EROFS, EMLINK, EPIPE, EDOM, ERANGE, EDEADLK, ENAMETOOLONG, ENOLCK,
|
||||
ENOSYS, ENOTEMPTY, ELOOP, EWOULDBLOCK, ENOMSG, EIDRM, ECHRNG, EL2NSYNC,
|
||||
EL3HLT, EL3RST, ELNRNG, EUNATCH, ENOCSI, EL2HLT, EBADE, EBADR, EXFULL,
|
||||
ENOANO, EBADRQC, EBADSLT, EDEADLOCK, EBFONT, ENOSTR, ENODATA, ETIME, ENOSR,
|
||||
ENONET, ENOPKG, EREMOTE, ENOLINK, EADV, ESRMNT, ECOMM, EPROTO, EMULTIHOP,
|
||||
EDOTDOT, EBADMSG, EOVERFLOW, ENOTUNIQ, EBADFD, EREMCHG, ELIBACC, ELIBBAD,
|
||||
ELIBSCN, ELIBMAX, ELIBEXEC, EILSEQ, ERESTART, ESTRPIPE, EUSERS, ENOTSOCK,
|
||||
EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT,
|
||||
ESOCKTNOSUPPORT, EOPNOTSUPP, EPFNOSUPPORT, EAFNOSUPPORT, EADDRINUSE,
|
||||
EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ENETRESET, ECONNABORTED, ECONNRESET,
|
||||
ENOBUFS, EISCONN, ENOTCONN, ESHUTDOWN, ETOOMANYREFS, ETIMEDOUT, ECONNREFUSED,
|
||||
EHOSTDOWN, EHOSTUNREACH, EALREADY, EINPROGRESS, ESTALE, EUCLEAN, ENOTNAM,
|
||||
ENAVAIL, EISNAM, EREMOTEIO
|
||||
};
|
||||
|
||||
/* This table contains the appropriate kernel routines that can be run
|
||||
* to perform the syscalls in question. If an entry is 'Ukn' we don't
|
||||
* know how to handle it yet. (We also set trace on by default for these)
|
||||
|
@ -113,95 +94,103 @@ unsigned char errno_cvt[255] = {
|
|||
#define Spl -1 /* pass the regs structure down */
|
||||
#define Ukn -2 /* no code to handle this case yet */
|
||||
#define Fast -3 /* magic on return, return regs structure already set up */
|
||||
#define Class -4 /* is a pointer to a subclass */
|
||||
|
||||
#include "callmap.inc"
|
||||
|
||||
#include "errmap.inc"
|
||||
|
||||
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
char kernel_version[] = KVERSION;
|
||||
|
||||
void iABI_emulate_real(struct pt_regs * regs) {
|
||||
#else
|
||||
void iABI_emulate(struct pt_regs * regs) {
|
||||
int pers, i, j;
|
||||
#endif
|
||||
int pers, i, j, k;
|
||||
int args[8];
|
||||
int rvalue;
|
||||
IBCS_func ***pers_map, **class_map;
|
||||
IBCS_func *p = NULL;
|
||||
IBCS_func **group_map, *p;
|
||||
#ifdef IBCS_TRACE
|
||||
int id = ++ibcs_id;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BINFMT_IBCS
|
||||
static int first_call = 1;
|
||||
|
||||
if (first_call) {
|
||||
init_socksys();
|
||||
first_call = 0;
|
||||
}
|
||||
#else
|
||||
MOD_INC_USE_COUNT;
|
||||
#endif
|
||||
|
||||
/* First decide which personality map we should be looking
|
||||
* at by looking at the personality of this process.
|
||||
*/
|
||||
pers = current->personality & PER_MASK;
|
||||
if (pers > last(IBCS_personality_map)
|
||||
|| !(pers_map = IBCS_personality_map[pers])) {
|
||||
printk(KERN_DEBUG "iBCS: bad personality %x\n", pers);
|
||||
if (pers > last(iBCS_personality_map)
|
||||
|| !(group_map = iBCS_personality_map[pers])) {
|
||||
#ifdef IBCS_TRACE
|
||||
printk(KERN_DEBUG "[%d]%d iBCS: bad personality %d\n",
|
||||
id, current->pid, pers);
|
||||
#else
|
||||
printk(KERN_DEBUG "%d iBCS: bad personality %d\n",
|
||||
current->pid, pers);
|
||||
#endif
|
||||
regs->eflags |= 1; /* Set carry flag */
|
||||
regs->eax = iABI_errors(EINVAL);
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* Now look at the class of the call (lowest byte) and find the
|
||||
* correct call table set.
|
||||
*/
|
||||
i = regs->eax;
|
||||
class_map = NULL;
|
||||
switch (i & 0xff) {
|
||||
case 0x28: /* Xenix class */
|
||||
class_map = pers_map[1];
|
||||
i >>= 8;
|
||||
break;
|
||||
case 0x83: /* Wyse TCP/IP class if present, otherwise
|
||||
* it's just a normal call.
|
||||
*/
|
||||
if (!(class_map = pers_map[2]))
|
||||
class_map = pers_map[0];
|
||||
else
|
||||
i >>= 8;
|
||||
break;
|
||||
case 0x84: /* Wyse NFS class if present, otherwise
|
||||
* it's just a normal call.
|
||||
*/
|
||||
if (!(class_map = pers_map[3]))
|
||||
class_map = pers_map[0];
|
||||
else
|
||||
i >>= 8;
|
||||
break;
|
||||
case 0xff: /* Linux debug class */
|
||||
class_map = pers_map[4];
|
||||
i >>= 8;
|
||||
break;
|
||||
default: /* Base iBCS class */
|
||||
class_map = pers_map[0];
|
||||
break;
|
||||
}
|
||||
if (!class_map) {
|
||||
printk(KERN_DEBUG "iBCS: class %lx not supported under personality %x\n",
|
||||
regs->eax & 0xff, pers);
|
||||
|
||||
do_subgroup:
|
||||
j = (i & 0xff) >> 3;
|
||||
k = i & 0x07;
|
||||
if (!group_map[j]) {
|
||||
/* This catches NULLs in group maps. It's better to
|
||||
* point the block to the Unused set for tracing rather
|
||||
* than using NULL but we'll trap it anyway.
|
||||
*/
|
||||
#ifdef IBCS_TRACE
|
||||
printk(KERN_DEBUG "[%d]%d iBCS: function 0x%lx not supported under personality %ld\n",
|
||||
id, current->pid,
|
||||
(unsigned long)regs->eax, (unsigned long)pers);
|
||||
#else
|
||||
printk(KERN_DEBUG "%d iBCS: function 0x%lx not supported under personality %lu\n",
|
||||
current->pid,
|
||||
(unsigned long)regs->eax, (unsigned long)pers);
|
||||
#endif
|
||||
regs->eflags |= 1; /* Set carry flag */
|
||||
regs->eax = iABI_errors(EINVAL);
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
/* Next look for group that this call falls in for this class.
|
||||
* N.B. It isn't easy to see if we are looking off the end of
|
||||
* the table. We assume binaries are playing fair :-(.
|
||||
/* And finally we can get the function definition */
|
||||
p = ibcs_func_p = &(group_map[j][k]);
|
||||
|
||||
/* If it is a subgroup move the pointer to the subgroup, roll
|
||||
* the function number down a byte and try again.
|
||||
*/
|
||||
j = i >> 3;
|
||||
i &= 0x07;
|
||||
if (!class_map[j]) {
|
||||
printk(KERN_DEBUG "iBCS: function %lx not supported under personality %x\n",
|
||||
regs->eax, pers);
|
||||
regs->eflags |= 1; /* Set carry flag */
|
||||
regs->eax = iABI_errors(EINVAL);
|
||||
return;
|
||||
if (p->nargs == Class) {
|
||||
group_map = (IBCS_func **)p->kfunc;
|
||||
i >>= 8;
|
||||
goto do_subgroup;
|
||||
}
|
||||
|
||||
/* And finally we can the function definition */
|
||||
p = &(class_map[j][i]);
|
||||
|
||||
ibcs_func_p = p; /* keep Joe's code happy */
|
||||
|
||||
for(i=0; i < p->nargs; i++)
|
||||
args[i] = get_fs_long(((unsigned long *) regs->esp) + (i+1));
|
||||
|
||||
#if IBCS_TRACE
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & TRACE_API) || p->trace) {
|
||||
if (p->nargs == Spl) {
|
||||
for(i=0; i < strlen(p->args); i++)
|
||||
|
@ -211,71 +200,148 @@ void iABI_emulate(struct pt_regs * regs) {
|
|||
}
|
||||
#endif
|
||||
|
||||
rvalue = 0;
|
||||
rvalue = iABI_errors(ENOSYS);
|
||||
if (p->kfunc) {
|
||||
switch(p->nargs) {
|
||||
case Fast:
|
||||
(*p->kfunc)(regs);
|
||||
((fn_ptr)p->kfunc)(regs);
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & (TRACE_API|TRACE_SIGNAL))
|
||||
&& (current->signal & (~current->blocked))) {
|
||||
unsigned long signr = current->signal & (~current->blocked);
|
||||
|
||||
__asm__("bsf %2,%1\n\t"
|
||||
"btrl %1,%0"
|
||||
:"=m" (current->signal),"=r" (signr)
|
||||
:"1" (signr));
|
||||
printk(KERN_DEBUG "[%d]%d SIGNAL %lu <%s>\n",
|
||||
id, current->pid,
|
||||
signr+1, sig_names[signr]);
|
||||
}
|
||||
#endif
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
return;
|
||||
case Spl:
|
||||
rvalue = (*p->kfunc)(regs);
|
||||
rvalue = ((fn_ptr)p->kfunc)(regs);
|
||||
break;
|
||||
case 0:
|
||||
rvalue = (*p->kfunc)();
|
||||
rvalue = ((fn_ptr)p->kfunc)();
|
||||
break;
|
||||
case 1:
|
||||
rvalue = (*p->kfunc)(args[0]);
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0]);
|
||||
break;
|
||||
case 2:
|
||||
rvalue = (*p->kfunc)(args[0], args[1]);
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0], args[1]);
|
||||
break;
|
||||
case 3:
|
||||
rvalue = (*p->kfunc)(args[0], args[1], args[2]);
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0], args[1], args[2]);
|
||||
break;
|
||||
case 4:
|
||||
rvalue = (*p->kfunc)(args[0], args[1], args[2], args[3]);
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0], args[1], args[2], args[3]);
|
||||
break;
|
||||
case 5:
|
||||
rvalue = (*p->kfunc)(args[0], args[1], args[2],
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0], args[1], args[2],
|
||||
args[3], args[4]);
|
||||
break;
|
||||
case 6:
|
||||
rvalue = (*p->kfunc)(args[0], args[1], args[2],
|
||||
rvalue = ((fn_ptr)p->kfunc)(args[0], args[1], args[2],
|
||||
args[3], args[4], args[5]);
|
||||
break;
|
||||
default:
|
||||
#ifdef IBCS_TRACE
|
||||
fail(id, regs->eax, p->name);
|
||||
#else
|
||||
fail(regs->eax);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
#ifdef IBCS_TRACE
|
||||
fail(id, regs->eax, p->name);
|
||||
#else
|
||||
fail(regs->eax);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (rvalue >= 0) {
|
||||
regs->eflags &= ~1; /* Clear carry flag */
|
||||
regs->eax = rvalue;
|
||||
#if IBCS_TRACE
|
||||
if (ibcs_trace & TRACE_API) {
|
||||
printk(KERN_DEBUG "[%d] returns %ld {%ld}\n",
|
||||
id, regs->eax, regs->edx);
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & TRACE_API) || p->trace) {
|
||||
printk(KERN_DEBUG "[%d]%d %s returns %ld {%ld}\n",
|
||||
id, current->pid, p->name,
|
||||
regs->eax, regs->edx);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
regs->eflags |= 1; /* Set carry flag */
|
||||
regs->eax = iABI_errors(-rvalue);
|
||||
#if IBCS_TRACE
|
||||
if (ibcs_trace & TRACE_API) {
|
||||
printk(KERN_DEBUG "[%d] Error return linux=%d -> ibcs=%ld\n",
|
||||
id, rvalue, regs->eax);
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & TRACE_API) || p->trace) {
|
||||
printk(KERN_DEBUG "[%d]%d %s error return "
|
||||
#ifdef VERBOSE_ERRORS
|
||||
"linux=%d -> ibcs=%ld <%s>\n",
|
||||
id, current->pid, p->name,
|
||||
rvalue, regs->eax,
|
||||
-rvalue < sizeof(errmsg)/sizeof(errmsg[0])
|
||||
? errmsg[-rvalue]
|
||||
: "unknown");
|
||||
#else
|
||||
"linux=%d -> ibcs=%ld\n",
|
||||
id, current->pid, p->name,
|
||||
rvalue, regs->eax);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & (TRACE_API|TRACE_SIGNAL))
|
||||
&& (current->signal & (~current->blocked))) {
|
||||
unsigned long signr = current->signal & (~current->blocked);
|
||||
|
||||
__asm__("bsf %2,%1\n\t"
|
||||
"btrl %1,%0"
|
||||
:"=m" (current->signal),"=r" (signr)
|
||||
:"1" (signr));
|
||||
printk(KERN_DEBUG "[%d]%d SIGNAL %lu <%s>\n",
|
||||
id, current->pid, signr+1, sig_names[signr]);
|
||||
}
|
||||
#endif
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
MOD_DEC_USE_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Translate the errno numbers from linux to iBCS2 */
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
void ibcs_exit(int n)
|
||||
{
|
||||
MOD_DEC_USE_COUNT;
|
||||
sys_exit(n);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Translate the errno numbers from linux to current personality */
|
||||
int iABI_errors(int errno) {
|
||||
if (0 <= errno && errno <= last(errno_cvt)) {
|
||||
return errno_cvt[errno];
|
||||
}
|
||||
int pers;
|
||||
struct err_map_segment *seg;
|
||||
|
||||
pers = current->personality & PER_MASK;
|
||||
if (pers < 0 || pers > last(err_map)) {
|
||||
/* No mapping for this personality. We're stuffed... */
|
||||
printk(KERN_ERR "iBCS: no error mapping for personality %d\n", pers);
|
||||
return errno;
|
||||
}
|
||||
|
||||
for (seg=err_map[pers]; seg->start != -1; seg++)
|
||||
if (seg->start <= errno && errno <= seg->end)
|
||||
return (seg->map ? seg->map[errno-seg->start] : errno);
|
||||
|
||||
/* We have a mapping for this personality but we don't know how
|
||||
* to map this error code. Jeez...
|
||||
*/
|
||||
printk(KERN_ERR "iBCS: error %d is not mapped in personality %d\n",
|
||||
errno, pers);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
@ -283,42 +349,63 @@ int ibcs_syscall(struct pt_regs *regs) {
|
|||
regs->eax = get_fs_long(((unsigned long *) regs->esp) + 1);
|
||||
|
||||
++regs->esp;
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
iABI_emulate_real(regs);
|
||||
#else
|
||||
iABI_emulate(regs);
|
||||
#endif
|
||||
--regs->esp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if IBCS_TRACE
|
||||
#ifdef IBCS_TRACE
|
||||
int ibcs_trace_set(int arg)
|
||||
{
|
||||
int rvalue = ibcs_trace;
|
||||
if (arg != -1) {
|
||||
ibcs_trace = arg;
|
||||
printk(KERN_DEBUG "iBCS: trace code set to 0x%x\n", ibcs_trace);
|
||||
}
|
||||
|
||||
ibcs_trace = arg;
|
||||
|
||||
return rvalue;
|
||||
return ibcs_trace;
|
||||
}
|
||||
|
||||
int ibcs_trace_func(int map, int per, int func, int val)
|
||||
int ibcs_trace_func(int per, int func, int val)
|
||||
{
|
||||
int class, rvalue;
|
||||
IBCS_func ***pmap, **pper;
|
||||
unsigned int i, j, k;
|
||||
IBCS_func **group_map, *p;
|
||||
|
||||
if (map > last(IBCS_personality_map)) {
|
||||
return iABI_errors(EINVAL);
|
||||
if (per > last(iBCS_personality_map)
|
||||
|| !(group_map = iBCS_personality_map[per]))
|
||||
return -EINVAL;
|
||||
|
||||
i = func;
|
||||
printk("do %d, 0x%x, %d\n", per, func, val);
|
||||
|
||||
do_subgroup:
|
||||
printk("look for %d, 0x%x\n", per, i);
|
||||
j = (i & 0xff) >> 3;
|
||||
k = i & 0x07;
|
||||
if (!group_map[j]) {
|
||||
return -EINVAL;
|
||||
}
|
||||
pmap = IBCS_personality_map[map];
|
||||
if (pmap[per] == NULL) {
|
||||
return iABI_errors(EINVAL);
|
||||
|
||||
/* And finally we can get the function definition */
|
||||
p = &(group_map[j][k]);
|
||||
|
||||
/* If it is a subgroup move the pointer to the subgroup, roll
|
||||
* the function number down a byte and try again.
|
||||
*/
|
||||
if (p->nargs == Class) {
|
||||
group_map = (IBCS_func **)p->kfunc;
|
||||
i >>= 8;
|
||||
goto do_subgroup;
|
||||
}
|
||||
pper = pmap[per];
|
||||
|
||||
class = func >> 3;
|
||||
func &= 0x07;
|
||||
rvalue = pper[class][func].trace;
|
||||
pper[class][func].trace = val;
|
||||
if (val != -1)
|
||||
p->trace = val;
|
||||
|
||||
return rvalue;
|
||||
return p->trace;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -360,10 +447,75 @@ static void plist(int id, char *name, char *args, int *list) {
|
|||
printk(KERN_DEBUG "[%d]%d %s(%s)\n",
|
||||
id, current->pid, name, arg_buf);
|
||||
}
|
||||
#endif /* IBCS_TRACE */
|
||||
|
||||
static void fail(int id, long eax, char *name) {
|
||||
printk(KERN_ERR "[%d] Unsupported iBSC2 function 0x%lx(%s)\n",
|
||||
id, eax, name);
|
||||
printk(KERN_ERR "[%d]%d Unsupported iBSC2 function 0x%lx(%s)\n",
|
||||
id, current->pid, eax, name);
|
||||
}
|
||||
#endif /* CONFIG_IBCS */
|
||||
#else /* IBCS_TRACE */
|
||||
static void fail(long eax) {
|
||||
printk(KERN_ERR "Unsupported iBCS function 0x%lx\n", eax);
|
||||
}
|
||||
#endif /* IBCS_TRACE */
|
||||
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
extern int load_elf_binary(struct linux_binprm *,
|
||||
struct pt_regs * regs);
|
||||
extern int load_elf_library(int fd);
|
||||
|
||||
extern int load_coff_binary(struct linux_binprm *,
|
||||
struct pt_regs * regs);
|
||||
extern int load_coff_library(int fd);
|
||||
extern int ibcs_lmapsig(int);
|
||||
extern int (*ibcs_invmapsig)(int);
|
||||
|
||||
|
||||
extern void (*iABI_hook)(struct pt_regs * regs);
|
||||
|
||||
int init_module(void) {
|
||||
struct linux_binfmt *it;
|
||||
|
||||
/* Register the socksys socket interface to streams based TCP/IP. */
|
||||
init_socksys();
|
||||
|
||||
/* Connect the emulator. */
|
||||
iABI_hook = iABI_emulate_real;
|
||||
ibcs_invmapsig = ibcs_lmapsig;
|
||||
|
||||
/* Install the COFF and ELF loaders.
|
||||
* N.B. We *rely* on the table being the right size with the
|
||||
* right number of free slots...
|
||||
*/
|
||||
it = formats;
|
||||
while (it->load_binary) it++;
|
||||
it->load_binary = load_elf_binary;
|
||||
it->load_shlib = load_elf_library;
|
||||
while (it->load_binary) it++;
|
||||
it->load_binary = load_coff_binary;
|
||||
it->load_shlib = load_coff_library;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module( void) {
|
||||
struct linux_binfmt *it;
|
||||
|
||||
if (MOD_IN_USE)
|
||||
printk(KERN_INFO "iBCS: module is in use, remove delayed\n");
|
||||
|
||||
/* Remove the COFF and ELF loaders. */
|
||||
for (it = formats; it->load_binary; it++)
|
||||
if (it->load_binary == load_elf_binary
|
||||
|| it->load_binary == load_coff_binary) {
|
||||
it->load_binary = NULL;
|
||||
it->load_shlib = NULL;
|
||||
}
|
||||
|
||||
/* Unhook the emulator. */
|
||||
iABI_hook = NULL;
|
||||
ibcs_invmapsig = NULL;
|
||||
|
||||
/* Remove the socksys socket interface to streams based TCP/IP */
|
||||
cleanup_socksys();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -3,357 +3,169 @@
|
|||
* get a feeling of complexity that we are dealing with
|
||||
* in this emulator.
|
||||
*
|
||||
* $Id: callmap.inc,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* WARNING: It is entirely possible to create loops in these structures
|
||||
* which will cause the kernel to hang either when attempting
|
||||
* to resolve a syscall or when changing trace settings.
|
||||
* Careful!
|
||||
*
|
||||
* $Id: callmap.inc,v 1.2 1994/02/28 09:15:27 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/iBCSemul/maps/callmap.inc,v $
|
||||
*/
|
||||
|
||||
#ifdef IBCS_TRACE
|
||||
# define ITR(trace, name, args) ,trace,name,args
|
||||
#else
|
||||
# define ITR(trace, name, args)
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func Unused[] = {
|
||||
{ 0, 0,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", },
|
||||
{ 0, 1,Ukn, "?", "", }
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") }
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func IBCS_func_0x00[] = {
|
||||
{ ibcs_syscall, 0,Fast, "syscall", "", }, /* 0 */
|
||||
{ sys_exit, 0,1, "exit", "d", }, /* 1 */
|
||||
{ ibcs_fork, 0,Spl, "fork", "", }, /* 2 */
|
||||
{ sys_read, 0,3, "read", "dpd", }, /* 3 */
|
||||
{ sys_write, 0,3, "write", "dpd", }, /* 4 */
|
||||
{ ibcs_open, 0,3, "open", "soo", }, /* 5 */
|
||||
{ sys_close, 0,1, "close", "d", }, /* 6 */
|
||||
{ ibcs_wait, 0,Spl, "wait", "xxx", } /* 7 */
|
||||
#ifdef IBCS_TRACE
|
||||
static IBCS_func LNX_func_0x00[] = {
|
||||
{ ibcs_trace_set, 1 ITR(0, "trace", "d") }, /* 0 */
|
||||
{ ibcs_trace_func, 3 ITR(0, "trace", "ddd") }, /* 1 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 2 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 3 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 4 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 5 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 6 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 7 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x08[] = {
|
||||
{ sys_creat, 0,2, "creat", "so", }, /* 8 */
|
||||
{ sys_link, 0,2, "link", "ss", }, /* 9 */
|
||||
{ sys_unlink, 0,1, "unlink", "s", }, /* 10 */
|
||||
{ ibcs_exec, 0,Spl, "exec", "sxx", }, /* 11 */
|
||||
{ sys_chdir, 0,1, "chdir", "s", }, /* 12 */
|
||||
{ sys_time, 0,1, "time", "d", }, /* 13 */
|
||||
{ sys_mknod, 0,3, "mknod", "soo", }, /* 14 */
|
||||
{ sys_chmod, 0,2, "chmod", "so", } /* 15 */
|
||||
static IBCS_func *iBCS_group_LNX[] = {
|
||||
LNX_func_0x00
|
||||
};
|
||||
static IBCS_func IBCS_func_0x10[] = {
|
||||
{ sys_chown, 0,3, "chown", "sdd", }, /* 16 */
|
||||
{ sys_brk, 0,1, "brk/break", "x", }, /* 17 */
|
||||
{ ibcs_stat, 0,2, "stat", "sp", }, /* 18 */
|
||||
{ sys_lseek, 0,3, "seek/lseek", "ddd", }, /* 19 */
|
||||
{ ibcs_getpid, 0,Spl, "getpid", "", }, /* 20 */
|
||||
{ 0, 1,Ukn, "mount", "", }, /* 21 */
|
||||
{ sys_umount, 0,1, "umount", "s", }, /* 22 */
|
||||
{ sys_setuid, 0,1, "setuid", "d", } /* 23 */
|
||||
#endif
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func WYSETCP_func_0x00[] = {
|
||||
{ ibcs_select, Spl ITR(0, "select", "dxxxx")},/* 0 */
|
||||
{ wv386_socket, Spl ITR(0, "socket", "ddd") }, /* 1 */
|
||||
{ wv386_connect, Spl ITR(0, "connect", "dxd") }, /* 2 */
|
||||
{ wv386_accept, Spl ITR(0, "accept", "dxx") }, /* 3 */
|
||||
{ wv386_send, Spl ITR(0, "send", "dxdd")}, /* 4 */
|
||||
{ wv386_recv, Spl ITR(0, "recv", "dxdd")}, /* 5 */
|
||||
{ wv386_bind, Spl ITR(0, "bind", "dxd") }, /* 6 */
|
||||
{ wv386_setsockopt, Spl ITR(0, "setsockopt", "") } /* 7 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x18[] = {
|
||||
{ ibcs_getuid, 0,Spl, "getuid", "", }, /* 24 */
|
||||
{ sys_stime, 0,1, "stime", "d", }, /* 25 */
|
||||
{ sys_ptrace, 0,4, "ptrace", "xxxx", }, /* 26 */
|
||||
{ sys_alarm, 0,1, "alarm", "x", }, /* 27 */
|
||||
{ ibcs_fstat, 0,2, "fstat", "dp", }, /* 28 */
|
||||
{ ibcs_pause, 0,0, "pause", "", }, /* 29 */
|
||||
{ sys_utime, 0,2, "utime", "xx", }, /* 30 */
|
||||
{ 0, 1,Ukn, "stty", "", } /* 31 */
|
||||
static IBCS_func WYSETCP_func_0x08[] = {
|
||||
{ wv386_listen, Spl ITR(0, "listen", "") }, /* 8 */
|
||||
{ 0, 3 ITR(1, "recvmsg", "dxd") }, /* 9 */
|
||||
{ 0, 3 ITR(1, "sendmsg", "dxd") }, /* 10 */
|
||||
{ wv386_getsockopt, Spl ITR(0, "getsockopt", "") }, /* 11 */
|
||||
{ wv386_recvfrom, Spl ITR(0, "recvfrom", "dxddxd")},/* 12 */
|
||||
{ wv386_sendto, Spl ITR(0, "sendto", "dxddxd")},/* 13 */
|
||||
{ wv386_shutdown, Spl ITR(0, "shutdown", "dd") }, /* 14 */
|
||||
{ wv386_socketpair, Spl ITR(0, "socketpair", "dddx")} /* 15 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x20[] = {
|
||||
{ 0, 1,Ukn, "gtty", "", }, /* 32 */
|
||||
{ sys_access, 0,2, "access", "so", }, /* 33 */
|
||||
{ sys_nice, 0,1, "nice", "d", }, /* 34 */
|
||||
{ ibcs_statfs, 0,2, "statfs", "sp", }, /* 35 */
|
||||
{ sys_sync, 0,0, "sync", "", }, /* 36 */
|
||||
{ ibcs_kill, 1,2, "kill", "dd", }, /* 37 */
|
||||
{ ibcs_fstatfs, 0,2, "fstatfs", "dp", }, /* 38 */
|
||||
{ sys_getpgrp, 0,0, "getpgrp", "", } /* 39 */
|
||||
static IBCS_func WYSETCP_func_0x10[] = {
|
||||
{ 0, Ukn ITR(1, "trace", "") }, /* 16 */
|
||||
{ wv386_getpeername, Spl ITR(0, "getpeername", "dxx") }, /* 17 */
|
||||
{ wv386_getsockname, Spl ITR(0, "getsockname", "") }, /* 18 */
|
||||
{ wv386_wait3, 1 ITR(0, "wait3", "x") }, /* 19 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 20 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 21 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 22 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 23 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x28[] = {
|
||||
{ 0, 0,Spl, "cxenix", "", }, /* 40 */
|
||||
{ sys_dup, 0,1, "dup", "d", }, /* 41 */
|
||||
{ ibcs_pipe, 0,Fast, "pipe", "", }, /* 42 */
|
||||
{ sys_times, 0,1, "times", "p", }, /* 43 */
|
||||
{ sys_profil, 0,4, "prof", "xxxx", }, /* 44 */
|
||||
{ 0, 1,Ukn, "lock/plock", "", }, /* 45 */
|
||||
{ sys_setgid, 0,1, "setgid", "d", }, /* 46 */
|
||||
{ ibcs_getgid, 0,Spl, "getgid", "", } /* 47 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x30[] = {
|
||||
{ ibcs_sigfunc, 0,Fast, "signal", "xxx", }, /* 48 */
|
||||
{ 0, 1,Ukn, "msgsys", "", }, /* 49 */
|
||||
{ ibcs_sysi86, 1,Spl, "sysi86/sys3b", "d", }, /* 50 */
|
||||
{ sys_acct, 0,1, "acct/sysacct", "x", }, /* 51 */
|
||||
{ ibcs_shmsys, 1,Fast, "shmsys", "ddxo", }, /* 52 */
|
||||
{ ibcs_semsys, 1,Spl, "semsys", "dddx", }, /* 53 */
|
||||
{ ibcs_ioctl, 0,3, "ioctl", "dxx", }, /* 54 */
|
||||
{ 0, 0,3, "uadmin", "xxx", } /* 55 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x38[] = {
|
||||
{ 0, 1,Ukn, "?", "", }, /* 56 */
|
||||
{ sys_olduname, 0,1, "utsys", "p", }, /* 57 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 58 */
|
||||
{ ibcs_execv, 0,Spl, "execv", "spp", }, /* 59 */
|
||||
{ sys_umask, 0,1, "umask", "o", }, /* 60 */
|
||||
{ sys_chroot, 0,1, "chroot", "s", }, /* 61 */
|
||||
{ ibcs_fcntl, 1,Spl, "fcntl", "ddx", }, /* 62 */
|
||||
{ ibcs_ulimit, 0,2, "ulimit", "xx", } /* 63 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x40[] = {
|
||||
{ 0, 1,Ukn, "?", "", }, /* 64 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 65 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 66 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 67 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 68 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 69 */
|
||||
{ 0, 1,Ukn, "advfs", "", }, /* 70 */
|
||||
{ 0, 1,Ukn, "unadvfs", "", } /* 71 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x48[] = {
|
||||
{ 0, 1,Ukn, "rmount", "", }, /* 72 */
|
||||
{ 0, 1,Ukn, "rumount", "", }, /* 73 */
|
||||
{ 0, 1,Ukn, "rfstart", "", }, /* 74 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 75 */
|
||||
{ 0, 1,Ukn, "rdebug", "", }, /* 76 */
|
||||
{ 0, 1,Ukn, "rfstop", "", }, /* 77 */
|
||||
{ 0, 1,Ukn, "rfsys", "", }, /* 78 */
|
||||
{ sys_rmdir, 0,1, "rmdir", "s", } /* 79 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x50[] = {
|
||||
{ sys_mkdir, 0,2, "mkdir", "so", }, /* 80 */
|
||||
{ sys_readdir, 0,3, "getdents", "???", }, /* 81 */
|
||||
{ 0, 1,Ukn, "libattach", "", }, /* 82 */
|
||||
{ 0, 1,Ukn, "libdetach", "", }, /* 83 */
|
||||
{ ibcs_sysfs, 1,Spl, "sysfs", "dxx", }, /* 84 */
|
||||
{ 0, 1,Ukn, "getmsg", "", }, /* 85 */
|
||||
{ 0, 1,Ukn, "putmsg", "", }, /* 86 */
|
||||
{ 0, 1,Ukn, "poll", "", } /* 87 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x58[] = {
|
||||
{ ibcs_lstat, 0,2, "lstat", "sp", }, /* 88 */
|
||||
{ sys_symlink, 0,2, "symlink", "ss", }, /* 89 */
|
||||
{ sys_readlink, 0,2, "readlink", "sp", }, /* 90 */
|
||||
{ sys_setgroups, 1,2, "setgroups", "dp", }, /* 91 */
|
||||
{ sys_getgroups, 1,2, "getgroups", "dp", }, /* 92 */
|
||||
{ 0, 1,3, "fchmod", "do", }, /* 93 */
|
||||
{ 0, 1,3, "fchown", "dxx", }, /* 94 */
|
||||
{ 0, 1,3, "sigprocmask", "dxx", } /* 95 */
|
||||
};
|
||||
static IBCS_func SCOSVR3_func_0x58[] = {
|
||||
{ 0, 1,Ukn, "?", "", }, /* 88 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 89 */
|
||||
{ sys_symlink, 0,2, "symlink", "ss", }, /* 90 */
|
||||
{ ibcs_lstat, 0,2, "lstat", "sp", }, /* 91 */
|
||||
{ sys_readlink, 0,2, "readlink", "sp", }, /* 92 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 93 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 94 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 95 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x60[] = {
|
||||
{ 0, 1,1, "sigsuspend", "x", }, /* 96 */
|
||||
{ 0, 1,2, "sigaltstack", "xx", }, /* 97 */
|
||||
{ 0, 1,3, "sigaction", "dxx", }, /* 98 */
|
||||
{ 0, 1,1, "sigpending", "x", }, /* 99 */
|
||||
{ 0, 1,Ukn, "context", "", }, /* 100 */
|
||||
{ 0, 1,Ukn, "evsys", "", }, /* 101 */
|
||||
{ 0, 1,Ukn, "evtrapret", "", }, /* 102 */
|
||||
{ 0, 1,Ukn, "statvfs", "", } /* 103 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x68[] = {
|
||||
{ 0, 1,Ukn, "fstatvfs", "", }, /* 104 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 105 */
|
||||
{ 0, 1,Ukn, "nfssys", "", }, /* 106 */
|
||||
{ 0, 1,Ukn, "waitsys", "", }, /* 107 */
|
||||
{ 0, 1,Ukn, "sigsendsys", "", }, /* 108 */
|
||||
{ 0, 1,Ukn, "hrtsys", "", }, /* 109 */
|
||||
{ 0, 1,Ukn, "acancel", "", }, /* 110 */
|
||||
{ 0, 1,Ukn, "async", "", } /* 111 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x70[] = {
|
||||
{ 0, 1,Ukn, "priocntlsys", "", }, /* 112 */
|
||||
{ 0, 1,Ukn, "pathconf", "", }, /* 113 */
|
||||
{ 0, 1,Ukn, "mincore", "", }, /* 114 */
|
||||
{ ibcs_mmap, 1,6, "mmap", "xxxxdx", }, /* 115 */
|
||||
{ sys_mprotect, 1,3, "mprotect", "xdx", }, /* 116 */
|
||||
{ sys_munmap, 1,2, "munmap", "xd", }, /* 117 */
|
||||
{ 0, 1,Ukn, "mmap", "", }, /* 115 */
|
||||
{ 0, 1,Ukn, "mprotect", "", }, /* 116 */
|
||||
{ 0, 1,Ukn, "munmap", "", }, /* 117 */
|
||||
{ 0, 1,Ukn, "fpathconf", "", }, /* 118 */
|
||||
{ 0, 1,Ukn, "vfork", "", } /* 119 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x78[] = {
|
||||
{ 0, 1,Ukn, "fchdir", "", }, /* 120 */
|
||||
{ 0, 1,Ukn, "readv", "", }, /* 121 */
|
||||
{ 0, 1,Ukn, "writev", "", }, /* 122 */
|
||||
{ ibcs_xstat, 1,3, "xstat", "dsx", }, /* 123 */
|
||||
{ ibcs_lxstat, 1,3, "lxstat", "dsx", }, /* 124 */
|
||||
{ ibcs_fxstat, 1,3, "fxstat", "ddx", }, /* 125 */
|
||||
{ ibcs_xmknod, 1,4, "xmknod", "dsox", }, /* 126 */
|
||||
{ 0, 1,Ukn, "clocal", "", } /* 127 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x80[] = {
|
||||
{ 0, 1,Ukn, "setrlimit", "", }, /* 128 */
|
||||
{ 0, 1,Ukn, "getrlimit", "", }, /* 129 */
|
||||
{ 0, 1,Ukn, "lchown", "", }, /* 130 */
|
||||
{ 0, 1,Ukn, "memcntl", "", }, /* 131 */
|
||||
{ 0, 1,Ukn, "getpmsg", "", }, /* 132 */
|
||||
{ 0, 1,Ukn, "putpmsg", "", }, /* 133 */
|
||||
{ 0, 1,Ukn, "rename", "", }, /* 134 */
|
||||
{ 0, 1,Ukn, "uname", "", } /* 135 */
|
||||
};
|
||||
static IBCS_func WYSEV386_func_0x80[] = {
|
||||
{ ibcs_lstat, 0,2, "lstat", "sp", }, /* 128 */
|
||||
{ sys_readlink, 0,2, "readlink", "sp", }, /* 129 */
|
||||
{ sys_symlink, 0,2, "symlink", "ss", }, /* 130 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 131 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 132 */
|
||||
{ wv386_gethostname, 1,2, "gethostname", "xd", }, /* 133 */
|
||||
{ sys_sethostname, 1,2, "sethostname", "sd", }, /* 134 */
|
||||
{ wv386_getdomainname,1,2, "getdomainname","xd", } /* 135 */
|
||||
};
|
||||
static IBCS_func IBCS_func_0x88[] = {
|
||||
{ 0, 1,Ukn, "setegid", "", }, /* 136 */
|
||||
{ 0, 1,Ukn, "sysconfig", "", }, /* 137 */
|
||||
{ 0, 1,Ukn, "adjtime", "", }, /* 138 */
|
||||
{ 0, 1,Ukn, "systeminfo", "", }, /* 139 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 140 */
|
||||
{ 0, 1,Ukn, "seteuid", "", }, /* 141 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 142 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 143 */
|
||||
};
|
||||
static IBCS_func WYSEV386_func_0x88[] = {
|
||||
{ sys_setdomainname, 1,2, "setdomainname","sd", }, /* 136 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 137 */
|
||||
{ sys_setreuid, 1,2, "setreuid", "dd", }, /* 138 */
|
||||
{ sys_setregid, 1,2, "setregid", "dd", }, /* 139 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 140 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 141 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 142 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 143 */
|
||||
};
|
||||
static IBCS_func *iBCS_class_SVR4[] = {
|
||||
IBCS_func_0x00,
|
||||
IBCS_func_0x08,
|
||||
IBCS_func_0x10,
|
||||
IBCS_func_0x18,
|
||||
IBCS_func_0x20,
|
||||
IBCS_func_0x28,
|
||||
IBCS_func_0x30,
|
||||
IBCS_func_0x38,
|
||||
IBCS_func_0x40,
|
||||
IBCS_func_0x48,
|
||||
IBCS_func_0x50,
|
||||
IBCS_func_0x58,
|
||||
IBCS_func_0x60,
|
||||
IBCS_func_0x68,
|
||||
IBCS_func_0x70,
|
||||
IBCS_func_0x78,
|
||||
IBCS_func_0x80,
|
||||
IBCS_func_0x88
|
||||
};
|
||||
static IBCS_func *iBCS_class_SCOSVR3[] = {
|
||||
IBCS_func_0x00,
|
||||
IBCS_func_0x08,
|
||||
IBCS_func_0x10,
|
||||
IBCS_func_0x18,
|
||||
IBCS_func_0x20,
|
||||
IBCS_func_0x28,
|
||||
IBCS_func_0x30,
|
||||
IBCS_func_0x38,
|
||||
IBCS_func_0x40,
|
||||
IBCS_func_0x48,
|
||||
IBCS_func_0x50,
|
||||
SCOSVR3_func_0x58,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused, /* clocal() is here but who cares? */
|
||||
Unused,
|
||||
Unused
|
||||
};
|
||||
static IBCS_func *iBCS_class_WYSEV386[] = {
|
||||
IBCS_func_0x00,
|
||||
IBCS_func_0x08,
|
||||
IBCS_func_0x10,
|
||||
IBCS_func_0x18,
|
||||
IBCS_func_0x20,
|
||||
IBCS_func_0x28,
|
||||
IBCS_func_0x30,
|
||||
IBCS_func_0x38,
|
||||
IBCS_func_0x40,
|
||||
IBCS_func_0x48,
|
||||
IBCS_func_0x50,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
WYSEV386_func_0x80,
|
||||
WYSEV386_func_0x88
|
||||
static IBCS_func *iBCS_group_WYSETCP[] = {
|
||||
WYSETCP_func_0x00,
|
||||
WYSETCP_func_0x08,
|
||||
WYSETCP_func_0x10
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func WYSENFS_func_0x00[] = {
|
||||
{ 0, Ukn ITR(1, "nfs_svc", "") }, /* 0 */
|
||||
{ 0, Ukn ITR(1, "aync_daemon", "") }, /* 1 */
|
||||
{ 0, Ukn ITR(1, "nfs_getfh", "") }, /* 2 */
|
||||
{ 0, Ukn ITR(1, "nfsmount", "") }, /* 3 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 4 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 5 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 6 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 7 */
|
||||
};
|
||||
static IBCS_func *iBCS_group_WYSENFS[] = {
|
||||
WYSENFS_func_0x00
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func XNX_func_0x00[] = {
|
||||
{ 0, 1,Ukn, "syscall", "", }, /* 0 */
|
||||
{ xnx_locking, 1,3, "locking", "ddd", }, /* 1 */
|
||||
{ xnx_creatsem, 1,2, "creatsem", "sd", }, /* 2 */
|
||||
{ xnx_opensem, 1,1, "opensem", "s", }, /* 3 */
|
||||
{ xnx_sigsem, 1,1, "sigsem", "d", }, /* 4 */
|
||||
{ xnx_waitsem, 1,1, "waitsem", "d", }, /* 5 */
|
||||
{ xnx_nbwaitsem, 1,1, "nbwaitsem", "d", }, /* 6 */
|
||||
{ xnx_rdchk, 1,1, "rdchk", "d", } /* 7 */
|
||||
{ 0, Ukn ITR(1, "syscall", "") }, /* 0 */
|
||||
{ xnx_locking, 3 ITR(1, "locking", "ddd") }, /* 1 */
|
||||
{ xnx_creatsem, 2 ITR(1, "creatsem", "sd") }, /* 2 */
|
||||
{ xnx_opensem, 1 ITR(1, "opensem", "s") }, /* 3 */
|
||||
{ xnx_sigsem, 1 ITR(1, "sigsem", "d") }, /* 4 */
|
||||
{ xnx_waitsem, 1 ITR(1, "waitsem", "d") }, /* 5 */
|
||||
{ xnx_nbwaitsem, 1 ITR(1, "nbwaitsem", "d") }, /* 6 */
|
||||
{ xnx_rdchk, 1 ITR(0, "rdchk", "d") } /* 7 */
|
||||
};
|
||||
static IBCS_func XNX_func_0x08[] = {
|
||||
{ 0, 1,Ukn, "?", "", }, /* 8 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 9 */
|
||||
{ xnx_chsize, 1,2, "chsize", "dd", }, /* 10 */
|
||||
{ xnx_ftime, 1,Ukn, "ftime", "", }, /* 11 */
|
||||
{ xnx_nap, 1,1, "nap", "d", }, /* 12 */
|
||||
{ xnx_sdget, 1,4, "sdget", "sddd", }, /* 13 */
|
||||
{ xnx_sdfree, 1,1, "sdfree", "x", }, /* 14 */
|
||||
{ xnx_sdenter, 1,2, "sdenter", "xd", } /* 15 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 8 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 9 */
|
||||
{ xnx_chsize, 2 ITR(1, "chsize", "dd") }, /* 10 */
|
||||
{ xnx_ftime, 1 ITR(0, "ftime", "x") }, /* 11 */
|
||||
{ xnx_nap, 1 ITR(1, "nap", "d") }, /* 12 */
|
||||
{ xnx_sdget, 4 ITR(1, "sdget", "sddd") }, /* 13 */
|
||||
{ xnx_sdfree, 1 ITR(1, "sdfree", "x") }, /* 14 */
|
||||
{ xnx_sdenter, 2 ITR(1, "sdenter", "xd") } /* 15 */
|
||||
};
|
||||
static IBCS_func XNX_func_0x10[] = {
|
||||
{ xnx_sdleave, 1,1, "sdleave", "x", }, /* 16 */
|
||||
{ xnx_sdgetv, 1,1, "sdgetv", "x", }, /* 17 */
|
||||
{ xnx_sdwaitv, 1,2, "sdwaitv", "xd", }, /* 18 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 19 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 20 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 21 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 22 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 23 */
|
||||
{ xnx_sdleave, 1 ITR(1, "sdleave", "x") }, /* 16 */
|
||||
{ xnx_sdgetv, 1 ITR(1, "sdgetv", "x") }, /* 17 */
|
||||
{ xnx_sdwaitv, 2 ITR(1, "sdwaitv", "xd") }, /* 18 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 19 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 20 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 21 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 22 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 23 */
|
||||
};
|
||||
static IBCS_func XNX_func_0x20[] = {
|
||||
{ xnx_proctl, 1,3, "proctl", "ddx", }, /* 32 */
|
||||
{ xnx_execseg, 1,2, "execseg", "xd", }, /* 33 */
|
||||
{ xnx_unexecseg, 1,1, "unexecseg", "x", }, /* 34 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 35 */
|
||||
{ xnx_select, 1,Ukn, "select", "", }, /* 36 */
|
||||
{ xnx_eaccess, 1,Ukn, "eaccess", "", }, /* 37 */
|
||||
{ xnx_paccess, 1,Ukn, "paccess", "", }, /* 38 */
|
||||
{ xnx_sigaction, 1,Ukn, "sigaction", "", } /* 39 */
|
||||
{ xnx_proctl, 3 ITR(0, "proctl", "ddx") }, /* 32 */
|
||||
{ xnx_execseg, 2 ITR(1, "execseg", "xd") }, /* 33 */
|
||||
{ xnx_unexecseg, 1 ITR(1, "unexecseg", "x") }, /* 34 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 35 */
|
||||
{ ibcs_select, Spl ITR(1, "select", "dxxxx")}, /* 36 */
|
||||
{ xnx_eaccess, 2 ITR(1, "eaccess", "so") }, /* 37 */
|
||||
{ xnx_paccess, 5 ITR(1, "paccess", "dddds")},/* 38 */
|
||||
{ xnx_sigaction, 3 ITR(1, "sigaction", "dxx") } /* 39 */
|
||||
};
|
||||
static IBCS_func XNX_func_0x28[] = {
|
||||
{ xnx_sigprocmask, 1,Ukn, "sigprocmask", "", }, /* 40 */
|
||||
{ xnx_sigpending, 1,Ukn, "sigpending", "", }, /* 41 */
|
||||
{ xnx_sigsuspend, 1,Ukn, "sigsuspend", "", }, /* 42 */
|
||||
{ sys_getgroups, 1,Ukn, "getgroups", "", }, /* 43 */
|
||||
{ sys_setgroups, 1,Ukn, "setgroups", "", }, /* 44 */
|
||||
{ sys_sysconf, 1,1, "sysconf", "d", }, /* 45 */
|
||||
{ xnx_pathconf, 1,Ukn, "pathconf", "", }, /* 46 */
|
||||
{ xnx_fpathconf, 1,Ukn, "fpathconf", "", } /* 47 */
|
||||
{ xnx_sigprocmask, 3 ITR(1, "sigprocmask", "dxx") }, /* 40 */
|
||||
{ xnx_sigpending, 1 ITR(1, "sigpending", "x") }, /* 41 */
|
||||
{ xnx_sigsuspend, 1 ITR(1, "sigsuspend", "x") }, /* 42 */
|
||||
{ sys_getgroups, 2 ITR(1, "getgroups", "dx") }, /* 43 */
|
||||
{ sys_setgroups, 2 ITR(1, "setgroups", "dx") }, /* 44 */
|
||||
{ sys_sysconf, 1 ITR(1, "sysconf", "d") }, /* 45 */
|
||||
{ xnx_pathconf, 2 ITR(1, "pathconf", "xd") }, /* 46 */
|
||||
{ xnx_fpathconf, 2 ITR(1, "fpathconf", "dd") } /* 47 */
|
||||
};
|
||||
static IBCS_func XNX_func_0x30[] = {
|
||||
{ sys_rename, 0,2, "rename", "ss", }, /* 48 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 49 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 50 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 51 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 52 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 53 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 54 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 55 */
|
||||
{ sys_rename, 2 ITR(0, "rename", "ss") }, /* 48 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 49 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 50 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 51 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 52 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 53 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 54 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 55 */
|
||||
};
|
||||
static IBCS_func *iBCS_class_XNX[] = {
|
||||
static IBCS_func *iBCS_group_XNX[] = {
|
||||
XNX_func_0x00,
|
||||
XNX_func_0x08,
|
||||
XNX_func_0x10,
|
||||
|
@ -363,116 +175,349 @@ static IBCS_func *iBCS_class_XNX[] = {
|
|||
XNX_func_0x30
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------ */
|
||||
|
||||
static IBCS_func WYSETCP_func_0x00[] = {
|
||||
{ wv386_select, 1,Spl, "select", "dxxxx",}, /* 0 */
|
||||
{ wv386_socket, 1,Spl, "socket", "ddd", }, /* 1 */
|
||||
{ wv386_connect, 1,Spl, "connect", "dxd", }, /* 2 */
|
||||
{ wv386_accept, 1,Spl, "accept", "dxx", }, /* 3 */
|
||||
{ wv386_send, 1,Spl, "send", "dxdd", }, /* 4 */
|
||||
{ wv386_recv, 1,Spl, "recv", "dxdd", }, /* 5 */
|
||||
{ wv386_bind, 1,Spl, "bind", "dxd", }, /* 6 */
|
||||
{ wv386_setsockopt, 1,Spl, "setsockopt", "", } /* 7 */
|
||||
static IBCS_func iBCS_func_0x00[] = {
|
||||
{ ibcs_syscall, Fast ITR(0, "syscall", "") }, /* 0 */
|
||||
#ifndef CONFIG_BINFMT_IBCS
|
||||
{ ibcs_exit, 1 ITR(0, "exit", "d") }, /* 1 */
|
||||
#else
|
||||
{ sys_exit, 1 ITR(0, "exit", "d") }, /* 1 */
|
||||
#endif
|
||||
{ ibcs_fork, Spl ITR(0, "fork", "") }, /* 2 */
|
||||
{ ibcs_read, 3 ITR(0, "read", "dpd") }, /* 3 */
|
||||
{ sys_write, 3 ITR(0, "write", "dpd") }, /* 4 */
|
||||
{ ibcs_open, 3 ITR(0, "open", "soo") }, /* 5 */
|
||||
{ sys_close, 1 ITR(0, "close", "d") }, /* 6 */
|
||||
{ ibcs_wait, Spl ITR(0, "wait", "xxx") } /* 7 */
|
||||
};
|
||||
static IBCS_func WYSETCP_func_0x08[] = {
|
||||
{ wv386_listen, 1,Spl, "listen", "", }, /* 8 */
|
||||
{ 0, 1,3, "recvmsg", "dxd", }, /* 9 */
|
||||
{ 0, 1,3, "sendmsg", "dxd", }, /* 10 */
|
||||
{ wv386_getsockopt, 1,Spl, "getsockopt", "", }, /* 11 */
|
||||
{ wv386_recvfrom, 1,Spl, "recvfrom", "dxddxd",}, /* 12 */
|
||||
{ wv386_sendto, 1,Spl, "sendto", "dxddxd",}, /* 13 */
|
||||
{ wv386_shutdown, 1,Spl, "shutdown", "dd", }, /* 14 */
|
||||
{ wv386_socketpair, 1,Spl, "socketpair", "dddx", } /* 15 */
|
||||
static IBCS_func iBCS_func_0x08[] = {
|
||||
{ sys_creat, 2 ITR(0, "creat", "so") }, /* 8 */
|
||||
{ sys_link, 2 ITR(0, "link", "ss") }, /* 9 */
|
||||
{ sys_unlink, 1 ITR(0, "unlink", "s") }, /* 10 */
|
||||
{ ibcs_exec, Spl ITR(0, "exec", "sxx") }, /* 11 */
|
||||
{ sys_chdir, 1 ITR(0, "chdir", "s") }, /* 12 */
|
||||
{ sys_time, 1 ITR(0, "time", "d") }, /* 13 */
|
||||
{ sys_mknod, 3 ITR(0, "mknod", "soo") }, /* 14 */
|
||||
{ sys_chmod, 2 ITR(0, "chmod", "so") } /* 15 */
|
||||
};
|
||||
static IBCS_func WYSETCP_func_0x10[] = {
|
||||
{ 0, 1,Ukn, "trace", "", }, /* 16 */
|
||||
{ wv386_getpeername, 1,Spl, "getpeername", "dxx", }, /* 17 */
|
||||
{ wv386_getsockname, 1,Spl, "getsockname", "", }, /* 18 */
|
||||
{ wv386_wait3, 1,1, "wait3", "x", }, /* 19 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 20 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 21 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 22 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 23 */
|
||||
static IBCS_func iBCS_func_0x10[] = {
|
||||
{ sys_chown, 3 ITR(0, "chown", "sdd") }, /* 16 */
|
||||
{ sys_brk, 1 ITR(0, "brk/break", "x") }, /* 17 */
|
||||
{ ibcs_stat, 2 ITR(0, "stat", "sp") }, /* 18 */
|
||||
{ sys_lseek, 3 ITR(0, "seek/lseek", "ddd") }, /* 19 */
|
||||
{ ibcs_getpid, Spl ITR(0, "getpid", "") }, /* 20 */
|
||||
{ 0, Ukn ITR(1, "mount", "") }, /* 21 */
|
||||
{ sys_umount, 1 ITR(0, "umount", "s") }, /* 22 */
|
||||
{ sys_setuid, 1 ITR(0, "setuid", "d") } /* 23 */
|
||||
};
|
||||
static IBCS_func *iBCS_class_WYSETCP[] = {
|
||||
WYSETCP_func_0x00,
|
||||
WYSETCP_func_0x08,
|
||||
WYSETCP_func_0x10
|
||||
static IBCS_func iBCS_func_0x18[] = {
|
||||
{ ibcs_getuid, Spl ITR(0, "getuid", "") }, /* 24 */
|
||||
{ sys_stime, 1 ITR(0, "stime", "d") }, /* 25 */
|
||||
{ sys_ptrace, 4 ITR(0, "ptrace", "xxxx")}, /* 26 */
|
||||
{ sys_alarm, 1 ITR(0, "alarm", "d") }, /* 27 */
|
||||
{ ibcs_fstat, 2 ITR(0, "fstat", "dp") }, /* 28 */
|
||||
{ sys_pause, 0 ITR(0, "pause", "") }, /* 29 */
|
||||
{ sys_utime, 2 ITR(0, "utime", "xx") }, /* 30 */
|
||||
{ 0, Ukn ITR(0, "stty", "") } /* 31 */
|
||||
};
|
||||
|
||||
|
||||
static IBCS_func WYSENFS_func_0x00[] = {
|
||||
{ 0, 1,Ukn, "nfs_svc", "", }, /* 0 */
|
||||
{ 0, 1,Ukn, "aync_daemon", "", }, /* 1 */
|
||||
{ 0, 1,Ukn, "nfs_getfh", "", }, /* 2 */
|
||||
{ 0, 1,Ukn, "nfsmount", "", }, /* 3 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 4 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 5 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 6 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 7 */
|
||||
static IBCS_func iBCS_func_0x20[] = {
|
||||
{ 0, Ukn ITR(1, "gtty", "") }, /* 32 */
|
||||
{ sys_access, 2 ITR(0, "access", "so") }, /* 33 */
|
||||
{ sys_nice, 1 ITR(0, "nice", "d") }, /* 34 */
|
||||
{ ibcs_statfs, 2 ITR(0, "statfs", "sp") }, /* 35 */
|
||||
{ sys_sync, 0 ITR(0, "sync", "") }, /* 36 */
|
||||
{ ibcs_kill, 2 ITR(0, "kill", "dd") }, /* 37 */
|
||||
{ ibcs_fstatfs, 2 ITR(0, "fstatfs", "dp") }, /* 38 */
|
||||
{ ibcs_procids, Spl ITR(0, "ibcs_procids", "d") } /* 39 */
|
||||
};
|
||||
static IBCS_func *iBCS_class_WYSENFS[] = {
|
||||
WYSENFS_func_0x00
|
||||
static IBCS_func iBCS_func_0x28[] = {
|
||||
{ iBCS_group_XNX, Class ITR(0, "cxenix", "") }, /* 40 */
|
||||
{ sys_dup, 1 ITR(0, "dup", "d") }, /* 41 */
|
||||
{ ibcs_pipe, Spl ITR(0, "pipe", "") }, /* 42 */
|
||||
{ sys_times, 1 ITR(0, "times", "p") }, /* 43 */
|
||||
{ sys_profil, 4 ITR(0, "prof", "xxxx")}, /* 44 */
|
||||
{ 0, Ukn ITR(1, "lock/plock", "") }, /* 45 */
|
||||
{ sys_setgid, 1 ITR(0, "setgid", "d") }, /* 46 */
|
||||
{ ibcs_getgid, Spl ITR(0, "getgid", "") } /* 47 */
|
||||
};
|
||||
|
||||
|
||||
static IBCS_func LNX_func_0x00[] = {
|
||||
{ ibcs_trace_set, 0,1, "trace", "d", }, /* 0 */
|
||||
{ ibcs_trace_func, 0,4, "trace", "dddd", }, /* 1 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 2 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 3 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 4 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 5 */
|
||||
{ 0, 1,Ukn, "?", "", }, /* 6 */
|
||||
{ 0, 1,Ukn, "?", "", } /* 7 */
|
||||
static IBCS_func iBCS_func_0x30[] = {
|
||||
{ ibcs_sigfunc, Fast ITR(0, "signal", "xxx") }, /* 48 */
|
||||
{ 0, Ukn ITR(0, "msgsys", "") }, /* 49 */
|
||||
{ ibcs_sysi86, Spl ITR(0, "sysi86/sys3b", "d") }, /* 50 */
|
||||
{ sys_acct, 1 ITR(0, "acct/sysacct", "x") }, /* 51 */
|
||||
{ ibcs_shmsys, Fast ITR(0, "shmsys", "ddxo")}, /* 52 */
|
||||
{ ibcs_semsys, Spl ITR(0, "semsys", "dddx")}, /* 53 */
|
||||
{ ibcs_ioctl, 3 ITR(0, "ioctl", "dxx") }, /* 54 */
|
||||
{ 0, 3 ITR(0, "uadmin", "xxx") } /* 55 */
|
||||
};
|
||||
static IBCS_func *iBCS_class_LNX[] = {
|
||||
LNX_func_0x00
|
||||
static IBCS_func iBCS_func_0x38[] = {
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 56 */
|
||||
{ sys_olduname, 1 ITR(0, "utsys", "p") }, /* 57 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 58 */
|
||||
{ ibcs_execv, Spl ITR(0, "execv", "spp") }, /* 59 */
|
||||
{ sys_umask, 1 ITR(0, "umask", "o") }, /* 60 */
|
||||
{ sys_chroot, 1 ITR(0, "chroot", "s") }, /* 61 */
|
||||
{ ibcs_fcntl, Spl ITR(0, "fcntl", "ddx") }, /* 62 */
|
||||
{ ibcs_ulimit, 2 ITR(0, "ulimit", "xx") } /* 63 */
|
||||
};
|
||||
|
||||
|
||||
static IBCS_func **iBCS_personality_LINUX[] = {
|
||||
NULL, /* Base class 0x00 */
|
||||
NULL, /* Xenix class 0x28 */
|
||||
NULL, /* No Wyse TCP/IP class 0x83 */
|
||||
NULL, /* No Wyse NFS class 0x84 */
|
||||
iBCS_class_LNX /* Linux additions in class 0xff */
|
||||
static IBCS_func iBCS_func_0x40[] = {
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 64 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 65 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 66 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 67 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 68 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 69 */
|
||||
{ 0, Ukn ITR(1, "advfs", "") }, /* 70 */
|
||||
{ 0, Ukn ITR(1, "unadvfs", "") } /* 71 */
|
||||
};
|
||||
|
||||
static IBCS_func **iBCS_personality_SVR4[] = {
|
||||
iBCS_class_SVR4, /* Base class 0x00 */
|
||||
iBCS_class_XNX, /* Xenix class 0x28 */
|
||||
NULL, /* No Wyse TCP/IP class 0x83 */
|
||||
NULL, /* No Wyse NFS class 0x84 */
|
||||
iBCS_class_LNX /* Linux additions in class 0xff */
|
||||
static IBCS_func iBCS_func_0x48[] = {
|
||||
{ 0, Ukn ITR(1, "rmount", "") }, /* 72 */
|
||||
{ 0, Ukn ITR(1, "rumount", "") }, /* 73 */
|
||||
{ 0, Ukn ITR(1, "rfstart", "") }, /* 74 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 75 */
|
||||
{ 0, Ukn ITR(1, "rdebug", "") }, /* 76 */
|
||||
{ 0, Ukn ITR(1, "rfstop", "") }, /* 77 */
|
||||
{ 0, Ukn ITR(1, "rfsys", "") }, /* 78 */
|
||||
{ sys_rmdir, 1 ITR(1, "rmdir", "s") } /* 79 */
|
||||
};
|
||||
|
||||
static IBCS_func **iBCS_personality_SCOSVR3[] = {
|
||||
iBCS_class_SCOSVR3, /* Base class 0x00 */
|
||||
iBCS_class_XNX, /* Xenix class 0x28 */
|
||||
NULL, /* No Wyse TCP/IP class 0x83 */
|
||||
NULL, /* No Wyse NFS class 0x84 */
|
||||
iBCS_class_LNX /* Linux additions in class 0xff */
|
||||
static IBCS_func iBCS_func_0x50[] = {
|
||||
{ sys_mkdir, 2 ITR(0, "mkdir", "so") }, /* 80 */
|
||||
{ ibcs_getdents, 3 ITR(0, "getdents", "dxd") }, /* 81 */
|
||||
{ 0, Ukn ITR(1, "libattach", "") }, /* 82 */
|
||||
{ 0, Ukn ITR(1, "libdetach", "") }, /* 83 */
|
||||
{ ibcs_sysfs, Spl ITR(0, "sysfs", "dxx") }, /* 84 */
|
||||
{ 0, Ukn ITR(1, "getmsg", "") }, /* 85 */
|
||||
{ 0, Ukn ITR(1, "putmsg", "") }, /* 86 */
|
||||
{ 0, Ukn ITR(1, "poll", "") } /* 87 */
|
||||
};
|
||||
|
||||
static IBCS_func **iBCS_personality_WYSEV386[] = {
|
||||
iBCS_class_WYSEV386, /* Base class 0x00 */
|
||||
iBCS_class_XNX, /* Xenix class 0x28 */
|
||||
iBCS_class_WYSETCP, /* Wyse TCP/IP class 0x83 */
|
||||
iBCS_class_WYSENFS, /* Wyse NFS class 0x84 */
|
||||
iBCS_class_LNX /* Linux additions in class 0xff */
|
||||
static IBCS_func iBCS_func_0x58[] = {
|
||||
{ ibcs_lstat, 2 ITR(0, "lstat", "sp") }, /* 88 */
|
||||
{ sys_symlink, 2 ITR(0, "symlink", "ss") }, /* 89 */
|
||||
{ sys_readlink, 3 ITR(0, "readlink", "spd") }, /* 90 */
|
||||
{ sys_setgroups, 2 ITR(0, "setgroups", "dp") }, /* 91 */
|
||||
{ sys_getgroups, 2 ITR(0, "getgroups", "dp") }, /* 92 */
|
||||
{ 0, 3 ITR(1, "fchmod", "do") }, /* 93 */
|
||||
{ 0, 3 ITR(1, "fchown", "dxx") }, /* 94 */
|
||||
{ abi_sigprocmask, 3 ITR(1, "sigprocmask", "dxx") } /* 95 */
|
||||
};
|
||||
static IBCS_func SCOSVR3_func_0x58[] = {
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 88 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 89 */
|
||||
{ sys_symlink, 2 ITR(0, "symlink", "ss") }, /* 90 */
|
||||
{ ibcs_lstat, 2 ITR(0, "lstat", "sp") }, /* 91 */
|
||||
{ sys_readlink, 3 ITR(0, "readlink", "spd") }, /* 92 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 93 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 94 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 95 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x60[] = {
|
||||
{ abi_sigsuspend, Spl ITR(1, "sigsuspend", "x") }, /* 96 */
|
||||
{ 0, 2 ITR(1, "sigaltstack", "xx") }, /* 97 */
|
||||
{ abi_sigaction, 3 ITR(1, "sigaction", "dxx") }, /* 98 */
|
||||
{ 0, 1 ITR(1, "sigpending", "x") }, /* 99 */
|
||||
{ 0, Ukn ITR(1, "context", "") }, /* 100 */
|
||||
{ 0, Ukn ITR(1, "evsys", "") }, /* 101 */
|
||||
{ 0, Ukn ITR(1, "evtrapret", "") }, /* 102 */
|
||||
{ 0, Ukn ITR(1, "statvfs", "") } /* 103 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x68[] = {
|
||||
{ 0, Ukn ITR(1, "fstatvfs", "") }, /* 104 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 105 */
|
||||
{ 0, Ukn ITR(1, "nfssys", "") }, /* 106 */
|
||||
{ 0, Ukn ITR(1, "waitsys", "") }, /* 107 */
|
||||
{ 0, Ukn ITR(1, "sigsendsys", "") }, /* 108 */
|
||||
{ 0, Ukn ITR(1, "hrtsys", "") }, /* 109 */
|
||||
{ 0, Ukn ITR(1, "acancel", "") }, /* 110 */
|
||||
{ 0, Ukn ITR(1, "async", "") } /* 111 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x70[] = {
|
||||
{ 0, Ukn ITR(1, "priocntlsys", "") }, /* 112 */
|
||||
{ 0, Ukn ITR(1, "pathconf", "") }, /* 113 */
|
||||
{ 0, Ukn ITR(1, "mincore", "") }, /* 114 */
|
||||
{ ibcs_mmap, 6 ITR(0, "mmap", "xxxxdx") },/* 115 */
|
||||
{ sys_mprotect, 3 ITR(0, "mprotect", "xdx") },/* 116 */
|
||||
{ sys_munmap, 2 ITR(0, "munmap", "xd") },/* 117 */
|
||||
{ 0, Ukn ITR(1, "fpathconf", "") }, /* 118 */
|
||||
{ 0, Ukn ITR(1, "vfork", "") } /* 119 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x78[] = {
|
||||
{ 0, Ukn ITR(1, "fchdir", "") }, /* 120 */
|
||||
{ 0, Ukn ITR(1, "readv", "") }, /* 121 */
|
||||
{ 0, Ukn ITR(1, "writev", "") }, /* 122 */
|
||||
{ ibcs_xstat, 3 ITR(0, "xstat", "dsx") }, /* 123 */
|
||||
{ ibcs_lxstat, 3 ITR(0, "lxstat", "dsx") }, /* 124 */
|
||||
{ ibcs_fxstat, 3 ITR(0, "fxstat", "ddx") }, /* 125 */
|
||||
{ ibcs_xmknod, 4 ITR(0, "xmknod", "dsox")}, /* 126 */
|
||||
{ 0, Ukn ITR(1, "clocal", "") } /* 127 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x80[] = {
|
||||
{ 0, Ukn ITR(1, "setrlimit", "") }, /* 128 */
|
||||
{ 0, Ukn ITR(1, "getrlimit", "") }, /* 129 */
|
||||
{ 0, Ukn ITR(1, "lchown", "") }, /* 130 */
|
||||
{ 0, Ukn ITR(1, "memcntl", "") }, /* 131 */
|
||||
{ 0, Ukn ITR(1, "getpmsg", "") }, /* 132 */
|
||||
{ 0, Ukn ITR(1, "putpmsg", "") }, /* 133 */
|
||||
{ 0, Ukn ITR(1, "rename", "") }, /* 134 */
|
||||
{ 0, Ukn ITR(1, "uname", "") } /* 135 */
|
||||
};
|
||||
static IBCS_func WYSEV386_func_0x80[] = {
|
||||
{ ibcs_lstat, 2 ITR(0, "lstat", "sp") }, /* 128 */
|
||||
{ sys_readlink, 3 ITR(0, "readlink", "spd") }, /* 129 */
|
||||
{ sys_symlink, 2 ITR(0, "symlink", "ss") }, /* 130 */
|
||||
{ iBCS_group_WYSETCP,Class ITR(0, "?", "") }, /* 131 */
|
||||
{ iBCS_group_WYSENFS,Class ITR(0, "?", "") }, /* 132 */
|
||||
{ wv386_gethostname, 2 ITR(0, "gethostname", "xd") }, /* 133 */
|
||||
{ sys_sethostname, 2 ITR(0, "sethostname", "sd") }, /* 134 */
|
||||
{ wv386_getdomainname,2 ITR(0, "getdomainname","xd") } /* 135 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0x88[] = {
|
||||
{ 0, Ukn ITR(1, "setegid", "") }, /* 136 */
|
||||
{ 0, Ukn ITR(1, "sysconfig", "") }, /* 137 */
|
||||
{ 0, Ukn ITR(1, "adjtime", "") }, /* 138 */
|
||||
{ 0, Ukn ITR(1, "systeminfo", "") }, /* 139 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 140 */
|
||||
{ 0, Ukn ITR(1, "seteuid", "") }, /* 141 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 142 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 143 */
|
||||
};
|
||||
static IBCS_func WYSEV386_func_0x88[] = {
|
||||
{ sys_setdomainname, 2 ITR(0, "setdomainname","sd") }, /* 136 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 137 */
|
||||
{ sys_setreuid, 2 ITR(0, "setreuid", "dd") }, /* 138 */
|
||||
{ sys_setregid, 2 ITR(0, "setregid", "dd") }, /* 139 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 140 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 141 */
|
||||
{ 0, Ukn ITR(1, "?", "") }, /* 142 */
|
||||
{ 0, Ukn ITR(1, "?", "") } /* 143 */
|
||||
};
|
||||
static IBCS_func iBCS_func_0xf8[] = {
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ 0, Ukn ITR(1, "?", "") },
|
||||
{ iBCS_group_WYSETCP,Class ITR(1, "?", "") },
|
||||
#ifdef IBCS_TRACE
|
||||
{ iBCS_group_LNX, Class ITR(0, "?", "") }
|
||||
#else
|
||||
{ 0, Ukn ITR(1, "?", "") }
|
||||
#endif
|
||||
};
|
||||
static IBCS_func *iBCS_group_SVR4[] = {
|
||||
iBCS_func_0x00,
|
||||
iBCS_func_0x08,
|
||||
iBCS_func_0x10,
|
||||
iBCS_func_0x18,
|
||||
iBCS_func_0x20,
|
||||
iBCS_func_0x28,
|
||||
iBCS_func_0x30,
|
||||
iBCS_func_0x38,
|
||||
iBCS_func_0x40,
|
||||
iBCS_func_0x48,
|
||||
iBCS_func_0x50,
|
||||
iBCS_func_0x58,
|
||||
iBCS_func_0x60,
|
||||
iBCS_func_0x68,
|
||||
iBCS_func_0x70,
|
||||
iBCS_func_0x78,
|
||||
iBCS_func_0x80,
|
||||
iBCS_func_0x88,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
iBCS_func_0xf8
|
||||
};
|
||||
static IBCS_func *iBCS_group_SCOSVR3[] = {
|
||||
iBCS_func_0x00,
|
||||
iBCS_func_0x08,
|
||||
iBCS_func_0x10,
|
||||
iBCS_func_0x18,
|
||||
iBCS_func_0x20,
|
||||
iBCS_func_0x28,
|
||||
iBCS_func_0x30,
|
||||
iBCS_func_0x38,
|
||||
iBCS_func_0x40,
|
||||
iBCS_func_0x48,
|
||||
iBCS_func_0x50,
|
||||
SCOSVR3_func_0x58,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused, /* clocal() is here but who cares? */
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
iBCS_func_0xf8
|
||||
};
|
||||
static IBCS_func *iBCS_group_WYSEV386[] = {
|
||||
iBCS_func_0x00,
|
||||
iBCS_func_0x08,
|
||||
iBCS_func_0x10,
|
||||
iBCS_func_0x18,
|
||||
iBCS_func_0x20,
|
||||
iBCS_func_0x28,
|
||||
iBCS_func_0x30,
|
||||
iBCS_func_0x38,
|
||||
iBCS_func_0x40,
|
||||
iBCS_func_0x48,
|
||||
iBCS_func_0x50,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
WYSEV386_func_0x80,
|
||||
WYSEV386_func_0x88,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
Unused,
|
||||
iBCS_func_0xf8
|
||||
};
|
||||
|
||||
|
||||
/* The following sequence should match the defined values in the
|
||||
* header linux/include/linux/personality.h
|
||||
*/
|
||||
static IBCS_func ***IBCS_personality_map[] = {
|
||||
iBCS_personality_LINUX, /* This should never be used? */
|
||||
iBCS_personality_SVR4, /* SVR4 (base iBCS) */
|
||||
iBCS_personality_SVR4, /* Base SVR3 (no extensions) is a subset
|
||||
* of SVR4.
|
||||
*/
|
||||
iBCS_personality_SCOSVR3, /* SVR3 with SCO extensions. */
|
||||
iBCS_personality_WYSEV386 /* SVR3 with Wyse extensions. */
|
||||
static IBCS_func **iBCS_personality_map[] = {
|
||||
iBCS_group_SVR4, /* This (Linux) should never be used? */
|
||||
iBCS_group_SVR4, /* SVR4 (base iBCS) */
|
||||
iBCS_group_SVR4, /* Base SVR3 (no extensions) is a subset
|
||||
* of SVR4.
|
||||
*/
|
||||
iBCS_group_SCOSVR3, /* SVR3 with SCO extensions. */
|
||||
iBCS_group_WYSEV386 /* SVR3 with Wyse extensions. */
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Please consider this closely if you plan on changing this mode.
|
||||
* -- Al Longyear
|
||||
*
|
||||
* $Id: signal.c,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* $Id: signal.c,v 1.2 1994/02/28 09:15:31 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/iBCSemul/signal.c,v $
|
||||
*/
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
|||
#include <linux/ptrace.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <linux/personality.h>
|
||||
|
||||
#include <asm/segment.h>
|
||||
#include <asm/system.h>
|
||||
|
@ -32,24 +33,20 @@
|
|||
#include <linux/sys.h>
|
||||
|
||||
#include <ibcs/ibcs.h>
|
||||
#include <ibcs/trace.h>
|
||||
#include <ibcs/xnx.h>
|
||||
#include <linux/fs.h>
|
||||
#include <ibcs/abi4.h>
|
||||
|
||||
#include <signal.h>
|
||||
#define SIG_HOLD ((__sighandler_t)2) /* hold signal */
|
||||
|
||||
/* Translate errors from Linux to iBCS. This is in the emulate.c module. */
|
||||
|
||||
extern int iABI_errors (int error);
|
||||
#ifdef IBCS_TRACE
|
||||
#include <ibcs/trace.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
extern int ibcs_trace;
|
||||
#define TRACE_KEY 0x10 /* Flag to trace calls to this module */
|
||||
#define TRACE (ibcs_trace & TRACE_KEY)
|
||||
|
||||
typedef void (*pfn) (void); /* Completion function */
|
||||
|
||||
|
@ -89,10 +86,93 @@ typedef void (*pfn) (void); /* Completion function */
|
|||
#define FROM_KERNEL(save) \
|
||||
set_fs (save)
|
||||
|
||||
/*
|
||||
* Translate the signal number to the corresponding item for Linux.
|
||||
*/
|
||||
inline int ibcs_mapsig(int sig) {
|
||||
/* These are the flags for the SVr4 sigaction struct */
|
||||
#define ABI_SA_ONSTACK 1
|
||||
#define ABI_SA_RESETHAND 2
|
||||
#define ABI_SA_RESTART 4
|
||||
#define ABI_SA_SIGINFO 8
|
||||
#define ABI_SA_NODEFER 16
|
||||
#define ABI_SA_NOCLDWAIT 0x10000
|
||||
#define ABI_SA_NOCLDSTOP 0x20000
|
||||
|
||||
/* These are the error numbers for the SVr4 signal handling */
|
||||
#define IBCS_SIGHUP 1
|
||||
#define IBCS_SIGINT 2
|
||||
#define IBCS_SIGQUIT 3
|
||||
#define IBCS_SIGILL 4
|
||||
#define IBCS_SIGTRAP 5
|
||||
#define IBCS_SIGIOT 6
|
||||
#define IBCS_SIGABRT 6
|
||||
#define IBCS_SIGEMT 7
|
||||
#define IBCS_SIGFPE 8
|
||||
#define IBCS_SIGKILL 9
|
||||
#define IBCS_SIGBUS 10
|
||||
#define IBCS_SIGSEGV 11
|
||||
#define IBCS_SIGSYS 12
|
||||
#define IBCS_SIGPIPE 13
|
||||
#define IBCS_SIGALRM 14
|
||||
#define IBCS_SIGTERM 15
|
||||
#define IBCS_SIGUSR1 16
|
||||
#define IBCS_SIGUSR2 17
|
||||
#define IBCS_SIGCLD 18
|
||||
#define IBCS_SIGCHLD 18
|
||||
#define IBCS_SIGPWR 19
|
||||
#define IBCS_SIGWINCH 20
|
||||
#define IBCS_SIGURG 21
|
||||
#define IBCS_SIGPOLL 22
|
||||
#define IBCS_SIGIO 22
|
||||
#define IBCS_SIGSTOP 23
|
||||
#define IBCS_SIGTSTP 24
|
||||
#define IBCS_SIGCONT 25
|
||||
#define IBCS_SIGTTIN 26
|
||||
#define IBCS_SIGTTOU 27
|
||||
#define IBCS_SIGVTALRM 28
|
||||
#define IBCS_SIGPROF 29
|
||||
#define IBCS_SIGGXCPU 30
|
||||
#define IBCS_SIGGXFSZ 31
|
||||
|
||||
/* This array is used to convert from linux signals to ibcs2 signals.
|
||||
You should index the array with the linux signal number, and you
|
||||
get the equivalent ibcs2 signal number out the other side */
|
||||
|
||||
static int lsignals [] = {
|
||||
-1,
|
||||
IBCS_SIGHUP,
|
||||
IBCS_SIGINT,
|
||||
IBCS_SIGQUIT,
|
||||
IBCS_SIGILL,
|
||||
IBCS_SIGTRAP,
|
||||
IBCS_SIGABRT,
|
||||
-1,
|
||||
IBCS_SIGFPE,
|
||||
IBCS_SIGKILL,
|
||||
IBCS_SIGUSR1,
|
||||
IBCS_SIGSEGV,
|
||||
IBCS_SIGUSR2,
|
||||
IBCS_SIGPIPE,
|
||||
IBCS_SIGALRM,
|
||||
IBCS_SIGTERM,
|
||||
-1,
|
||||
IBCS_SIGCHLD,
|
||||
IBCS_SIGCONT,
|
||||
IBCS_SIGSTOP,
|
||||
IBCS_SIGTSTP,
|
||||
IBCS_SIGTTIN,
|
||||
IBCS_SIGTTOU,
|
||||
IBCS_SIGIO,
|
||||
IBCS_SIGGXCPU,
|
||||
IBCS_SIGGXFSZ,
|
||||
IBCS_SIGVTALRM,
|
||||
IBCS_SIGPROF,
|
||||
IBCS_SIGWINCH,
|
||||
-1,
|
||||
IBCS_SIGPWR
|
||||
};
|
||||
|
||||
/* This array is used to convert from iBCS2 signals to linux signals.
|
||||
You should index the array with the iBCS2 signal number, and you
|
||||
get the equivalent linux signal number out the other side */
|
||||
|
||||
static int signals [] = {
|
||||
-1,
|
||||
SIGHUP,
|
||||
|
@ -105,7 +185,7 @@ inline int ibcs_mapsig(int sig) {
|
|||
SIGFPE,
|
||||
SIGKILL,
|
||||
SIGUNUSED, /* SIGSYS */
|
||||
SIGUNUSED, /* SIGSEGV */
|
||||
SIGSEGV,
|
||||
SIGUNUSED,
|
||||
SIGPIPE,
|
||||
SIGALRM,
|
||||
|
@ -116,15 +196,38 @@ inline int ibcs_mapsig(int sig) {
|
|||
SIGPWR,
|
||||
SIGWINCH,
|
||||
-1,
|
||||
SIGPOLL
|
||||
SIGPOLL,
|
||||
SIGSTOP,
|
||||
SIGTSTP,
|
||||
SIGCONT,
|
||||
SIGTTIN,
|
||||
SIGTTOU,
|
||||
SIGVTALRM,
|
||||
SIGPROF,
|
||||
SIGXCPU,
|
||||
SIGXFSZ
|
||||
};
|
||||
/*
|
||||
* Translate the signal number to the corresponding item for Linux.
|
||||
*/
|
||||
int ibcs_mapsig(int sig) {
|
||||
|
||||
if ((unsigned int) sig >= sizeof(signals)/sizeof(signals[0])) {
|
||||
return -1;
|
||||
}
|
||||
if(sig > 22 && current->personality != PER_SVR4) return -1;
|
||||
return signals[sig];
|
||||
}
|
||||
|
||||
/* For a given linux signal number, find the equivalent iBCS2 signal number */
|
||||
int ibcs_lmapsig(int sig) {
|
||||
|
||||
if ((unsigned int) sig >= sizeof(lsignals)/sizeof(lsignals[0])) {
|
||||
return -1;
|
||||
}
|
||||
return lsignals[sig];
|
||||
}
|
||||
|
||||
inline int ibcs_signo (struct pt_regs * regs, int *sig) {
|
||||
int value = ibcs_mapsig(SIGNAL_NUMBER & 0xFF);
|
||||
|
||||
|
@ -138,6 +241,29 @@ inline int ibcs_signo (struct pt_regs * regs, int *sig) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Suspend the process. The set of blocked signals is in linux signal
|
||||
numbers, not ibcs2 signal numbers */
|
||||
|
||||
#define _S(nr) (1<<((nr)-1))
|
||||
|
||||
#define _BLOCKABLE (~(_S(IBCS_SIGKILL) | _S(IBCS_SIGSTOP)))
|
||||
#define _LBLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
|
||||
|
||||
static int ibcs_sigsuspend(struct pt_regs * regs, unsigned int newset)
|
||||
{
|
||||
unsigned long mask;
|
||||
|
||||
mask = current->blocked;
|
||||
current->blocked = newset & _LBLOCKABLE;
|
||||
regs->eax = -EINTR;
|
||||
while (1) {
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule();
|
||||
if (do_signal(mask,regs))
|
||||
return -EINTR;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Process the signal() function from iBCS
|
||||
*
|
||||
|
@ -155,9 +281,15 @@ void ibcs_sig_handler (struct pt_regs * regs, int sig, __sighandler_t handler)
|
|||
act.sa_handler = handler;
|
||||
act.sa_flags = 0;
|
||||
|
||||
#if 0
|
||||
/* THis seems wrong to me. How about the ONESHOT|NOMASK? ERY */
|
||||
if (sig != SIGALRM) {
|
||||
act.sa_flags |= SA_RESTART;
|
||||
}
|
||||
#else
|
||||
act.sa_flags = SA_ONESHOT | SA_NOMASK;
|
||||
#endif
|
||||
|
||||
|
||||
TO_KERNEL (old_fs);
|
||||
answer = sys_sigaction (sig, &act, &oact);
|
||||
|
@ -351,9 +483,7 @@ void ibcs_sigpause (struct pt_regs * regs)
|
|||
if (sigismember (&pendingset, sig) != 0)
|
||||
break;
|
||||
|
||||
TO_KERNEL (old_fs);
|
||||
answer = sys_sigsuspend (&zeroset);
|
||||
FROM_KERNEL (old_fs);
|
||||
answer = ibcs_sigsuspend (regs, zeroset);
|
||||
|
||||
if (answer >= 0) {
|
||||
TO_KERNEL (old_fs);
|
||||
|
@ -422,9 +552,10 @@ int ibcs_sigfunc (struct pt_regs * regs)
|
|||
regs->eax = EINVAL;
|
||||
regs->eflags |= 1;
|
||||
|
||||
#if IBCS_TRACE
|
||||
if (TRACE)
|
||||
printk (KERN_ERR "iBCS2 sigfunc(%x, %ld, %lx, %lx) unsuported\n",
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & (TRACE_SIGNAL | TRACE_SIGNAL_F))
|
||||
|| ibcs_func_p->trace)
|
||||
printk (KERN_ERR "iBCS2 sigfunc(%x, %ld, %lx, %lx) unsupported\n",
|
||||
sig_type,
|
||||
SIGNAL_NUMBER,
|
||||
SECOND_PARAM,
|
||||
|
@ -433,24 +564,25 @@ int ibcs_sigfunc (struct pt_regs * regs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if IBCS_TRACE
|
||||
if (TRACE) {
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & (TRACE_SIGNAL | TRACE_SIGNAL_F))
|
||||
|| ibcs_func_p->trace) {
|
||||
printk (func,
|
||||
"iBCS2 sig",
|
||||
SIGNAL_NUMBER,
|
||||
SECOND_PARAM,
|
||||
THIRD_PARAM);
|
||||
printk (KERN_ERR " == 0x%08lx\n", regs->eax);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ibcs_kill(int pid, int sig) {
|
||||
int outsig = ibcs_mapsig(sig & 0xFF);
|
||||
|
||||
#if IBCS_TRACE
|
||||
if (ibcs_func_p->trace)
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & TRACE_SIGNAL) || ibcs_func_p->trace)
|
||||
printk (KERN_ERR "ibcs_kill: insig (%d) outsig(%d) \n"
|
||||
, sig & 0xFF, outsig);
|
||||
#endif
|
||||
|
@ -459,3 +591,112 @@ int ibcs_kill(int pid, int sig) {
|
|||
}
|
||||
return sys_kill (pid, outsig);
|
||||
}
|
||||
|
||||
|
||||
/* This function is used to handle the sigaction call from SVr4 binaries.
|
||||
If anyone else uses this, this function needs to be modified since the
|
||||
order and size of the ibcs_sigaction structure is different in ibcs
|
||||
and the SVr4 ABI */
|
||||
|
||||
|
||||
asmlinkage int abi_sigaction(int abi_signum, const struct abi_sigaction * action,
|
||||
struct abi_sigaction * oldaction)
|
||||
{
|
||||
struct abi_sigaction new_sa, old_sa;
|
||||
int newflags, newmask, signum, i;
|
||||
struct sigaction *p;
|
||||
|
||||
signum = signals[abi_signum];
|
||||
if (signum<1 || signum>32 || signum==SIGKILL || signum==SIGSTOP)
|
||||
return -EINVAL;
|
||||
p = signum - 1 + current->sigaction;
|
||||
if (action) {
|
||||
memcpy_fromfs(&new_sa, action, sizeof(struct abi_sigaction));
|
||||
if (new_sa.sa_flags & ABI_SA_NODEFER)
|
||||
new_sa.sa_mask = 0;
|
||||
else {
|
||||
new_sa.sa_mask |= _S(abi_signum);
|
||||
new_sa.sa_mask &= _BLOCKABLE;
|
||||
}
|
||||
if (TASK_SIZE <= (unsigned long) new_sa.sa_handler)
|
||||
return -EFAULT;
|
||||
}
|
||||
if (oldaction) {
|
||||
if (!verify_area(VERIFY_WRITE,oldaction, sizeof(struct abi_sigaction))) {
|
||||
old_sa.sa_handler = p->sa_handler;
|
||||
newmask = 0;
|
||||
for(i=0; i<sizeof(signals)/sizeof(signals[0]); i++)
|
||||
if(signals[i] != -1 &&
|
||||
(p->sa_mask & (1 << i))) newmask |= (1 << lsignals[i]);
|
||||
old_sa.sa_mask = newmask;
|
||||
newflags = 0;
|
||||
if(p->sa_flags & SA_STACK) newflags |= ABI_SA_ONSTACK;
|
||||
if(p->sa_flags & SA_RESTART) newflags |= ABI_SA_RESTART;
|
||||
if(p->sa_flags & SA_NOMASK) newflags |= ABI_SA_NODEFER;
|
||||
if(p->sa_flags & SA_ONESHOT) newflags |= ABI_SA_RESETHAND;
|
||||
if(p->sa_flags & SA_NOCLDSTOP) newflags |= ABI_SA_NOCLDSTOP;
|
||||
old_sa.sa_flags = newflags;
|
||||
memcpy_tofs(oldaction, &old_sa, sizeof(struct abi_sigaction));
|
||||
};
|
||||
}
|
||||
if (action) {
|
||||
/* The internal format of the sigaction structure is
|
||||
different, so we cannot simply copy the structure. */
|
||||
p->sa_handler = new_sa.sa_handler;
|
||||
newmask = 0;
|
||||
for(i=0; i<sizeof(signals)/sizeof(signals[0]); i++)
|
||||
if(signals[i] != -1 &&
|
||||
(new_sa.sa_mask & (1 << i))) newmask |= (1 << signals[i]);
|
||||
p->sa_mask = newmask;
|
||||
newflags = 0;
|
||||
if(new_sa.sa_flags & ABI_SA_ONSTACK) newflags |= SA_STACK;
|
||||
if(new_sa.sa_flags & ABI_SA_RESTART) newflags |= SA_RESTART;
|
||||
if(new_sa.sa_flags & ABI_SA_NODEFER) newflags |= SA_NOMASK;
|
||||
if(new_sa.sa_flags & ABI_SA_RESETHAND) newflags |= SA_ONESHOT;
|
||||
if(new_sa.sa_flags & ABI_SA_NOCLDSTOP) newflags |= SA_NOCLDSTOP;
|
||||
p->sa_flags = newflags;
|
||||
check_pending(signum);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static short int howcnv[SIG_SETMASK, SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK];
|
||||
|
||||
asmlinkage int abi_sigprocmask(int how, sigset_t *set, sigset_t *oset)
|
||||
{
|
||||
int how1;
|
||||
if(how < 0 || how > 3) return -EINVAL;
|
||||
|
||||
how1 = howcnv[how];
|
||||
return sys_sigprocmask(how1, set, oset);
|
||||
}
|
||||
|
||||
/* Handle the sigsuspend syscall. We cannot use sys_sigsuspend because
|
||||
this assumes that the first argument points to the argument stack
|
||||
for an int 0x80 handler */
|
||||
|
||||
int abi_sigsuspend(struct pt_regs * regs)
|
||||
{
|
||||
sigset_t * set;
|
||||
unsigned long newset, oldset;
|
||||
int i, error;
|
||||
|
||||
set = (sigset_t *) get_fs_long (&((unsigned long *) regs->esp) [1]);
|
||||
|
||||
newset = 0;
|
||||
|
||||
if ((error = verify_area(VERIFY_READ, set, sizeof(long))))
|
||||
return error;
|
||||
|
||||
oldset = get_fs_long ((unsigned long *) set);
|
||||
|
||||
for(i=0; i<sizeof(signals)/sizeof(signals[0]); i++)
|
||||
if(signals[i] != -1 &&
|
||||
(oldset & (1 << i))) newset |= (1 << signals[i]);
|
||||
|
||||
#ifdef IBCS_TRACE
|
||||
if ((ibcs_trace & TRACE_SIGNAL) || ibcs_func_p->trace)
|
||||
printk("iBCS: sigsuspend oldset, newset = %x %x\n", oldset, newset);
|
||||
#endif
|
||||
return ibcs_sigsuspend(regs, newset);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Hacked by Eric Youngdale for iBCS (1993, 1994).
|
||||
*
|
||||
* $Id: abi4.h,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* $Id: abi4.h,v 1.2 1994/02/28 09:15:26 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/include/ibcs/abi4.h,v $
|
||||
*/
|
||||
|
||||
|
@ -20,6 +20,18 @@ typedef long ABI_uid_t;
|
|||
typedef long ABI_off_t;
|
||||
typedef struct timeval ABI_timestruc_t;
|
||||
|
||||
struct abi_sigaction {
|
||||
int sa_flags;
|
||||
__sighandler_t sa_handler;
|
||||
sigset_t sa_mask;
|
||||
int sa_resv[2]; /* Reserved for something or another */
|
||||
};
|
||||
|
||||
extern int abi_sigprocmask(int how, sigset_t *set, sigset_t *oset);
|
||||
extern int abi_sigaction(int abi_signum, const struct abi_sigaction * action,
|
||||
struct abi_sigaction * oldaction);
|
||||
extern int abi_sigsuspend(struct pt_regs * regs);
|
||||
|
||||
|
||||
/*
|
||||
* This is the general form of the stat structure in an ABI compliant system.
|
||||
|
@ -51,7 +63,6 @@ extern int ibcs_lxstat(int vers, char * path, struct xstat * stat4);
|
|||
extern int ibcs_fxstat(int vers, int fd, struct xstat * stat4);
|
||||
extern int ibcs_xmknod(int vers, const char * path, mode_t mode, dev_t dev);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,20 +1,12 @@
|
|||
/*
|
||||
* Function prototypes used by the iBCS2 emulator
|
||||
*
|
||||
* $Id: ibcs.h,v 1.1 1994/02/10 09:31:22 mike Exp $
|
||||
* $Id: ibcs.h,v 1.2 1994/02/28 09:15:30 mike Exp $
|
||||
* $Source: /nfs4/sophia/home/mjagdis/src/ibcs.cvs/ibcs/include/ibcs/ibcs.h,v $
|
||||
*/
|
||||
#include <linux/sys.h> /* for fn_ptr */
|
||||
#include <linux/ptrace.h> /* for pt_regs */
|
||||
|
||||
/*
|
||||
* 4. You need to decide if you want to be SCO or SysVr4 compatible.
|
||||
* This will change when we figure out how to do it dynamically.
|
||||
*
|
||||
* if SCO_CAMPAT is 1 then you will use the SCO syscall numbers
|
||||
* otherwise you will use the SysVr4 numbers
|
||||
*/
|
||||
#define SCO_COMPAT 1 /* 0 if SysVr4 compatible */
|
||||
#include <linux/signal.h>
|
||||
|
||||
/*
|
||||
* the function prefix sys_... are used by linux in native mode.
|
||||
|
@ -24,11 +16,15 @@
|
|||
* (yet :-)
|
||||
*/
|
||||
typedef struct IBCS_function {
|
||||
fn_ptr kfunc; /* function to call (sys_..., ibcs_... or xnx_...) */
|
||||
short trace; /* trace function we can turn tracing on or off */
|
||||
void * kfunc; /* function to call (sys_..., ibcs_... or xnx_...)
|
||||
* or pointer to a sub class.
|
||||
*/
|
||||
short nargs; /* number of args to kfunc or Ukn, Spl or Fast */
|
||||
#ifdef IBCS_TRACE
|
||||
short trace; /* trace function we can turn tracing on or off */
|
||||
char * name; /* name of function (for tracing) */
|
||||
char * args; /* how to print the arg list (see plist) */
|
||||
#endif
|
||||
} IBCS_func;
|
||||
|
||||
struct ibcs_statfs {
|
||||
|
@ -67,12 +63,15 @@ extern int ibcs_wait(struct pt_regs * regs);
|
|||
extern int ibcs_execv(struct pt_regs * regs);
|
||||
extern int ibcs_exec(struct pt_regs * regs);
|
||||
extern int ibcs_trace_set(int);
|
||||
extern int ibcs_trace_func(int, int, int, int);
|
||||
extern int ibcs_trace_func(int, int, int);
|
||||
extern int ibcs_utsname(int);
|
||||
extern int ibcs_pause(void);
|
||||
extern int ibcs_read(int fd, char *buf, int nbytes);
|
||||
extern int ibcs_procids(struct pt_regs * regs);
|
||||
extern int ibcs_select(struct pt_regs *regs);
|
||||
|
||||
/* emulate.c */
|
||||
extern void iABI_emulate(struct pt_regs *regs);
|
||||
extern void ibcs_exit(int n);
|
||||
extern int iABI_errors(int errno);
|
||||
extern int ibcs_syscall(struct pt_regs *regs);
|
||||
|
||||
|
@ -87,13 +86,14 @@ extern int ibcs_semsys (struct pt_regs *regs);
|
|||
extern int ibcs_shmsys (struct pt_regs *regs);
|
||||
|
||||
/* mmap.c */
|
||||
extern int ibcs_mmap(unsigned int vaddr, unsigned int vsize, int prot,
|
||||
extern int ibcs_mmap(unsigned int vaddr, unsigned int vsize, int prot,
|
||||
int flags, int fd, unsigned int file_offset);
|
||||
|
||||
/* open.c */
|
||||
extern int ibcs_statfs(const char * path, struct ibcs_statfs * buf);
|
||||
extern int ibcs_fstatfs(unsigned int fd, struct ibcs_statfs * buf);
|
||||
extern int ibcs_open(const char * fname, int flag, int mode);
|
||||
extern int ibcs_getdents(int fd, char *buf, int nybtes);
|
||||
|
||||
/* signal.c */
|
||||
void ibcs_sig_handler (struct pt_regs * regs, int sig, __sighandler_t handler);
|
||||
|
@ -127,7 +127,6 @@ extern int ibcs_ulimit(int cmd, int val);
|
|||
extern int wv386_gethostname(char *name, int len);
|
||||
extern int wv386_getdomainname(char *name, int len);
|
||||
extern int wv386_wait3(int *loc);
|
||||
extern int wv386_select(struct pt_regs *regs);
|
||||
extern int wv386_socket(struct pt_regs *regs);
|
||||
extern int wv386_connect(struct pt_regs *regs);
|
||||
extern int wv386_accept(struct pt_regs *regs);
|
||||
|
@ -146,3 +145,7 @@ extern int wv386_getsockname(struct pt_regs *regs);
|
|||
|
||||
/* From wysev386i.c */
|
||||
extern int wv386_ioctl(int fd, unsigned int ioctl_num, void *arg);
|
||||
|
||||
/* From socksys.c */
|
||||
extern void init_socksys(void);
|
||||
extern void cleanup_socksys(void);
|
||||
|
|
Loading…
Reference in a new issue