]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390/decompressor: replace use of perl with simple sed/tr
authorRob Landley <rob@landley.net>
Tue, 18 May 2021 04:46:44 +0000 (23:46 -0500)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 7 Jun 2021 15:12:59 +0000 (17:12 +0200)
Use simple sed/tr instead of perl to generate decompressor symbols
file with the same result.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
[gor: changed commit message]
Link: https://lore.kernel.org/r/a48c51f8-5fe4-87e7-284e-c96e2381801a@landley.net
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/compressed/Makefile

index de18dab518bb6b6fdcf9625d60ef17d2cf5f1576..e941b165bd4f41144f4e54be03a1277417583726 100644 (file)
@@ -33,7 +33,7 @@ $(obj)/vmlinux.syms: $(obj)/vmlinux.lds $(objtree)/arch/s390/boot/startup.a $(OB
 
 quiet_cmd_dumpsyms = DUMPSYMS $<
 define cmd_dumpsyms
-       $(NM) -n -S --format=bsd "$<" | $(PERL) -ne '/(\w+)\s+(\w+)\s+[tT]\s+(\w+)/ and printf "%x %x %s\0",hex $$1,hex $$2,$$3' > "$@"
+       $(NM) -n -S --format=bsd "$<" | sed -nE 's/^0*([0-9a-fA-F]+) 0*([0-9a-fA-F]+) [tT] ([^ ]*)$$/\1 \2 \3/p' | tr '\n' '\0' > "$@"
 endef
 
 $(obj)/syms.bin: $(obj)/vmlinux.syms FORCE