xref: /openbsd-src/sys/arch/sh/include/exec.h (revision 0b7734b3d77bb9b21afec6f4621cae6c805dbd45)
1 /*	$OpenBSD: exec.h,v 1.4 2015/08/29 01:58:39 guenther Exp $	*/
2 /*	$NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $	*/
3 
4 #define __LDPGSZ	4096
5 
6 #define	ARCH_ELFSIZE		32	/* MD native binary size */
7 #define	ELF_TARG_CLASS		ELFCLASS32
8 #ifdef __LITTLE_ENDIAN__
9 #define	ELF_TARG_DATA		ELFDATA2LSB
10 #else
11 #define	ELF_TARG_DATA		ELFDATA2MSB
12 #endif
13 #define	ELF_TARG_MACH		EM_SH
14 
15 #define	_KERN_DO_ELF
16 
17 /*
18  * SuperH ELF header flags.
19  */
20 #define	EF_SH_MACH_MASK		0x1f
21 
22 #define	EF_SH_UNKNOWN		0x00
23 #define	EF_SH_SH1		0x01
24 #define	EF_SH_SH2		0x02
25 #define	EF_SH_SH3		0x03
26 #define	EF_SH_DSP		0x04
27 #define	EF_SH_SH3_DSP		0x05
28 #define	EF_SH_SH3E		0x08
29 #define	EF_SH_SH4		0x09
30 
31 #define	EF_SH_HAS_DSP(x)	((x) & EF_SH_DSP)
32 #define	EF_SH_HAS_FP(x)		((x) & EF_SH_SH3E)
33