public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Off-by-two bug when relocating GOT
@ 2007-10-04 17:45 Vlad Lungu
  2007-10-05  3:58 ` Shinya Kuribayashi
  0 siblings, 1 reply; 17+ messages in thread
From: Vlad Lungu @ 2007-10-04 17:45 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-10-17 14:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04 17:45 [U-Boot-Users] [PATCH] Off-by-two bug when relocating GOT Vlad Lungu
2007-10-05  3:58 ` Shinya Kuribayashi
2007-10-05 10:39   ` Vlad Lungu
2007-10-05 20:18     ` Thomas Lange
2007-10-05 22:31       ` Vlad Lungu
2007-10-06  0:20         ` Thomas Lange
2007-10-06 12:27           ` Vlad Lungu
2007-10-11 20:04         ` Shinya Kuribayashi
2007-10-11 22:06           ` Vlad Lungu
2007-10-12 10:20             ` Vlad Lungu
2007-10-14 15:57             ` Shinya Kuribayashi
2007-10-14 19:00               ` Vlad Lungu
2007-10-16 18:19               ` [U-Boot-Users] _gp in current u-boot.lds for MIPS ports Wolfgang Denk
2007-10-16 19:13                 ` Vlad Lungu
2007-10-16 20:15                 ` Andrew Dyer
2007-10-17 14:27                   ` Shinya Kuribayashi
2007-10-17 14:23                 ` Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox