summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch b/meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch
new file mode 100644
index 0000000000..6ab306180c
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.12/armv4t-interworking.patch
@@ -0,0 +1,78 @@
1Index: libc/ports/sysdeps/arm/memcpy.S
2===================================================================
3--- libc.orig/ports/sysdeps/arm/memcpy.S 2009-09-03 16:12:00.000000000 -0700
4+++ libc/ports/sysdeps/arm/memcpy.S 2009-10-28 12:51:22.000000000 -0700
5@@ -130,7 +130,12 @@ ENTRY(memcpy)
6 strcsb r4, [r0], #1
7 strcsb ip, [r0]
8
9+#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
10+ ldmfd sp!, {r0, r4, lr}
11+ bx lr
12+#else
13 ldmfd sp!, {r0, r4, pc}
14+#endif
15
16 9: rsb ip, ip, #4
17 cmp ip, #2
18Index: libc/ports/sysdeps/arm/memmove.S
19===================================================================
20--- libc.orig/ports/sysdeps/arm/memmove.S 2009-09-03 16:12:00.000000000 -0700
21+++ libc/ports/sysdeps/arm/memmove.S 2009-10-28 12:51:22.000000000 -0700
22@@ -144,7 +144,12 @@ ENTRY(memmove)
23 strneb r3, [r0, #-1]!
24 strcsb r4, [r0, #-1]!
25 strcsb ip, [r0, #-1]
26+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
27+ ldmfd sp!, {r0, r4, lr}
28+ bx lr
29+#else
30 ldmfd sp!, {r0, r4, pc}
31+#endif
32
33 9: cmp ip, #2
34 ldrgtb r3, [r1, #-1]!
35Index: libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
36===================================================================
37--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/clone.S 2009-09-03 16:12:04.000000000 -0700
38+++ libc/ports/sysdeps/unix/sysv/linux/arm/clone.S 2009-10-28 12:51:22.000000000 -0700
39@@ -96,8 +96,14 @@ ENTRY(__clone)
40 #endif
41 @ pick the function arg and call address off the stack and execute
42 ldr r0, [sp, #4]
43+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
44+ ldr ip, [sp], #8
45+ mov lr, pc
46+ bx ip
47+#else
48 mov lr, pc
49 ldr pc, [sp], #8
50+#endif
51
52 @ and we are done, passing the return value through r0
53 b PLTJMP(HIDDEN_JUMPTARGET(_exit))
54Index: libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
55===================================================================
56--- libc.orig/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-09-16 13:58:18.000000000 +0100
57+++ libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h 2009-11-03 19:17:16.000000000 +0000
58@@ -129,6 +129,11 @@
59 DO_RET(lr); \
60 1: .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
61 # else
62+#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
63+#define POP_PC ldr lr, [sp], #4; bx lr
64+#else
65+#define POP_PC ldr pc, [sp], #4
66+#endif
67 # define SYSCALL_ERROR_HANDLER \
68 __local_syscall_error: \
69 str lr, [sp, #-4]!; \
70@@ -138,7 +143,7 @@
71 rsb r1, r1, #0; \
72 str r1, [r0]; \
73 mvn r0, #0; \
74- ldr pc, [sp], #4;
75+ POP_PC;
76 # endif
77 #else
78 # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */