From a68d912dc02bf82c120872af219b58bbd019f59d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 29 Jul 2021 08:42:09 +0200 Subject: [PATCH] Kernel: Embed the right symbol count into the kernel.map file on macOS On macOS the wc tool prefixes its output with a bunch of spaces which resulted in us incorrectly using "00000000" as the symbol count. Fixes #9080. --- Kernel/mkmap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/mkmap.sh b/Kernel/mkmap.sh index 21afc67515..37970917a3 100644 --- a/Kernel/mkmap.sh +++ b/Kernel/mkmap.sh @@ -1,6 +1,6 @@ #!/bin/sh tmp=$(mktemp) nm -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp" -printf "%08x\n" "$(wc -l "$tmp" | cut -f1 -d' ')" > kernel.map +printf "%08x\n" "$(wc -l "$tmp" | awk '{print $1}')" > kernel.map c++filt < "$tmp" >> kernel.map rm -f "$tmp"