Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Eliminate weak symbols from rump kernel syscall han...



details:   https://anonhg.NetBSD.org/src/rev/e1e7e3d4f440
branches:  trunk
changeset: 795746:e1e7e3d4f440
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Apr 27 14:50:23 2014 +0000

description:
Eliminate weak symbols from rump kernel syscall handlers, part 2:

Generate a file (rump.sysmap) which can be used to autogenerate the
syscall loaders.  The file contains syscall handler names and numbers.

Also store "libc" side syscall names in rump.sysmap to help with
the rumprun build process.

diffstat:

 sys/kern/makesyscalls.sh |  20 ++++++++++++++++----
 sys/kern/syscalls.conf   |   3 ++-
 2 files changed, 18 insertions(+), 5 deletions(-)

diffs (85 lines):

diff -r a1aba691eca6 -r e1e7e3d4f440 sys/kern/makesyscalls.sh
--- a/sys/kern/makesyscalls.sh  Sun Apr 27 14:29:53 2014 +0000
+++ b/sys/kern/makesyscalls.sh  Sun Apr 27 14:50:23 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: makesyscalls.sh,v 1.141 2014/04/27 14:29:53 pooka Exp $
+#      $NetBSD: makesyscalls.sh,v 1.142 2014/04/27 14:50:23 pooka Exp $
 #
 # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou
 # All rights reserved.
@@ -63,6 +63,7 @@
 maxsysargs=8           # default limit is 8 (32bit) arguments
 rumpcalls="/dev/null"
 rumpcallshdr="/dev/null"
+rumpsysmap="/dev/null"
 rumpsysent="rumpsysent.tmp"
 . ./$1
 
@@ -139,6 +140,7 @@
        rumpcalls = \"$rumpcalls\"
        rumpcallshdr = \"$rumpcallshdr\"
        rumpsysent = \"$rumpsysent\"
+       rumpsysmap = \"$rumpsysmap\"
        switchname = \"$switchname\"
        namesname = \"$namesname\"
        constprefix = \"$constprefix\"
@@ -690,6 +692,11 @@
        return type
 }
 
+function printrumpsysmap(syscall, wfn, funcalias, rumpentry) {
+       printf("%-4d %-22s %-18s %s\n",
+           syscall, wfn, funcalias, rumpentry) > rumpsysmap
+}
+
 function putent(type, compatwrap) {
        # output syscall declaration for switch table.
        if (compatwrap == "")
@@ -766,10 +773,13 @@
        }
 
        if (!rumpable) {
-               if (funcname == "sys_pipe" && rumphaspipe == 1)
+               if (funcname == "sys_pipe" && rumphaspipe == 1) {
                        insysent = 1
-               else
+                       printrumpsysmap(syscall,
+                           funcname, funcalias, "rump_sys_pipe")
+               } else {
                        insysent = 0
+               }
        } else {
                insysent = 1
        }
@@ -780,6 +790,8 @@
                return
        }
 
+       printrumpsysmap(syscall, wfn, funcalias, "rump___sysimpl_" rumpfname)
+
        # need a local prototype, we export the re-re-named one in .h
        printf("\n%s rump___sysimpl_%s(", returntype, rumpfname) \
            > rumpcalls
@@ -988,4 +1000,4 @@
 #chmod 444 $sysnames $sysnumhdr $syssw
 
 echo Generated following files:
-echo $sysarghdr $sysnumhdr $syssw $sysnames $rumpcalls $rumpcallshdr
+echo $sysarghdr $sysnumhdr $syssw $sysnames $rumpcalls $rumpcallshdr $rumpsysmap
diff -r a1aba691eca6 -r e1e7e3d4f440 sys/kern/syscalls.conf
--- a/sys/kern/syscalls.conf    Sun Apr 27 14:29:53 2014 +0000
+++ b/sys/kern/syscalls.conf    Sun Apr 27 14:50:23 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: syscalls.conf,v 1.19 2012/08/03 12:41:13 pooka Exp $
+#      $NetBSD: syscalls.conf,v 1.20 2014/04/27 14:50:23 pooka Exp $
 
 sysnames="syscalls.c"
 sysnumhdr="../sys/syscall.h"
@@ -8,6 +8,7 @@
 sysalign=1
 rumpcalls="../rump/librump/rumpkern/rump_syscalls.c"
 rumpcallshdr="../rump/include/rump/rump_syscalls.h"
+rumpsysmap="../rump/rump.sysmap"
 compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30 compat_40 compat_50 compat_60"
 libcompatopts=""
 



Home | Main Index | Thread Index | Old Index