elf_machdep.h revision 1.10
11.10Sskrll/* $NetBSD: elf_machdep.h,v 1.10 2009/05/30 05:56:53 skrll Exp $ */ 21.1Sitojun 31.9Sriz#if !defined(_BYTE_ORDER) && !defined(HAVE_NBTOOL_CONFIG_H) 41.4Smarcus#error Define _BYTE_ORDER! 51.4Smarcus#endif 61.4Smarcus 71.4Smarcus#if _BYTE_ORDER == _LITTLE_ENDIAN 81.4Smarcus#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB 91.4Smarcus#else 101.2Skleink#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB 111.4Smarcus#endif 121.1Sitojun#define ELF32_MACHDEP_ID_CASES \ 131.2Skleink case EM_SH: \ 141.1Sitojun break; 151.1Sitojun 161.1Sitojun#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */ 171.1Sitojun#define ELF64_MACHDEP_ID_CASES \ 181.1Sitojun /* no 64-bit ELF machine types supported */ 191.5Sthorpej 201.5Sthorpej#define ELF32_MACHDEP_ID EM_SH 211.3Sminoura 221.8Such#define ARCH_ELFSIZE 32 /* MD native binary size */ 231.7Sthorpej 241.7Sthorpej/* 251.7Sthorpej * SuperH ELF header flags. 261.7Sthorpej */ 271.7Sthorpej#define EF_SH_MACH_MASK 0x1f 281.7Sthorpej 291.7Sthorpej#define EF_SH_UNKNOWN 0x00 301.7Sthorpej#define EF_SH_SH1 0x01 311.7Sthorpej#define EF_SH_SH2 0x02 321.7Sthorpej#define EF_SH_SH3 0x03 331.7Sthorpej#define EF_SH_DSP 0x04 341.7Sthorpej#define EF_SH_SH3_DSP 0x05 351.7Sthorpej#define EF_SH_SH3E 0x08 361.7Sthorpej#define EF_SH_SH4 0x09 371.7Sthorpej 381.7Sthorpej#define EF_SH_HAS_DSP(x) ((x) & EF_SH_DSP) 391.7Sthorpej#define EF_SH_HAS_FP(x) ((x) & EF_SH_SH3E) 401.7Sthorpej 411.6Sthorpej 421.6Sthorpej#define R_SH_NONE 0 431.6Sthorpej#define R_SH_DIR32 1 441.6Sthorpej#define R_SH_REL32 2 451.6Sthorpej#define R_SH_DIR8WPN 3 461.6Sthorpej#define R_SH_IND12W 4 471.6Sthorpej#define R_SH_DIR8WPL 5 481.6Sthorpej#define R_SH_DIR8WPZ 6 491.6Sthorpej#define R_SH_DIR8BP 7 501.6Sthorpej#define R_SH_DIR8W 8 511.6Sthorpej#define R_SH_DIR8L 9 521.6Sthorpej#define R_SH_SWITCH16 25 531.6Sthorpej#define R_SH_SWITCH32 26 541.6Sthorpej#define R_SH_USES 27 551.6Sthorpej#define R_SH_COUNT 28 561.6Sthorpej#define R_SH_ALIGN 29 571.6Sthorpej#define R_SH_CODE 30 581.6Sthorpej#define R_SH_DATA 31 591.6Sthorpej#define R_SH_LABEL 32 601.6Sthorpej#define R_SH_SWITCH8 33 611.6Sthorpej#define R_SH_GNU_VTINHERIT 34 621.6Sthorpej#define R_SH_GNU_VTENTRY 35 631.6Sthorpej#define R_SH_LOOP_START 36 641.6Sthorpej#define R_SH_LOOP_END 37 651.10Sskrll 661.10Sskrll/* TLS relocations */ 671.10Sskrll#define R_SH_TLS_GD_32 144 681.10Sskrll#define R_SH_TLS_LD_32 145 691.10Sskrll#define R_SH_TLS_LDO_32 146 701.10Sskrll#define R_SH_TLS_IE_32 147 711.10Sskrll#define R_SH_TLS_LE_32 148 721.10Sskrll#define R_SH_TLS_DTPMOD32 149 731.10Sskrll#define R_SH_TLS_DTPOFF32 150 741.10Sskrll#define R_SH_TLS_TPOFF32 151 751.10Sskrll 761.6Sthorpej#define R_SH_GOT32 160 771.6Sthorpej#define R_SH_PLT32 161 781.6Sthorpej#define R_SH_COPY 162 791.6Sthorpej#define R_SH_GLOB_DAT 163 801.6Sthorpej#define R_SH_JMP_SLOT 164 811.6Sthorpej#define R_SH_RELATIVE 165 821.6Sthorpej#define R_SH_GOTOFF 166 831.6Sthorpej#define R_SH_GOTPC 167 841.6Sthorpej 851.6Sthorpej#define R_TYPE(name) __CONCAT(R_SH_,name) 86