blob: 3f0d3e206cef6ee3cdde15e181c113cbfdb931cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// SPDX-License-Identifier: GPL-2.0
/*
* Two changed functions and one untouched, so the patch's function list has a
* length worth checking and something that must not appear in it.
*/
static const char __modinfo[]
__attribute__((section(".modinfo"), used, aligned(1))) = "\0name=vmlinux";
int first(int x)
{
#ifdef PATCHED
return x + 11;
#else
return x + 1;
#endif
}
int second(int x)
{
#ifdef PATCHED
return x + 22;
#else
return x + 2;
#endif
}
int third(int x)
{
return x + 3;
}
|