diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-09-17 07:20:58 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-09-17 07:20:58 +0000 |
commit | c16182680c9ac8ad65f8ff38f6ae170feb0d33c7 (patch) | |
tree | 54e9d8e72949bc22d1d40a4c5c6d94d21228101a | |
parent | 4761e63bc4d1ae2e3298fcee1fddced94281d9e7 (diff) | |
download | musl-c16182680c9ac8ad65f8ff38f6ae170feb0d33c7.tar.gz musl-c16182680c9ac8ad65f8ff38f6ae170feb0d33c7.tar.xz musl-c16182680c9ac8ad65f8ff38f6ae170feb0d33c7.zip |
new dlstart stage-2 chaining for powerpc
-rw-r--r-- | arch/powerpc/reloc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/powerpc/reloc.h b/arch/powerpc/reloc.h index aa5f8c93..b8b6589f 100644 --- a/arch/powerpc/reloc.h +++ b/arch/powerpc/reloc.h @@ -13,3 +13,12 @@ #define CRTJMP(pc,sp) __asm__ __volatile__( \ "mr 1,%1 ; mtlr %0 ; blr" : : "r"(pc), "r"(sp) : "memory" ) + +#define GETFUNCSYM(fp, sym, got) __asm__ ( \ + ".hidden " #sym " \n" \ + " bl 1f \n" \ + " .long " #sym "-. \n" \ + "1: mflr %1 \n" \ + " lwz %0, 0(%1) \n" \ + " add %0, %0, %1 \n" \ + : "=r"(*(fp)), "=r"((int){0}) : : "memory", "lr" ) |