Skip to content

Commit ec336aa

Browse files
ptosimasahir0y
authored andcommitted
scripts/mksysmap: Fix badly escaped '$'
The backslash characters escaping '$' in the command to sed (intended to prevent it from interpreting '$' as "end-of-line") are currently being consumed by the Shell (where they mean that sh should not evaluate what follows '$' as a variable name). This means that sed -e "/ \$/d" executes the script / $/d instead of the intended / \$/d So escape twice in mksysmap any '$' that actually needs to reach sed escaped so that the backslash survives the Shell. Fixes: c480204 ("scripts/mksysmap: use sed with in-line comments") Fixes: 320e7c9 ("scripts/kallsyms: move compiler-generated symbol patterns to mksysmap") Signed-off-by: Pierre-Clément Tosi <ptosi@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 20ff368 commit ec336aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/mksysmap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ${NM} -n ${1} | sed >${2} -e "
3232
# (do not forget a space before each pattern)
3333
3434
# local symbols for ARM, MIPS, etc.
35-
/ \$/d
35+
/ \\$/d
3636
3737
# local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.
3838
/ \.L/d
@@ -41,7 +41,7 @@ ${NM} -n ${1} | sed >${2} -e "
4141
/ __efistub_/d
4242
4343
# arm64 local symbols in non-VHE KVM namespace
44-
/ __kvm_nvhe_\$/d
44+
/ __kvm_nvhe_\\$/d
4545
/ __kvm_nvhe_\.L/d
4646
4747
# arm64 lld

0 commit comments

Comments
 (0)