The C runtime wasn't initialized correctly (there was garbage in the data
and bss sections). Add a reset_handler which initializes these sections
before calling the application's main() function.
The initial stack pointer is also defined in the linker script, allowing the
application to override with a linker command line option
"-Wl,--defsym,_stack=0x20005000".
Thanks to Gareth McMullin <gareth@blacksphere.co.nz>.
All handlers are weak symbols pointing to a null handler (doing nothing)
or blocking handler (running an infinite loop). This means you can
define a function with the name in the list and the linker will use your
definition instead of the default one. This makes it easy to implement
your own handlers without touching the library code.