FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
linux/scripts/check-function-names.sh at master · multikernel/linux · GitHub
multikernel
/
linux
Public
forked from
torvalds/linux
Notifications
You must be signed in to change notification settings
Fork
15
Star
180
Code
Issues
27
Pull requests
5
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
linux
/
scripts
/
check-function-names.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
25 lines (20 loc) · 645 Bytes
Breadcrumbs
linux
/
scripts
/
check-function-names.sh
Copy path
File metadata and controls
executable file
·
25 lines (20 loc) · 645 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/sh
#
SPDX-License-Identifier: GPL-2.0
#
#
Certain function names are disallowed due to section name ambiguities
#
introduced by -ffunction-sections.
#
#
See the comment above TEXT_MAIN in include/asm-generic/vmlinux.lds.h.
objfile=
"
$1
"
if
[
!
-f
"
$objfile
"
]
;
then
echo
"
usage:
$0
<file.o>
"
>&2
exit
1
fi
bad_symbols=
$(
${NM
:-
nm}
"
$objfile
"
|
awk
'
$2 ~ /^[TtWw]$/ {print $3}
'
|
grep -E
'
^(startup|exit|split|unlikely|hot|unknown)(\.|$)
'
)
if
[
-n
"
$bad_symbols
"
]
;
then
echo
"
$bad_symbols
"
|
while
read
-r sym
;
do
echo
"
$objfile
: error:
$sym
() function name creates ambiguity with -ffunction-sections
"
>&2
done
exit
1
fi
exit
0
Back
|
FazBrowse Home
|
New Git URL