about summary refs log tree commit diff
path: root/arch/arm/reloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/reloc.h')
-rw-r--r--arch/arm/reloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/reloc.h b/arch/arm/reloc.h
index dec0031e..e1ef3506 100644
--- a/arch/arm/reloc.h
+++ b/arch/arm/reloc.h
@@ -28,5 +28,10 @@
 #define REL_TPOFF       R_ARM_TLS_TPOFF32
 //#define REL_TLSDESC     R_ARM_TLS_DESC
 
+#ifdef __thumb__
+#define CRTJMP(pc,sp) __asm__ __volatile__( \
+	"mov sp,%1 ; bx %0" : : "r"(pc), "r"(sp) : "memory" )
+#else
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
 	"mov sp,%1 ; tst %0,#1 ; moveq pc,%0 ; bx %0" : : "r"(pc), "r"(sp) : "memory" )
+#endif