#!/bin/sh
#
# Use this together with "a.c"

if [ ! -r System.map ]
then
	echo "$0 can not find ./System.map!"
	exit 1
fi

start=`head -1 System.map | cut -d" " -f1 | sed 's/0*//'`
end=`tail -1 System.map | cut -d" " -f1 | sed 's/0*//'`
# echo "start $start  end $end"
while read i
do
	set -- $i
	while [[ $# -gt 1 ]]
	do
	shift
	if [[ ($1 > $start) && ($1 < $end) ]]
	then
		a $1
	fi
	done
done
