summaryrefslogtreecommitdiff
path: root/Kernel/mkmap.sh
blob: 4942908725804bbb91f82be000cf5b0f7ab541ae (plain)
1
2
3
4
5
6
7
8
#!/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