powerpc-sf longjmp clobbering of val argument
[musl.git] / arch / powerpc / reloc.h
blobfdfbf827e8e081237be4daef11119fbbddf64782
1 #if defined(_SOFT_FLOAT) || defined(__NO_FPRS__)
2 #define FP_SUFFIX "-sf"
3 #else
4 #define FP_SUFFIX ""
5 #endif
7 #define LDSO_ARCH "powerpc" FP_SUFFIX
9 #define TPOFF_K (-0x7000)
11 #define REL_SYMBOLIC R_PPC_ADDR32
12 #define REL_USYMBOLIC R_PPC_UADDR32
13 #define REL_GOT R_PPC_GLOB_DAT
14 #define REL_PLT R_PPC_JMP_SLOT
15 #define REL_RELATIVE R_PPC_RELATIVE
16 #define REL_COPY R_PPC_COPY
17 #define REL_DTPMOD R_PPC_DTPMOD32
18 #define REL_DTPOFF R_PPC_DTPREL32
19 #define REL_TPOFF R_PPC_TPREL32
21 #define CRTJMP(pc,sp) __asm__ __volatile__( \
22 "mr 1,%1 ; mtlr %0 ; blr" : : "r"(pc), "r"(sp) : "memory" )
24 #define GETFUNCSYM(fp, sym, got) __asm__ ( \
25 ".hidden " #sym " \n" \
26 " bl 1f \n" \
27 " .long " #sym "-. \n" \
28 "1: mflr %1 \n" \
29 " lwz %0, 0(%1) \n" \
30 " add %0, %0, %1 \n" \
31 : "=r"(*(fp)), "=r"((int){0}) : : "memory", "lr" )