diff options
Diffstat (limited to 'arch/arm/lib/crt0.S')
-rw-r--r-- | arch/arm/lib/crt0.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S index 4f2a7121c4..2f4c14e96b 100644 --- a/arch/arm/lib/crt0.S +++ b/arch/arm/lib/crt0.S @@ -85,6 +85,8 @@ ENTRY(_main) mov r0, sp bl board_init_f_alloc_reserve mov sp, r0 + /* set up gd here, outside any C code */ + mov r9, r0 bl board_init_f_init_reserve mov r0, #0 @@ -134,6 +136,7 @@ here: bl spl_relocate_stack_gd cmp r0, #0 movne sp, r0 + movne r9, r0 # endif ldr r0, =__bss_start /* this is auto-relocated! */ |