After relocation, exception vectors still point to the old code (not relocated). This patch fixes them.
Signed-off-by: Luca Ellero <luca.ell...@brickedbrain.com> --- arch/arm/lib/relocate.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S index 92f5314..4186344 100644 --- a/arch/arm/lib/relocate.S +++ b/arch/arm/lib/relocate.S @@ -76,6 +76,21 @@ copy_loop: blo copy_loop /* + * fix exception vectors + */ + ldr r2, =_undefined_instruction + ldr r3, =_fiq + add r2, r2, r4 + add r3, r3, r4 +fix_exceptions: + ldr r0, [r2] + add r0, r0, r4 + str r0, [r2] + cmp r2,r3 + add r2, #4 + blo fix_exceptions + + /* * fix .rel.dyn relocations */ ldr r2, =__rel_dyn_start /* r2 <- SRC &__rel_dyn_start */ -- 1.7.10.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot