From 036e46b655557f9a17784e502f694a80abfd68dc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 23 Aug 2009 17:43:21 -0700 Subject: Add sysdeps/unix/syscall-template.S; build syscall stubs with deps and -g pointing to it. --- sysdeps/unix/make-syscalls.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'sysdeps/unix/make-syscalls.sh') diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh index 8abb0349bf..a8b8a262a7 100644 --- a/sysdeps/unix/make-syscalls.sh +++ b/sysdeps/unix/make-syscalls.sh @@ -83,12 +83,13 @@ while read file srcfile caller syscall args strong weak; do ;; esac - cancellable= - noerrno= + cancellable=0 + noerrno=0 + errval=0 case $args in - C*) cancellable=-cancel; args=`echo $args | sed 's/C:\?//'`;; - E*) noerrno=_NOERRNO; args=`echo $args | sed 's/E:\?//'`;; - V*) noerrno=_ERRVAL; args=`echo $args | sed 's/V:\?//'`;; + C*) cancellable=1; args=`echo $args | sed 's/C:\?//'`;; + E*) noerrno=1; args=`echo $args | sed 's/E:\?//'`;; + V*) errval=1; args=`echo $args | sed 's/V:\?//'`;; esac # Derive the number of arguments from the argument signature @@ -115,7 +116,7 @@ while read file srcfile caller syscall args strong weak; do x--) # Undefined callnum for an extra syscall. if [ x$caller != x- ]; then - if [ x$noerrno != x ]; then + if [ $noerrno != 0 ]; then echo >&2 "$0: no number for $fileno, no-error syscall ($strong $weak)" exit 2 fi @@ -151,7 +152,7 @@ shared-only-routines += $file ;; esac - echo " \$(common-objpfx)s-proto$cancellable.d" + echo " \$(..)sysdeps/unix/make-syscalls.sh" case x"$callnum" in x_) echo "\ @@ -161,11 +162,17 @@ shared-only-routines += $file x*) echo "\ \$(make-target-directory) - (echo '#include '; \\ - echo 'PSEUDO$noerrno ($strong, $syscall, $nargs)'; \\ - echo ' ret$noerrno'; \\ - echo 'PSEUDO_END$noerrno($strong)'; \\ - echo 'libc_hidden_def ($strong)'; \\" + (echo '#define SYSCALL_NAME $syscall'; \\ + echo '#define SYSCALL_NARGS $nargs'; \\ + echo '#define SYSCALL_SYMBOL $strong'; \\" + [ $cancellable = 0 ] || echo "\ + echo '#define SYSCALL_CANCELLABLE 1'; \\" + [ $noerrno = 0 ] || echo "\ + echo '#define SYSCALL_NOERRNO 1'; \\" + [ $errval = 0 ] || echo "\ + echo '#define SYSCALL_ERRVAL 1'; \\" + echo "\ + echo '#include '; \\" ;; esac @@ -201,7 +208,7 @@ shared-only-routines += $file vcount=`expr $vcount + 1` echo " echo 'strong_alias ($strong, $source)'; \\" fi - echo " echo 'symbol_version($source, $base, $ver)'; \\" + echo " echo 'symbol_version ($source, $base, $ver)'; \\" ;; !*) name=`echo $name | sed 's/.//'` -- cgit v1.2.3