| 1 | |
| 2 |
|
| 3 |
|
| 4 | static const char __modinfo[]
|
| 5 | __attribute__((section(".modinfo"), used, aligned(1))) = "\0name=vmlinux";
|
| 6 |
|
| 7 | static void __attribute__((cold, noinline)) slow_path(int x)
|
| 8 | {
|
| 9 | __asm__ volatile("" :: "r"(x));
|
| 10 | }
|
| 11 |
|
| 12 | int target(int x)
|
| 13 | {
|
| 14 | if (__builtin_expect(x < 0, 0))
|
| 15 | slow_path(x);
|
| 16 | #ifdef PATCHED
|
| 17 | return x + 2;
|
| 18 | #else
|
| 19 | return x + 1;
|
| 20 | #endif
|
| 21 | }
|