xref: /openbsd-src/sys/arch/sh/include/exec.h (revision 50b7afb2c2c0993b0894d4e34bf857cb13ed9c80)
1 /*	$OpenBSD: exec.h,v 1.3 2012/09/11 15:44:18 deraadt 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 #define	_NLIST_DO_ELF
17 
18 /*
19  * SuperH ELF header flags.
20  */
21 #define	EF_SH_MACH_MASK		0x1f
22 
23 #define	EF_SH_UNKNOWN		0x00
24 #define	EF_SH_SH1		0x01
25 #define	EF_SH_SH2		0x02
26 #define	EF_SH_SH3		0x03
27 #define	EF_SH_DSP		0x04
28 #define	EF_SH_SH3_DSP		0x05
29 #define	EF_SH_SH3E		0x08
30 #define	EF_SH_SH4		0x09
31 
32 #define	EF_SH_HAS_DSP(x)	((x) & EF_SH_DSP)
33 #define	EF_SH_HAS_FP(x)		((x) & EF_SH_SH3E)
34