Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: fusl/arch/mips/reloc.h

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/arch/mips/pthread_arch.h ('k') | fusl/arch/mips/syscall_arch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #include <endian.h>
2
3 #if __BYTE_ORDER == __LITTLE_ENDIAN
4 #define ENDIAN_SUFFIX "el"
5 #else
6 #define ENDIAN_SUFFIX ""
7 #endif
8
9 #ifdef __mips_soft_float
10 #define FP_SUFFIX "-sf"
11 #else
12 #define FP_SUFFIX ""
13 #endif
14
15 #define LDSO_ARCH "mips" ENDIAN_SUFFIX FP_SUFFIX
16
17 #define TPOFF_K (-0x7000)
18
19 #define REL_SYM_OR_REL R_MIPS_REL32
20 #define REL_PLT R_MIPS_JUMP_SLOT
21 #define REL_COPY R_MIPS_COPY
22 #define REL_DTPMOD R_MIPS_TLS_DTPMOD32
23 #define REL_DTPOFF R_MIPS_TLS_DTPREL32
24 #define REL_TPOFF R_MIPS_TLS_TPREL32
25
26 #define NEED_MIPS_GOT_RELOCS 1
27 #define DYNAMIC_IS_RO 1
28 #define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
29
30 #define CRTJMP(pc,sp) __asm__ __volatile__( \
31 "move $sp,%1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
32
33 #define GETFUNCSYM(fp, sym, got) __asm__ ( \
34 ".hidden " #sym "\n" \
35 ".set push \n" \
36 ".set noreorder \n" \
37 " bal 1f \n" \
38 " nop \n" \
39 " .gpword . \n" \
40 " .gpword " #sym " \n" \
41 "1: lw %0, ($ra) \n" \
42 " subu %0, $ra, %0 \n" \
43 " lw $ra, 4($ra) \n" \
44 " addu %0, %0, $ra \n" \
45 ".set pop \n" \
46 : "=r"(*(fp)) : : "memory", "ra" )
OLDNEW
« no previous file with comments | « fusl/arch/mips/pthread_arch.h ('k') | fusl/arch/mips/syscall_arch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698