summaryrefslogtreecommitdiff
path: root/Kernel/mkmap.sh
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-30 17:17:29 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-30 18:10:51 +0100
commit7608af13cd61e615e643d08f6ce27cd0ae74028f (patch)
treeb0ca9b4339e37dd7b5a52455ee39e8f27ea258e8 /Kernel/mkmap.sh
parent9d3623f0e8678e20c874d1cbc7b83937e4c68cc3 (diff)
downloadserenity-7608af13cd61e615e643d08f6ce27cd0ae74028f.zip
Kernel: Use the toolchain's `nm` in mkmap.sh
By using the binary from our build of binutils, we can be sure that `nm` supports demangling symbols, so we can avoid spawning a separate `c++filt` process.
Diffstat (limited to 'Kernel/mkmap.sh')
-rw-r--r--Kernel/mkmap.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/mkmap.sh b/Kernel/mkmap.sh
index 34198dae73..5400259468 100644
--- a/Kernel/mkmap.sh
+++ b/Kernel/mkmap.sh
@@ -1,7 +1,7 @@
#!/bin/sh
tmp=$(mktemp)
-nm -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
+NM="${NM:-nm}"
+"$NM" -C -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
printf "%08x\n" "$(wc -l "$tmp" | awk '{print $1}')" > kernel.map
-CXXFILT="${CXXFILT:-c++filt}"
-"$CXXFILT" < "$tmp" >> kernel.map
+cat "$tmp" >> kernel.map
rm -f "$tmp"