getusershell: skip blank lines and comments
[musl.git] / arch / mips / reloc.h
blobf4023b16813452a6737744a425d2c2e83f9134bf
1 #if __mips_isa_rev >= 6
2 #define ISA_SUFFIX "r6"
3 #else
4 #define ISA_SUFFIX ""
5 #endif
7 #if __BYTE_ORDER == __LITTLE_ENDIAN
8 #define ENDIAN_SUFFIX "el"
9 #else
10 #define ENDIAN_SUFFIX ""
11 #endif
13 #ifdef __mips_soft_float
14 #define FP_SUFFIX "-sf"
15 #else
16 #define FP_SUFFIX ""
17 #endif
19 #define LDSO_ARCH "mips" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX
21 #define TPOFF_K (-0x7000)
23 #define REL_SYM_OR_REL R_MIPS_REL32
24 #define REL_PLT R_MIPS_JUMP_SLOT
25 #define REL_COPY R_MIPS_COPY
26 #define REL_DTPMOD R_MIPS_TLS_DTPMOD32
27 #define REL_DTPOFF R_MIPS_TLS_DTPREL32
28 #define REL_TPOFF R_MIPS_TLS_TPREL32
30 #define NEED_MIPS_GOT_RELOCS 1
31 #define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
32 #define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL
33 #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
35 #define CRTJMP(pc,sp) __asm__ __volatile__( \
36 "move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
38 #define GETFUNCSYM(fp, sym, got) __asm__ ( \
39 ".hidden " #sym "\n" \
40 ".set push \n" \
41 ".set noreorder \n" \
42 " bal 1f \n" \
43 " nop \n" \
44 " .gpword . \n" \
45 " .gpword " #sym " \n" \
46 "1: lw %0, ($ra) \n" \
47 " subu %0, $ra, %0 \n" \
48 " lw $ra, 4($ra) \n" \
49 " addu %0, %0, $ra \n" \
50 ".set pop \n" \
51 : "=r"(*(fp)) : : "memory", "ra" )