summaryrefslogtreecommitdiff
path: root/recipes/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch
blob: 9d3cb6bbab1c331535daa5dd5ab9158813b3af51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- /home/work-tmp/jbowler/nslu2/ucslugc.0807/work/uclibc-0.9.27-r5/uClibc-0.9.27/ldso/ldso/arm/dl-startup.h	2005-01-11 23:59:21.000000000 -0800
+++ uClibc-0.9.27/ldso/ldso/arm/dl-startup.h	2005-08-11 23:40:01.393797745 -0700
@@ -7,6 +7,9 @@
 
 /* Overrive the default _dl_boot function, and replace it with a bit of asm.
  * Then call the real _dl_boot function, which is now named _dl_boot2. */
+/*NOTE: the 'bx' instruction at the end replaces mov pc, r6 - which is not
+ * compatible with thumb interworking.  The instruction should be supported
+ * on all modern ARM architectures (because they all support thumb). */
 asm(""						\
 "	.text\n"				\
 "	.globl	_dl_boot\n"		\
@@ -17,7 +20,7 @@
 "	bl	_dl_boot2\n"		\
 "	mov	r6, r0\n"			\
 "	mov	r0, r7\n"			\
-"	mov	pc, r6\n"			\
+"	bx	r6\n"			\
 );
 
 #define DL_BOOT(X)   static __attribute_used__ void* _dl_boot2 (X)