1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Special section entry with no ANNOTATE_DATA_SPECIAL annotation and a local 4 * label at offset 0, the shape Clang produces for .kcfi_traps. 5 */ 6 7 static const char __modinfo[] 8 __attribute__((section(".modinfo"), used, aligned(1))) = "\0name=vmlinux"; 9 10 int target(int x) 11 { 12 asm volatile( 13 "1:\n\t" 14 ".pushsection .kcfi_traps, \"a\"\n\t" 15 ".balign 4\n\t" 16 "trap_marker:\n\t" 17 ".long 1b - .\n\t" 18 ".popsection\n\t"); 19 #ifdef PATCHED 20 return x + 2; 21 #else 22 return x + 1; 23 #endif 24 } 25