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