1 // SPDX-License-Identifier: GPL-2.0 2 /* Static local in a patched function. */ 3 4 static const char __modinfo[] 5 __attribute__((section(".modinfo"), used, aligned(1))) = "\0name=vmlinux"; 6 target(int x)7int target(int x) 8 { 9 static int counter; 10 11 counter += 1; 12 #ifdef PATCHED 13 return x + counter + 1; 14 #else 15 return x + counter; 16 #endif 17 } 18