ladybird/Kernel/mkmap.sh
Andreas Kling 8a865c11ec Pre-size the ksyms vector for speedier loading.
Also show loading progress on the screen because it looks neat.
2018-11-09 20:40:39 +01:00

9 lines
265 B
Bash

#!/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