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
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 " · 2 unmodified lines
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

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