This stack check implementation leverages the compiler's profiling (gcc -p)
support to determine precisely when there is a stack overflow. The compiler
generates a call to the special function 'mcount' in the prologue of each
function. This special 'mcount' function checks whether the stack has
grown beyond STACK_WARN size; and, if so, it will call the stack_overflowed
function, which generates a stack trace. If the stack has grown to STACK_PANIC
size, the stack_overflowed function will panic() the system.
The hope is that with this support we can track down precisely the execution
context when the stack overflows.