summaryrefslogtreecommitdiff
path: root/arch/x86_64
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-09-17 07:28:44 +0000
committerRich Felker <dalias@aerifal.cx>2015-09-17 07:28:44 +0000
commit12b0b7d8eab5ec428b779d83bd3c6edad2f31993 (patch)
tree10ec9dfb820f6b788633a609e4ce93ecafc97292 /arch/x86_64
parentc16182680c9ac8ad65f8ff38f6ae170feb0d33c7 (diff)
downloadmusl-12b0b7d8eab5ec428b779d83bd3c6edad2f31993.tar.gz
musl-12b0b7d8eab5ec428b779d83bd3c6edad2f31993.tar.bz2
musl-12b0b7d8eab5ec428b779d83bd3c6edad2f31993.tar.xz
musl-12b0b7d8eab5ec428b779d83bd3c6edad2f31993.zip
new dlstart stage-2 chaining for x86_64 and x32
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/reloc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/reloc.h b/arch/x86_64/reloc.h
index 84c075c3..fac0c0ae 100644
--- a/arch/x86_64/reloc.h
+++ b/arch/x86_64/reloc.h
@@ -13,3 +13,8 @@
#define CRTJMP(pc,sp) __asm__ __volatile__( \
"mov %1,%%rsp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" )
+
+#define GETFUNCSYM(fp, sym, got) __asm__ ( \
+ ".hidden " #sym "\n" \
+ " lea " #sym "(%%rip),%0\n" \
+ : "=r"(*fp) : : "memory" )