summaryrefslogtreecommitdiffstats
path: root/libpthread/nptl/sysdeps/unix
diff options
context:
space:
mode:
authorKhem Raj <kraj@mvista.com>2009-03-18 02:51:45 +0000
committerKhem Raj <kraj@mvista.com>2009-03-18 02:51:45 +0000
commitd38a60ef0325122761dea450cc163ac036d896e7 (patch)
treea1caa3d67112586dd6bd011498b020ef2c880756 /libpthread/nptl/sysdeps/unix
parent7c81171317e113695b868cb10fbc4ecd747e803b (diff)
downloaduClibc-alpine-d38a60ef0325122761dea450cc163ac036d896e7.tar.bz2
uClibc-alpine-d38a60ef0325122761dea450cc163ac036d896e7.tar.xz
Always compile fork.S in arm mode. Make _Unwind_Resume arm only
even when compiling in thumb mode.
Diffstat (limited to 'libpthread/nptl/sysdeps/unix')
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch6
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
index 7dfaacc9d..5c8d634cd 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
@@ -18,7 +18,11 @@ endif
CFLAGS-pthread_once.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-lowlevellock.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+ASFLAGS-pt-vfork.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -marm
+# We always compile it in arm mode because of SAVE_PID macro
+# This macro should be alternatively implemented in THUMB
+# assembly.
+ASFLAGS-vfork.S = -marm
CFLAGS += $(SSP_ALL_CFLAGS)
#CFLAGS:=$(CFLAGS:-O1=-O2)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index 8188249ef..fb842f97d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
@@ -19,6 +19,7 @@
#include <dlfcn.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unwind.h>
#define __libc_dlopen(x) dlopen(x, (RTLD_LOCAL | RTLD_LAZY))
@@ -54,6 +55,9 @@ init (void)
assembly. */
__asm__ (
+#ifdef __thumb__
+" .code 32\n"
+#endif
" .globl _Unwind_Resume\n"
" .type _Unwind_Resume, %function\n"
"_Unwind_Resume:\n"
@@ -74,6 +78,10 @@ __asm__ (
"1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8\n"
"2: .word libgcc_s_resume(GOTOFF)\n"
" .size _Unwind_Resume, .-_Unwind_Resume\n"
+#ifdef __thumb__
+" .code 16\n"
+#endif
+
);
_Unwind_Reason_Code