Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / sh3 / include / elf_machdep.h
blob0d9b295a65e2530e4c169d66bae6b2dd35f0eb19
1 /* $NetBSD: elf_machdep.h,v 1.9 2006/11/25 07:32:53 riz Exp $ */
3 #if !defined(_BYTE_ORDER) && !defined(HAVE_NBTOOL_CONFIG_H)
4 #error Define _BYTE_ORDER!
5 #endif
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;
16 #define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
17 #define ELF64_MACHDEP_ID_CASES \
18 /* no 64-bit ELF machine types supported */
20 #define ELF32_MACHDEP_ID EM_SH
22 #define ARCH_ELFSIZE 32 /* MD native binary size */
25 * SuperH ELF header flags.
27 #define EF_SH_MACH_MASK 0x1f
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
38 #define EF_SH_HAS_DSP(x) ((x) & EF_SH_DSP)
39 #define EF_SH_HAS_FP(x) ((x) & EF_SH_SH3E)
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
66 /* TLS relocations */
67 #define R_SH_TLS_GD_32 144
68 #define R_SH_TLS_LD_32 145
69 #define R_SH_TLS_LDO_32 146
70 #define R_SH_TLS_IE_32 147
71 #define R_SH_TLS_LE_32 148
72 #define R_SH_TLS_DTPMOD32 149
73 #define R_SH_TLS_DTPOFF32 150
74 #define R_SH_TLS_TPOFF32 151
76 #define R_SH_GOT32 160
77 #define R_SH_PLT32 161
78 #define R_SH_COPY 162
79 #define R_SH_GLOB_DAT 163
80 #define R_SH_JMP_SLOT 164
81 #define R_SH_RELATIVE 165
82 #define R_SH_GOTOFF 166
83 #define R_SH_GOTPC 167
85 #define R_TYPE(name) __CONCAT(R_SH_,name)