1 /*	$NetBSD: elf_machdep.h,v 1.4 2010/03/18 08:28:33 cegger Exp $	*/
2 
3 #if !defined __i386__
4 
5 #define	ELF32_MACHDEP_ENDIANNESS	ELFDATA2LSB
6 #define	ELF32_MACHDEP_ID_CASES						\
7 		case EM_386:						\
8 			break;
9 
10 #define	ELF64_MACHDEP_ENDIANNESS	ELFDATA2LSB
11 #define	ELF64_MACHDEP_ID_CASES						\
12 		case EM_X86_64:						\
13 			break;
14 
15 #define	ELF32_MACHDEP_ID	EM_386
16 #define	ELF64_MACHDEP_ID	EM_X86_64
17 
18 #define ARCH_ELFSIZE		64	/* MD native binary size */
19 
20 /* x86-64 relocations */
21 
22 #define R_X86_64_NONE		0
23 #define R_X86_64_64		1
24 #define R_X86_64_PC32		2
25 #define R_X86_64_GOT32		3
26 #define R_X86_64_PLT32		4
27 #define R_X86_64_COPY		5
28 #define R_X86_64_GLOB_DAT	6
29 #define R_X86_64_JUMP_SLOT	7
30 #define R_X86_64_RELATIVE	8
31 #define R_X86_64_GOTPCREL	9
32 #define R_X86_64_32		10
33 #define R_X86_64_32S		11
34 #define R_X86_64_16		12
35 #define R_X86_64_PC16		13
36 #define R_X86_64_8		14
37 #define R_X86_64_PC8		15
38 
39 /* TLS relocations */
40 #define R_X86_64_DTPMOD64	16
41 #define R_X86_64_DTPOFF64	17
42 #define R_X86_64_TPOFF64	18
43 #define R_X86_64_TLSGD		19
44 #define R_X86_64_TLSLD		20
45 #define R_X86_64_DTPOFF32	21
46 #define R_X86_64_GOTTPOFF	22
47 #define R_X86_64_TPOFF32	23
48 
49 #define	R_TYPE(name)	__CONCAT(R_X86_64_,name)
50 
51 #else	/*	!__i386__	*/
52 
53 #include <i386/elf_machdep.h>
54 
55 #endif	/*	!__i386__	*/
56