diff options
Diffstat (limited to 'libgloss/arm')
-rw-r--r-- | libgloss/arm/crt0.S | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S index bbde5892c..ea5163ae1 100644 --- a/libgloss/arm/crt0.S +++ b/libgloss/arm/crt0.S @@ -167,14 +167,23 @@ __change_mode: ldr r3, .Lhwinit cmp r3, #0 beq .LC24 +#if defined(__thumb__) || defined(__thumb2__) + blx r3 +#else mov lr, pc mov pc, r3 +#endif .LC24: ldr r3, .Lswinit cmp r3, #0 beq .LC25 +#if defined(__thumb__) || defined(__thumb2__) + blx r3 +#else mov lr, pc mov pc, r3 +#endif + .LC25: mov r0, #0 /* no arguments */ mov r1, #0 /* no argv either */ |