1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * A function the patch deletes, along with its only caller's use of it. The 4 * original has a symbol which the patched object simply does not, so there is 5 * nothing to correlate it against. 6 */ 7 8 static const char __modinfo[] 9 __attribute__((section(".modinfo"), used, aligned(1))) = "\0name=vmlinux"; 10 11 #ifndef PATCHED going_away(int x)12int going_away(int x) 13 { 14 return x + 7; 15 } 16 #endif 17 caller(int x)18int caller(int x) 19 { 20 #ifdef PATCHED 21 return x + 1; 22 #else 23 return going_away(x); 24 #endif 25 } 26