about summary refs log tree commit diff
path: root/arch/x32
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x32')
-rw-r--r--arch/x32/reloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x32/reloc.h b/arch/x32/reloc.h
index 574f44a7..dc039adf 100644
--- a/arch/x32/reloc.h
+++ b/arch/x32/reloc.h
@@ -24,3 +24,8 @@
 
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
 	"mov %1,%%esp ; jmp *%0" : : "r"((uint64_t)(uintptr_t)pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+	".hidden " #sym "\n" \
+	"	lea " #sym "(%%rip),%0\n" \
+	: "=r"(*fp) : : "memory" )