summaryrefslogtreecommitdiff
path: root/src/arch-syscall-validate
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch-syscall-validate')
-rwxr-xr-xsrc/arch-syscall-validate31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate
index e28b206..595dfef 100755
--- a/src/arch-syscall-validate
+++ b/src/arch-syscall-validate
@@ -326,6 +326,29 @@ function dump_lib_ppc64() {
}
#
+# Dump the ppc system syscall table
+#
+# Arguments:
+# 1 path to the kernel source
+#
+# Dump the architecture's syscall table to stdout.
+#
+function dump_sys_ppc() {
+ gcc -E -dM $1/arch/powerpc/include/uapi/asm/unistd.h | \
+ grep "^#define __NR_" | sort | \
+ sed -e 's/#define[ \t]\+__NR_\([a-z0-9_]\+\)[ \t]\+\([0-9]\+\)/\1\t\2/'
+}
+
+#
+# Dump the ppc library syscall table
+#
+# Dump the library's syscall table to stdout.
+#
+function dump_lib_ppc() {
+ $LIB_SYS_DUMP -a ppc | sed -e '/[^\t]\+\t-[0-9]\+/d'
+}
+
+#
# Dump the system syscall table
#
# Arguments:
@@ -363,6 +386,9 @@ function dump_sys() {
ppc64)
dump_sys_ppc64 "$2"
;;
+ ppc)
+ dump_sys_ppc "$2"
+ ;;
*)
echo ""
;;
@@ -406,6 +432,9 @@ function dump_lib() {
ppc64)
dump_lib_ppc64 "$2"
;;
+ ppc)
+ dump_lib_ppc "$2"
+ ;;
*)
echo ""
;;
@@ -442,7 +471,7 @@ shift $(($OPTIND - 1))
# defaults
if [[ $arches == "" ]]; then
- arches="x86 x86_64 x32 arm aarch64 mips mips64 mips64n32 ppc64"
+ arches="x86 x86_64 x32 arm aarch64 mips mips64 mips64n32 ppc64 ppc"
fi
# sanity checks