blob: e7e4b38f125bf7eef53b421924f72bcfe309a340 [file] [log] [blame]
Rich Felker5c27c442014-02-27 22:20:44 -05001#if __BYTE_ORDER == __BIG_ENDIAN
2#define ENDIAN_SUFFIX "eb"
Bobby Bingham3a3c8132013-10-05 05:13:18 -05003#else
4#define ENDIAN_SUFFIX ""
5#endif
6
7#define LDSO_ARCH "sh" ENDIAN_SUFFIX
8
Rich Felkeradf94c12014-06-18 02:44:02 -04009#define TPOFF_K 8
Bobby Bingham3a3c8132013-10-05 05:13:18 -050010
Rich Felkerf3ddd172015-04-13 02:56:26 -040011#define REL_SYMBOLIC R_SH_DIR32
12#define REL_OFFSET R_SH_REL32
13#define REL_GOT R_SH_GLOB_DAT
14#define REL_PLT R_SH_JMP_SLOT
15#define REL_RELATIVE R_SH_RELATIVE
16#define REL_COPY R_SH_COPY
17#define REL_DTPMOD R_SH_TLS_DTPMOD32
18#define REL_DTPOFF R_SH_TLS_DTPOFF32
19#define REL_TPOFF R_SH_TLS_TPOFF32
20
21#define CRTJMP(pc,sp) __asm__ __volatile__( \
22 "jmp @%0 ; mov %1,r15" : : "r"(pc), "r"(sp) : "memory" )