From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vlad Lungu Date: Thu, 04 Oct 2007 20:45:08 +0300 Subject: [U-Boot-Users] [PATCH] Off-by-two bug when relocating GOT Message-ID: <470526A4.40903@comsys.ro> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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