| 1 | /*	$NetBSD: elf_machdep.h,v 1.13 2017/11/06 03:47:46 christos Exp $	*/ | 
| 2 |  | 
| 3 | #define	ELF32_MACHDEP_ENDIANNESS	ELFDATA2LSB | 
| 4 | #define	ELF32_MACHDEP_ID_CASES						\ | 
| 5 | 		case EM_386:						\ | 
| 6 | 		case EM_486:						\ | 
| 7 | 			break; | 
| 8 |  | 
| 9 | #define	ELF64_MACHDEP_ENDIANNESS	XXX	/* break compilation */ | 
| 10 | #define	ELF64_MACHDEP_ID_CASES						\ | 
| 11 | 		/* no 64-bit ELF machine types supported */ | 
| 12 |  | 
| 13 | #define	ELF32_MACHDEP_ID		EM_386 | 
| 14 |  | 
| 15 | #define	KERN_ELFSIZE		32 | 
| 16 | #define ARCH_ELFSIZE		32	/* MD native binary size */ | 
| 17 |  | 
| 18 | /* i386 relocations */ | 
| 19 | #define	R_386_NONE	0 | 
| 20 | #define	R_386_32	1 | 
| 21 | #define	R_386_PC32	2 | 
| 22 | #define	R_386_GOT32	3 | 
| 23 | #define	R_386_PLT32	4 | 
| 24 | #define	R_386_COPY	5 | 
| 25 | #define	R_386_GLOB_DAT	6 | 
| 26 | #define	R_386_JMP_SLOT	7 | 
| 27 | #define	R_386_RELATIVE	8 | 
| 28 | #define	R_386_GOTOFF	9 | 
| 29 | #define	R_386_GOTPC	10 | 
| 30 | #define	R_386_32PLT	11 | 
| 31 |  | 
| 32 | /* TLS relocations */ | 
| 33 | #define	R_386_TLS_TPOFF	14 | 
| 34 | #define	R_386_TLS_IE	15 | 
| 35 | #define	R_386_TLS_GOTIE	16 | 
| 36 | #define	R_386_TLS_LE	17 | 
| 37 | #define	R_386_TLS_GD	18 | 
| 38 | #define	R_386_TLS_LDM	19 | 
| 39 |  | 
| 40 | /* The following relocations are GNU extensions. */ | 
| 41 | #define	R_386_16	20 | 
| 42 | #define	R_386_PC16	21 | 
| 43 | #define	R_386_8		22 | 
| 44 | #define	R_386_PC8	23 | 
| 45 |  | 
| 46 | /* More TLS relocations */ | 
| 47 | #define	R_386_TLS_GD_32		24 | 
| 48 | #define	R_386_TLS_GD_PUSH	25 | 
| 49 | #define	R_386_TLS_GD_CALL	26 | 
| 50 | #define	R_386_TLS_GD_POP	27 | 
| 51 | #define	R_386_TLS_LDM_32	28 | 
| 52 | #define	R_386_TLS_LDM_PUSH	29 | 
| 53 | #define	R_386_TLS_LDM_CALL	30 | 
| 54 | #define	R_386_TLS_LDM_POP	31 | 
| 55 | #define	R_386_TLS_LDO_32	32 | 
| 56 | #define	R_386_TLS_IE_32		33 | 
| 57 | #define	R_386_TLS_LE_32		34 | 
| 58 | #define	R_386_TLS_DTPMOD32	35 | 
| 59 | #define	R_386_TLS_DTPOFF32	36 | 
| 60 | #define	R_386_TLS_TPOFF32	37 | 
| 61 |  | 
| 62 | #define R_386_SIZE32		38 | 
| 63 |  | 
| 64 | /* More TLS relocations */ | 
| 65 | #define	R_386_TLS_GOTDESC	39 | 
| 66 | #define	R_386_TLS_DESC_CALL	40 | 
| 67 | #define	R_386_TLS_DESC		41 | 
| 68 |  | 
| 69 | #define R_386_IRELATIVE		42 | 
| 70 | #define R_386_GOT32X		43 | 
| 71 |  | 
| 72 | #define	R_TYPE(name)	__CONCAT(R_386_,name) | 
| 73 |  |