From 12b0b7d8eab5ec428b779d83bd3c6edad2f31993 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 17 Sep 2015 07:28:44 +0000 Subject: new dlstart stage-2 chaining for x86_64 and x32 --- arch/x86_64/reloc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/x86_64/reloc.h') 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" ) -- cgit v1.2.1