summaryrefslogtreecommitdiff
path: root/recipes/eglibc/files
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2009-11-04 10:03:22 +0100
committerPhil Blundell <philb@gnu.org>2009-11-04 14:17:41 +0000
commit8fedaafb39b5664ea964e8aabf2c22795e4fff3c (patch)
tree2c70ea8c4d20de4d791b8f3f6460e5503c973353 /recipes/eglibc/files
parent0f926962a23b68e69da9dc6617c754573cbc42d7 (diff)
eglibc: updated armv4t-interworking.patch
* Updated patch to make SYSCALL_ERROR_HANDLER interworking safe. * Phil Blundell found and fixed another issue in eglibc armv4t builds. Signed-off-by: Martin.Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/eglibc/files')
-rw-r--r--recipes/eglibc/files/armv4t-interworking.patch27
1 files changed, 26 insertions, 1 deletions
diff --git a/recipes/eglibc/files/armv4t-interworking.patch b/recipes/eglibc/files/armv4t-interworking.patch
index 55ee8565d7..6ab306180c 100644
--- a/recipes/eglibc/files/armv4t-interworking.patch
+++ b/recipes/eglibc/files/armv4t-interworking.patch
@@ -40,7 +40,7 @@ Index: libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
#endif
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
-+#if defined(__ARM_ARCH_V4T__) && defined(__THUMB_INTERWORK__)
++#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+ ldr ip, [sp], #8
+ mov lr, pc
+ bx ip
@@ -51,3 +51,28 @@ Index: libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
@ and we are done, passing the return value through r0
b PLTJMP(HIDDEN_JUMPTARGET(_exit))
+Index: libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
+===================================================================
+--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-09-16 13:58:18.000000000 +0100
++++ libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-11-03 19:17:16.000000000 +0000
+@@ -129,6 +129,11 @@
+ DO_RET(lr); \
+ 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
+ # else
++#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
++#define POP_PC ldr lr, [sp], #4; bx lr
++#else
++#define POP_PC ldr pc, [sp], #4
++#endif
+ # define SYSCALL_ERROR_HANDLER \
+ __local_syscall_error: \
+ str lr, [sp, #-4]!; \
+@@ -138,7 +143,7 @@
+ rsb r1, r1, #0; \
+ str r1, [r0]; \
+ mvn r0, #0; \
+- ldr pc, [sp], #4;
++ POP_PC;
+ # endif
+ #else
+ # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */