1 #!/bin/bash 2 # SPDX-License-Identifier: GPL-2.0 3 4 set -e 5 set -o pipefail 6 7 # To debug, uncomment the following line 8 # set -x 9 10 # -mprofile-kernel is only supported on 64-bit 11 # be invoked for other targets. Therefore we c 12 # explicitly, to take care of toolchains defau 13 14 # Test whether the compile option -mprofile-ke 15 # profiling code (ie. a call to _mcount()). 16 echo "int func() { return 0; }" | \ 17 $* -m64 -mabi=elfv2 -S -x c -O2 -p -mprofi 18 2> /dev/null | grep -q "_mcount" 19 20 # Test whether the notrace attribute correctly 21 22 echo -e "#include <linux/compiler.h>\nnotrace 23 $* -m64 -mabi=elfv2 -S -x c -O2 -p -mprofi 24 2> /dev/null | grep -q "_mcount" && \ 25 exit 1 26 27 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.