summaryrefslogtreecommitdiff
path: root/src/check-stack
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-02-20 21:20:05 -0800
committerKeith Packard <keithp@keithp.com>2010-02-20 21:20:05 -0800
commita5215c2bd9249a285fc834db0c453fb3e7daed87 (patch)
treebd7dea60caebef8d92d3fb1560d49368248e888d /src/check-stack
parent18eeb79026f7e5c54bf99435537c024427011a36 (diff)
Add back stack size checking to altos linking phase
This verifies that the stack start specified during the compile will work with the resulting program Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/check-stack')
-rwxr-xr-xsrc/check-stack7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/check-stack b/src/check-stack
index 82680b88..1e8044e0 100755
--- a/src/check-stack
+++ b/src/check-stack
@@ -2,12 +2,11 @@
HEADER=$1
MEM=$2
-HEADER_STACK=`awk '/#define AO_STACK_START/ {print $3}' $HEADER | nickle`
-MEM_STACK=`awk '/Stack starts at/ {print $4}' $MEM | nickle`
+HEADER_STACK=`awk '/#define AO_STACK_START/ {print strtonum($3)}' $HEADER`
+MEM_STACK=`awk '/Stack starts at/ {print strtonum ($4)}' $MEM`
if [ "$HEADER_STACK" -lt "$MEM_STACK" ]; then
- MIN=0x`nickle -e "$MEM_STACK # 16"`
- echo "Set AO_STACK_START to at least $MIN"
+ echo $MEM_STACK | awk '{ printf ("Set AO_STACK_START to at least 0x%x\n", $1); }'
exit 1
else
exit 0