aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/arm
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-06-26 15:08:29 -0700
committerRoland McGrath <roland@hack.frob.com>2014-06-26 15:08:29 -0700
commit3cb4de474155c315003746f3de9c408b824abc5e (patch)
tree97ab77bdad076daa6d95670b9cb9ed077670de23 /sysdeps/arm
parent354426bb34a7dba084cd1dbef46db0994c48988f (diff)
downloadglibc-3cb4de474155c315003746f3de9c408b824abc5e.zip
glibc-3cb4de474155c315003746f3de9c408b824abc5e.tar.gz
glibc-3cb4de474155c315003746f3de9c408b824abc5e.tar.bz2
ARM: Move more aeabi routine magic out of Linux-specific directories
Diffstat (limited to 'sysdeps/arm')
-rw-r--r--sysdeps/arm/Makefile18
-rw-r--r--sysdeps/arm/libc-aeabi_read_tp.S1
-rw-r--r--sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c1
-rw-r--r--sysdeps/arm/nptl/Makefile13
-rw-r--r--sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c1
5 files changed, 31 insertions, 3 deletions
diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
index a138048..db60a17 100644
--- a/sysdeps/arm/Makefile
+++ b/sysdeps/arm/Makefile
@@ -38,11 +38,18 @@ ifeq ($(subdir),csu)
gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
- aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
- aeabi_memmove aeabi_memset
+ aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
+ aeabi_memmove aeabi_memset \
+ aeabi_read_tp libc-aeabi_read_tp
sysdep_routines += $(aeabi_constants) $(aeabi_routines)
-static-only-routines += $(aeabi_constants)
+static-only-routines += $(aeabi_constants) aeabi_read_tp
+shared-only-routines += libc-aeabi_read_tp
+
+# In order for unwinding to fail when it falls out of main, we need a
+# cantunwind marker. There's one in start.S. To make sure we reach it, add
+# unwind tables for __libc_start_main.
+CFLAGS-libc-start.c += -fexceptions
endif
ifeq ($(subdir),gmon)
@@ -52,3 +59,8 @@ endif
ifeq ($(subdir),debug)
CFLAGS-backtrace.c += -funwind-tables
endif
+
+ifeq ($(subdir),rt)
+librt-sysdep_routines += rt-aeabi_unwind_cpp_pr1
+librt-shared-only-routines += rt-aeabi_unwind_cpp_pr1
+endif
diff --git a/sysdeps/arm/libc-aeabi_read_tp.S b/sysdeps/arm/libc-aeabi_read_tp.S
new file mode 100644
index 0000000..6132afc
--- /dev/null
+++ b/sysdeps/arm/libc-aeabi_read_tp.S
@@ -0,0 +1 @@
+#include <aeabi_read_tp.S>
diff --git a/sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>
diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile
index 143850e..2c31e76 100644
--- a/sysdeps/arm/nptl/Makefile
+++ b/sysdeps/arm/nptl/Makefile
@@ -18,3 +18,16 @@
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
+
+ifeq ($(subdir),nptl)
+libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1
+libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1
+
+# This test relies on compiling part of the binary with EH information,
+# part without, and unwinding through. The .ARM.exidx tables have
+# start addresses for EH regions, but no end addresses. Every
+# region an exception needs to propogate through must have unwind
+# information, or a previous function's unwind table may be used
+# by mistake.
+tests := $(filter-out tst-cleanupx4,$(tests))
+endif
diff --git a/sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c
new file mode 100644
index 0000000..7b83522
--- /dev/null
+++ b/sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c
@@ -0,0 +1 @@
+#include <aeabi_unwind_cpp_pr1.c>