summaryrefslogtreecommitdiff
path: root/arch/i386/reloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/reloc.h')
-rw-r--r--arch/i386/reloc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/i386/reloc.h b/arch/i386/reloc.h
index b52ef402..032f454b 100644
--- a/arch/i386/reloc.h
+++ b/arch/i386/reloc.h
@@ -14,3 +14,10 @@
#define CRTJMP(pc,sp) __asm__ __volatile__( \
"mov %1,%%esp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+ ".hidden " #sym "\n" \
+ " call 1f\n" \
+ "1: addl $" #sym "-.,(%%esp)\n" \
+ " pop %0" \
+ : "=r"(*fp) : : "memory" )