Skip to content
projects
/
linux
·
blob
master ·
refs
linux
tools
objtool
tests
generic
fixtures
static_local.c
…
History
History
·
Raw
Raw
·
Diff
Diff
·
Blob
Blob
17 lines · 319 B
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
)
))
=
"
\0
name=vmlinux
"
;
6
7
int
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
}