diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-10-06 20:55:19 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-10-06 20:55:19 +0000 |
commit | 455e95b5bd49286496ddf1957ffabb0240c5ce47 (patch) | |
tree | fc52476ca2c0d59615272a2d5df2a05552aa10bc /libgloss | |
parent | 0d2597f5a07cf946c921e66121f0b23aa4cc4d14 (diff) | |
download | newlib-455e95b5bd49286496ddf1957ffabb0240c5ce47.zip newlib-455e95b5bd49286496ddf1957ffabb0240c5ce47.tar.gz newlib-455e95b5bd49286496ddf1957ffabb0240c5ce47.tar.bz2 |
2008-10-06 Bill Tompkins <bill+newlib@key-square.com>
* arm/crt0.S: Fix calling hardware_init_hook() or software_init_hook()
under thumb and thumb2.
Diffstat (limited to 'libgloss')
-rw-r--r-- | libgloss/ChangeLog | 5 | ||||
-rw-r--r-- | libgloss/arm/crt0.S | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog index ba58046..7e8be08 100644 --- a/libgloss/ChangeLog +++ b/libgloss/ChangeLog @@ -1,3 +1,8 @@ +2008-10-06 Bill Tompkins <bill+newlib@key-square.com> + + * arm/crt0.S: Fix calling hardware_init_hook() or software_init_hook() + under thumb and thumb2. + 2008-09-24 DJ Delorie <dj@redhat.com> * m32c/varvects.S: New. diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S index bbde589..ea5163a 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 */ |