diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2017-09-21 12:08:12 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2017-09-21 12:08:12 +0000 |
commit | 817221cc87b78034dd750f6dc94ab336d7e802be (patch) | |
tree | dd49b44efa5124c2054da2431dcc0ab086c6079d /gcc/tree-inline.c | |
parent | 73d1c65029e56f95bfb3d83e2bb9a403f3f69de4 (diff) | |
download | gcc-817221cc87b78034dd750f6dc94ab336d7e802be.zip gcc-817221cc87b78034dd750f6dc94ab336d7e802be.tar.gz gcc-817221cc87b78034dd750f6dc94ab336d7e802be.tar.bz2 |
PR71951: Fix unwinding with -fomit-frame-pointer
As described in PR71951, if libgcc is built with -fomit-frame-pointer,
unwinding crashes, for example while doing a backtrace. The underlying
reason is the Dwarf unwinder does not setup the frame pointer register
in the initialization code. When later unwinding a function that uses
the frame pointer, it tries to read FP using _Unwind_GetGR, and this
crashes if has never restored FP. To unwind correctly the first frame
must save and restore FP (it is unwound in a special way so that it
uses SP instead of FP). This is done by adding -fno-omit-frame-pointer.
gcc/
PR target/71951
* config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
From-SVN: r253061
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions