libunwind relies on DWARF .eh_frame sections to unwind the stack properly
to ensure unwind info is generated compile with: -funwind-tables -fno-omit-frame-pointer
-funwind-tables -fno-omit-frame-pointer
Also ensure .eh_frame is linked.
.eh_frame