about summary refs log tree commit diff
path: root/arch/or1k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/or1k')
-rw-r--r--arch/or1k/reloc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/or1k/reloc.h b/arch/or1k/reloc.h
index ddee45c5..128089ca 100644
--- a/arch/or1k/reloc.h
+++ b/arch/or1k/reloc.h
@@ -13,3 +13,12 @@
 
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
 	"l.jr %0 ; l.ori r1,%1,0" : : "r"(pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+	".hidden " #sym " \n" \
+	"	l.jal 1f \n" \
+	"	 l.nop \n" \
+	"	.word " #sym "-. \n" \
+	"1:	l.lwz %0, 0(r9) \n" \
+	"	l.add %0, %0, r9 \n" \
+	: "=r"(*(fp)) : : "memory", "r9" )