1 /* $NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $ */ 2 3 #ifndef _BYTE_ORDER 4 #error Define _BYTE_ORDER! 5 #endif 6 7 #if _BYTE_ORDER == _LITTLE_ENDIAN 8 #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB 9 #else 10 #define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB 11 #endif 12 #define ELF32_MACHDEP_ID_CASES \ 13 case EM_SH: \ 14 break; 15 16 #define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */ 17 #define ELF64_MACHDEP_ID_CASES \ 18 /* no 64-bit ELF machine types supported */ 19 20 #define ELF32_MACHDEP_ID EM_SH 21 22 #define ARCH_ELFSIZE 32 /* MD native binary size */ 23 24 /* 25 * SuperH ELF header flags. 26 */ 27 #define EF_SH_MACH_MASK 0x1f 28 29 #define EF_SH_UNKNOWN 0x00 30 #define EF_SH_SH1 0x01 31 #define EF_SH_SH2 0x02 32 #define EF_SH_SH3 0x03 33 #define EF_SH_DSP 0x04 34 #define EF_SH_SH3_DSP 0x05 35 #define EF_SH_SH3E 0x08 36 #define EF_SH_SH4 0x09 37 38 #define EF_SH_HAS_DSP(x) ((x) & EF_SH_DSP) 39 #define EF_SH_HAS_FP(x) ((x) & EF_SH_SH3E) 40 41 42 #define R_SH_NONE 0 43 #define R_SH_DIR32 1 44 #define R_SH_REL32 2 45 #define R_SH_DIR8WPN 3 46 #define R_SH_IND12W 4 47 #define R_SH_DIR8WPL 5 48 #define R_SH_DIR8WPZ 6 49 #define R_SH_DIR8BP 7 50 #define R_SH_DIR8W 8 51 #define R_SH_DIR8L 9 52 #define R_SH_SWITCH16 25 53 #define R_SH_SWITCH32 26 54 #define R_SH_USES 27 55 #define R_SH_COUNT 28 56 #define R_SH_ALIGN 29 57 #define R_SH_CODE 30 58 #define R_SH_DATA 31 59 #define R_SH_LABEL 32 60 #define R_SH_SWITCH8 33 61 #define R_SH_GNU_VTINHERIT 34 62 #define R_SH_GNU_VTENTRY 35 63 #define R_SH_LOOP_START 36 64 #define R_SH_LOOP_END 37 65 #define R_SH_GOT32 160 66 #define R_SH_PLT32 161 67 #define R_SH_COPY 162 68 #define R_SH_GLOB_DAT 163 69 #define R_SH_JMP_SLOT 164 70 #define R_SH_RELATIVE 165 71 #define R_SH_GOTOFF 166 72 #define R_SH_GOTPC 167 73 74 #define R_TYPE(name) __CONCAT(R_SH_,name) 75