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

Side by Side Diff: fusl/arch/sh/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/sh/pthread_arch.h ('k') | fusl/arch/sh/src/__fpscr_values.c » ('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 == __BIG_ENDIAN
4 #define ENDIAN_SUFFIX "eb"
5 #else
6 #define ENDIAN_SUFFIX ""
7 #endif
8
9 #if __SH_FPU_ANY__ || __SH4__
10 #define FP_SUFFIX ""
11 #else
12 #define FP_SUFFIX "-nofpu"
13 #endif
14
15 #if __SH_FDPIC__
16 #define ABI_SUFFIX "-fdpic"
17 #else
18 #define ABI_SUFFIX ""
19 #endif
20
21 #define LDSO_ARCH "sh" ENDIAN_SUFFIX FP_SUFFIX ABI_SUFFIX
22
23 #define TPOFF_K 8
24
25 #define REL_SYMBOLIC R_SH_DIR32
26 #define REL_OFFSET R_SH_REL32
27 #define REL_GOT R_SH_GLOB_DAT
28 #define REL_PLT R_SH_JMP_SLOT
29 #define REL_RELATIVE R_SH_RELATIVE
30 #define REL_COPY R_SH_COPY
31 #define REL_DTPMOD R_SH_TLS_DTPMOD32
32 #define REL_DTPOFF R_SH_TLS_DTPOFF32
33 #define REL_TPOFF R_SH_TLS_TPOFF32
34
35 #define DL_NOMMU_SUPPORT 1
36
37 #if __SH_FDPIC__
38 #define REL_FUNCDESC R_SH_FUNCDESC
39 #define REL_FUNCDESC_VAL R_SH_FUNCDESC_VALUE
40 #undef REL_RELATIVE
41 #define DL_FDPIC 1
42 #define FDPIC_CONSTDISP_FLAG 0x100
43 #define CRTJMP(pc,sp) do { \
44 register size_t r8 __asm__("r8") = ((size_t *)(sp))[-2]; \
45 __asm__ __volatile__( "jmp @%0 ; mov %1,r15" \
46 : : "r"(pc), "r"(sp), "r"(r8) : "memory" ); } while(0)
47 #define GETFUNCSYM(fp, sym, got) __asm__ ( \
48 "mov.l 1f,%0 ; add %1,%0 ; bra 2f ; nop ; .align 2 \n" \
49 "1: .long " #sym "@GOTOFFFUNCDESC \n2:" \
50 : "=&r"(*fp) : "r"(got) : "memory" )
51 #else
52 #define CRTJMP(pc,sp) __asm__ __volatile__( \
53 "jmp @%0 ; mov %1,r15" : : "r"(pc), "r"(sp) : "memory" )
54 #endif
OLDNEW
« no previous file with comments | « fusl/arch/sh/pthread_arch.h ('k') | fusl/arch/sh/src/__fpscr_values.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698