Omit duplicate lines from the ksyms map.

This commit is contained in:
Andreas Kling 2018-12-03 02:23:49 +01:00
parent bbfae19238
commit afc56d151f
Notes: sideshowbarker 2024-07-19 16:08:53 +09:00

View file

@ -1,8 +1,6 @@
#!/bin/sh
tmp=$(mktemp)
nm -C kernel > $tmp
perl -lpe '$_=hex' $tmp | paste -d" " - $tmp | sort -n | cut -d" " -f 2- > kernel.map.tmp
printf "%08x\n" $(wc -l kernel.map.tmp | cut -f1 -d' ') > kernel.map
cat kernel.map.tmp >> kernel.map
rm -f kernel.map.tmp
rm $tmp
nm -nC kernel | uniq > $tmp
printf "%08x\n" $(wc -l $tmp | cut -f1 -d' ') > kernel.map
cat $tmp >> kernel.map
rm -f $tmp