about summary refs log tree commit diff
path: root/arch/microblaze/reloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/reloc.h')
-rw-r--r--arch/microblaze/reloc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/microblaze/reloc.h b/arch/microblaze/reloc.h
index 611db465..0a030c7e 100644
--- a/arch/microblaze/reloc.h
+++ b/arch/microblaze/reloc.h
@@ -20,3 +20,10 @@
 
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
 	"addik r1,%1,0 ; bra %0" : : "r"(pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+	".hidden " #sym " \n" \
+	"	mfs %0, rpc \n" \
+	"	addik %0, %0, _GLOBAL_OFFSET_TABLE_+8 \n" \
+	"	addik %0, %0, " #sym "@GOTOFF \n" \
+	: "=r"(*(fp)) : : "memory" )