elf_machdep.h revision 1.8
11.8Such/* $NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $ */ 21.1Sitojun 31.4Smarcus#ifndef _BYTE_ORDER 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.6Sthorpej#define R_SH_GOT32 160 661.6Sthorpej#define R_SH_PLT32 161 671.6Sthorpej#define R_SH_COPY 162 681.6Sthorpej#define R_SH_GLOB_DAT 163 691.6Sthorpej#define R_SH_JMP_SLOT 164 701.6Sthorpej#define R_SH_RELATIVE 165 711.6Sthorpej#define R_SH_GOTOFF 166 721.6Sthorpej#define R_SH_GOTPC 167 731.6Sthorpej 741.6Sthorpej#define R_TYPE(name) __CONCAT(R_SH_,name) 75