summaryrefslogtreecommitdiff
path: root/Kernel/mkmap.sh
blob: 34198dae737221a4ca605e24857ca83c877c44d8 (plain)
1
2
3
4
5
6
7
#!/bin/sh
tmp=$(mktemp)
nm -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
rm -f "$tmp"