• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #if __mips_isa_rev >= 6
2 #define ISA_SUFFIX "r6"
3 #else
4 #define ISA_SUFFIX ""
5 #endif
6 
7 #if __BYTE_ORDER == __LITTLE_ENDIAN
8 #define ENDIAN_SUFFIX "el"
9 #else
10 #define ENDIAN_SUFFIX ""
11 #endif
12 
13 #ifdef __mips_soft_float
14 #define FP_SUFFIX "-sf"
15 #else
16 #define FP_SUFFIX ""
17 #endif
18 
19 #define LDSO_ARCH "mips" ISA_SUFFIX ENDIAN_SUFFIX FP_SUFFIX
20 
21 #define TPOFF_K (-0x7000)
22 
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
29 
30 #define NEED_MIPS_GOT_RELOCS 1
31 #define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
32 #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
33 
34 #define CRTJMP(pc,sp) __asm__ __volatile__( \
35 	"move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
36 
37 #define GETFUNCSYM(fp, sym, got) __asm__ ( \
38 	".hidden " #sym "\n" \
39 	".set push \n" \
40 	".set noreorder \n" \
41 	"	bal 1f \n" \
42 	"	 nop \n" \
43 	"	.gpword . \n" \
44 	"	.gpword " #sym " \n" \
45 	"1:	lw %0, ($ra) \n" \
46 	"	subu %0, $ra, %0 \n" \
47 	"	lw $ra, 4($ra) \n" \
48 	"	addu %0, %0, $ra \n" \
49 	".set pop \n" \
50 	: "=r"(*(fp)) : : "memory", "ra" )
51