History

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.

Pierre-Clément Tosi committed 3 years ago

Commit ec336aa1 parent 20ff3681 file · +2 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/mksysmap+2−2
@@ -32,7 +32,7 @@ ${NM} -n ${1} | sed >${2} -e " · 31 unmodified lines
32# (do not forget a space before each pattern)32# (do not forget a space before each pattern)
33 33
34# local symbols for ARM, MIPS, etc.34# local symbols for ARM, MIPS, etc.
35/ \$/d35/ \\$/d
36 36
37# local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.37# local labels, .LBB, .Ltmpxxx, .L__unnamed_xx, .LASANPC, etc.
38/ \.L/d38/ \.L/d
@@ -41,7 +41,7 @@ ${NM} -n ${1} | sed >${2} -e " · 2 unmodified lines
41/ __efistub_/d41/ __efistub_/d
42 42
43# arm64 local symbols in non-VHE KVM namespace43# arm64 local symbols in non-VHE KVM namespace
44/ __kvm_nvhe_\$/d44/ __kvm_nvhe_\\$/d
45/ __kvm_nvhe_\.L/d45/ __kvm_nvhe_\.L/d
46 46
47# arm64 lld47# arm64 lld

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t