| 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* Patched function referencing data in an .init section. */ |
| 3 | |
| 4 | static const char __modinfo |
| 5 | = "\0name=vmlinux"; |
| 6 | |
| 7 | /* volatile so the read cannot be folded into a constant, leaving no reference */ |
| 8 | static volatile int init_only = 5; |
| 9 | |
| 10 | int |
| 11 | |
| 12 | |
| 13 | return x + init_only + 1; |
| 14 | |
| 15 | return x + init_only; |
| 16 | |
| 17 |