1 2 3 4 5
#!/bin/sh tmp=$(mktemp) nm -C kernel > $tmp perl -lpe '$_=hex' $tmp | paste -d" " - $tmp | sort -n | cut -d" " -f 2- > kernel.map rm $tmp