2 # SPDX-License-Identifier: GPL-2.0
4 # Generate system call table for perf. Derived from
7 # Copyright IBM Corp. 2017
8 # Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
9 # Changed by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
10 # Changed by: Kim Phillips <kim.phillips@arm.com>
17 if ! test -r $input; then
18 echo "Could not read input file" >&2
26 create_table_exe
=`mktemp ${TMPDIR:-/tmp}/create-table-XXXXXX`
33 int main(int argc, char *argv[])
38 printf "%s\n" " printf(\"\\t[%d] = \\\"$sc\\\",\\n\", __NR_$sc);"
42 printf "%s\n" " printf(\"#define SYSCALLTBL_ARM64_MAX_ID %d\\n\", __NR_$last_sc);"
45 } |
$hostcc -I $incpath/include
/uapi
-o $create_table_exe -x c
-
49 rm -f $create_table_exe
54 echo "static const char *syscalltbl_arm64[] = {"
59 $gcc -E -dM -x c
-I $incpath/include
/uapi
$input \
60 |
sed -ne 's/^#define __NR_//p' \