The code generated for Thumb and Thumb2 targets has different handling
for abort(). Because abort() is "noreturn", it doesn't need to preserve
the callee-save registers. The Thumb2 version trashes LR and makes it
impossible to figure out who called abort().
This inserts a trivial stub function; net effect is stack traces are
reasonable after an abort().
For bug 2191452.
the issue here is that abort() can be called from anywhere, in particular
from malloc or free. When we try to use the debug_log functions, these
can end up calling into some code (like malloc/free) that called abort()
in the first place and end up in an infinite recursion loop.