[U-Boot-Users] [PATCH] Off-by-two bug when relocating GOT
Vlad Lungu
vlad at comsys.ro
Thu Oct 4 19:45:08 CEST 2007
The first two entries are skipped but the number of relocated entries
is not adjusted; as a result, the first __u_boot_cmd_* structure is
smashed and no commands can be issued.
Signed-off-by: Vlad Lungu <vlad at comsys.ro>
---
cpu/mips/start.S | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cpu/mips/start.S b/cpu/mips/start.S
index e91e213..1e5b302 100644
--- a/cpu/mips/start.S
+++ b/cpu/mips/start.S
@@ -349,6 +349,7 @@ in_ram:
/* Now we want to update GOT.
*/
lw t3, -4(t0) /* t3 <-- num_got_entries */
+ sub t3,2 /* If skipping two entries, adjust length*/
addi t4, gp, 8 /* Skipping first two entries. */
li t2, 2
1:
--
1.5.2.2
More information about the U-Boot
mailing list