Skip to contentSkip to conversation

sh: Fix cannot execute a stand-alone application

PATCH New Nobuhiro Iwamatsu 1 participant 1 message Oct 9, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: Fix cannot execute a stand-alone application

Address calculated in EXPORT_FUNC in SuperH was wrong, I revised it.

---
 examples/stubs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
examples/stubs.c +4 -2
index ec53532..a8cb954 100644
@@ -162,11 +162,13 @@ gd_t *global_data;
 		#x ":\n"				\
 		"	mov	r13, r1\n"		\
 		"	add	%0, r1\n"		\
-		"	add	%1, r1\n"		\
+		"	mov.l @r1, r2\n"	\
+		"	add	%1, r2\n"		\
+		"	mov.l @r2, r1\n"	\
 		"	jmp	@r1\n"			\
 		"	nop\n"				\
 		"	nop\n"				\
-		: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1");
+		: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1", "r2");
 #elif defined(CONFIG_SPARC)
 /*
  * g7 holds the pointer to the global_data. g1 is call clobbered.
Signature · 1 line
1.5.6.3