diff mbox

[AArch64] Add unwind info to __libc_start_main

Message ID DB6PR0801MB205372EB7CB30BC3564DE1C083B20@DB6PR0801MB2053.eurprd08.prod.outlook.com
State New, archived
Headers show

Commit Message

Wilco Dijkstra July 31, 2017, 1:58 p.m. UTC
Add unwind info to __libc_start_main so that unwinding continues one
extra level to _start.

ChangeLog:
2017-07-31  Wilco Dijkstra  <wdijkstr@arm.com>

        * sysdeps/aarch64/Makefile: Build libc-start.c with -fexceptions.

--

Comments

Andreas Schwab July 31, 2017, 2:42 p.m. UTC | #1
On Jul 31 2017, Wilco Dijkstra <Wilco.Dijkstra@arm.com> wrote:

> Add unwind info to __libc_start_main so that unwinding continues one
> extra level to _start.
>
> ChangeLog:
> 2017-07-31  Wilco Dijkstra  <wdijkstr@arm.com>
>
>         * sysdeps/aarch64/Makefile: Build libc-start.c with -fexceptions.

In which way is that specific to aarch64?  Why do you need exception
support for unwinding (and not just -funwind-tables)?

Andreas.
Wilco Dijkstra July 31, 2017, 4:10 p.m. UTC | #2
Andreas Schwab wrote:

> >         * sysdeps/aarch64/Makefile: Build libc-start.c with -fexceptions.

> In which way is that specific to aarch64?  Why do you need exception
> support for unwinding (and not just -funwind-tables)?

It probably isn't - I just copied the code from ARM. But we could make
backtrace.c and libc-start.c always emit unwind tables on all targets.
I suppose -funwind-tables is sufficient in C code.

Wilco
diff mbox

Patch

diff --git a/sysdeps/aarch64/Makefile b/sysdeps/aarch64/Makefile
index 562c1373aebee6ffb4ff5c2071a23d007a8e07ba..81bb01923d18856b609632251a83d93a6e995b46 100644
--- a/sysdeps/aarch64/Makefile
+++ b/sysdeps/aarch64/Makefile
@@ -11,6 +11,8 @@  endif
 
 ifeq ($(subdir),csu)
 gen-as-const-headers += tlsdesc.sym
+
+CFLAGS-libc-start.c += -fexceptions
 endif
 
 ifeq ($(subdir),gmon)