summaryrefslogtreecommitdiff
path: root/packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch
diff options
context:
space:
mode:
authorJohn Bowler <jbowler@nslu2-linux.org>2005-08-14 06:07:44 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-14 06:07:44 +0000
commit98318c22a913b1500564268e3c499dc57cc036e0 (patch)
treef45374265f144b31b15051b7b229120039fa23ee /packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch
parentcc49ea85bdc9b42f77b3c01f950b179e56bf8f2f (diff)
Fix uclibc thumb support - with these patches and by disabling the ARM
specific string asm in uclibc it is possible to run at least some thumb executables on ucslugc. The changes can be incorporated into other distros by setting thumb-interwork in OVERRIDES - the changes do change the way ARM code executes (necessarily). (Changes have also been submitted as bug 385 to uclibc.org).
Diffstat (limited to 'packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch')
-rw-r--r--packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch b/packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch
new file mode 100644
index 0000000000..9d3cb6bbab
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.27/thumb-ldso-dlboot.patch
@@ -0,0 +1,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)