Remove signal handlers and other garbage.
All we need is __builtin_frame_address and __builtin_return_address
builtins and nothing else.
Only backtrace(3) in libc is accepted as an external implementation
of stacktrace(3). This may fix build failure on FreeBSD with
installed libexeinfo.
The usual way to inspect a stacktrace of a program is to use an external
debugger such as gdb and its command 'bt'. However, sometimes it is useful
to obtain a stacktrace from within a program, e.g., for the purposes of
logging, debugging or diagnostics.
libstacktrace library provides stacktrace(3) function that have the same
API/usage as glibc's backtrace(3) but works at least under NetBSD, FreeBSD
and Solaris.