From 3cb4de474155c315003746f3de9c408b824abc5e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 26 Jun 2014 15:08:29 -0700 Subject: ARM: Move more aeabi routine magic out of Linux-specific directories --- sysdeps/arm/Makefile | 18 ++++++++++++--- sysdeps/arm/libc-aeabi_read_tp.S | 1 + sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c | 1 + sysdeps/arm/nptl/Makefile | 13 +++++++++++ sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c | 1 + sysdeps/unix/sysv/linux/arm/Makefile | 27 ++++------------------ sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S | 1 - .../sysv/linux/arm/nptl-aeabi_unwind_cpp_pr1.c | 1 - .../unix/sysv/linux/arm/rt-aeabi_unwind_cpp_pr1.c | 1 - 9 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 sysdeps/arm/libc-aeabi_read_tp.S create mode 100644 sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c create mode 100644 sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c delete mode 100644 sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl-aeabi_unwind_cpp_pr1.c delete mode 100644 sysdeps/unix/sysv/linux/arm/rt-aeabi_unwind_cpp_pr1.c (limited to 'sysdeps') diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index a1380487b1..db60a17671 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 0000000000..6132afc151 --- /dev/null +++ b/sysdeps/arm/libc-aeabi_read_tp.S @@ -0,0 +1 @@ +#include 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 0000000000..7b83522437 --- /dev/null +++ b/sysdeps/arm/nptl-aeabi_unwind_cpp_pr1.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/arm/nptl/Makefile b/sysdeps/arm/nptl/Makefile index 143850e6c8..2c31e76ed2 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 0000000000..7b83522437 --- /dev/null +++ b/sysdeps/arm/rt-aeabi_unwind_cpp_pr1.c @@ -0,0 +1 @@ +#include diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index 38275cda81..80c112bc18 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,14 +1,3 @@ -ifeq ($(subdir),csu) -# 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 - -sysdep_routines += aeabi_read_tp libc-aeabi_read_tp -static-only-routines += aeabi_read_tp -shared-only-routines += libc-aeabi_read_tp -endif - ifeq ($(subdir),elf) sysdep-rtld-routines += aeabi_read_tp libc-do-syscall endif @@ -37,21 +26,13 @@ libcrypt-sysdep_routines += libc-do-syscall endif ifeq ($(subdir),rt) -librt-sysdep_routines += libc-do-syscall rt-aeabi_unwind_cpp_pr1 -librt-shared-only-routines += libc-do-syscall rt-aeabi_unwind_cpp_pr1 +librt-sysdep_routines += libc-do-syscall +librt-shared-only-routines += libc-do-syscall endif ifeq ($(subdir),nptl) -libpthread-sysdep_routines += libc-do-syscall nptl-aeabi_unwind_cpp_pr1 -libpthread-shared-only-routines += libc-do-syscall 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)) +libpthread-sysdep_routines += libc-do-syscall +libpthread-shared-only-routines += libc-do-syscall endif ifeq ($(subdir),resolv) diff --git a/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S b/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S deleted file mode 100644 index 6132afc151..0000000000 --- a/sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/nptl-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/nptl-aeabi_unwind_cpp_pr1.c deleted file mode 100644 index 7b83522437..0000000000 --- a/sysdeps/unix/sysv/linux/arm/nptl-aeabi_unwind_cpp_pr1.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/rt-aeabi_unwind_cpp_pr1.c b/sysdeps/unix/sysv/linux/arm/rt-aeabi_unwind_cpp_pr1.c deleted file mode 100644 index 7b83522437..0000000000 --- a/sysdeps/unix/sysv/linux/arm/rt-aeabi_unwind_cpp_pr1.c +++ /dev/null @@ -1 +0,0 @@ -#include -- cgit v1.2.1