From b56c0c673ab02a50bf713bb98da626bb6825272c Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sat, 19 Jan 2013 22:08:16 +0000 Subject: [PATCH] When DDB is enabled and we are building for the ARM EABI include the unwind tables in the kernel. --- sys/conf/Makefile.arm | 2 ++ sys/conf/ldscript.arm | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/sys/conf/Makefile.arm b/sys/conf/Makefile.arm index 4145d606ad8..7ccb9a79b49 100644 --- a/sys/conf/Makefile.arm +++ b/sys/conf/Makefile.arm @@ -41,6 +41,8 @@ STRIP_FLAGS = -S .if empty(DDB_ENABLED) CFLAGS += -mno-apcs-frame +.elif defined(WITH_ARM_EABI) +CFLAGS += -funwind-tables .endif SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \ diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index 3b8422ce75a..d681c874e72 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -56,6 +56,18 @@ SECTIONS .init : { *(.init) } =0x9090 .plt : { *(.plt) } + _extab_start = .; + PROVIDE(extab_start = .); + .ARM.extab : { *(.ARM.extab) } + _extab.end = .; + PROVIDE(extab_end = .); + + _exidx_start = .; + PROVIDE(exidx_start = .); + .ARM.exidx : { *(.ARM.exidx) } + _exidx_end = .; + PROVIDE(exidx_end = .); + /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ . = ALIGN(0x1000) + (. & (0x1000 - 1)) ;