summaryrefslogtreecommitdiffstats
path: root/libc/arch-sh/include/machine/exec.h
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-11-09 08:04:48 -0800
committerJean-Baptiste Queru <jbq@google.com>2009-11-09 08:04:48 -0800
commit83362689f5b1f6393d376d242fe29541b63ead2d (patch)
tree729a4fc7fd44630738510d1477e968cb7ec0fa3f /libc/arch-sh/include/machine/exec.h
parentecac54db21256952b4b4a9c6f17604ec31743183 (diff)
parentad13c57298e57d33c130fb03a2c6494da573408c (diff)
downloadbionic-83362689f5b1f6393d376d242fe29541b63ead2d.zip
bionic-83362689f5b1f6393d376d242fe29541b63ead2d.tar.gz
bionic-83362689f5b1f6393d376d242fe29541b63ead2d.tar.bz2
merge from open-source master
Diffstat (limited to 'libc/arch-sh/include/machine/exec.h')
-rw-r--r--libc/arch-sh/include/machine/exec.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libc/arch-sh/include/machine/exec.h b/libc/arch-sh/include/machine/exec.h
new file mode 100644
index 0000000..48a9680
--- /dev/null
+++ b/libc/arch-sh/include/machine/exec.h
@@ -0,0 +1,35 @@
+/* $OpenBSD: exec.h,v 1.2 2006/11/10 20:34:06 drahn Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.8 2002/04/28 17:10:34 uch Exp $ */
+
+#define __LDPGSZ 4096
+
+#define NATIVE_EXEC_ELF
+
+#define ARCH_ELFSIZE 32 /* MD native binary size */
+#define ELF_TARG_CLASS ELFCLASS32
+#ifdef __LITTLE_ENDIAN__
+#define ELF_TARG_DATA ELFDATA2LSB
+#else
+#define ELF_TARG_DATA ELFDATA2MSB
+#endif
+#define ELF_TARG_MACH EM_SH
+
+#define _KERN_DO_ELF
+#define _NLIST_DO_ELF
+
+/*
+ * SuperH ELF header flags.
+ */
+#define EF_SH_MACH_MASK 0x1f
+
+#define EF_SH_UNKNOWN 0x00
+#define EF_SH_SH1 0x01
+#define EF_SH_SH2 0x02
+#define EF_SH_SH3 0x03
+#define EF_SH_DSP 0x04
+#define EF_SH_SH3_DSP 0x05
+#define EF_SH_SH3E 0x08
+#define EF_SH_SH4 0x09
+
+#define EF_SH_HAS_DSP(x) ((x) & EF_SH_DSP)
+#define EF_SH_HAS_FP(x) ((x) & EF_SH_SH3E)