summaryrefslogtreecommitdiff
path: root/utils/include
diff options
context:
space:
mode:
authorRichard Miller <millerresearch@gmail.com>2020-11-09 18:11:51 +0000
committerCharles Forsyth <charles.forsyth@gmail.com>2020-11-09 18:11:51 +0000
commitec7a4b742467a19160dfa5322e3e0880e4abed48 (patch)
tree523d2f81946b1e0abe4afddf1d2fce7e1525b7d7 /utils/include
parented97654bd7a11d480b44505c8300d06b42e5fefe (diff)
parent6e84dc968bc4eaf047fbefcba2f670940718dda8 (diff)
Merged in millerresearch/inferno-riscv/utils-riscv (pull request #8)
Add toolchain and libmach support for riscv and riscv64 Approved-by: Charles Forsyth <charles.forsyth@gmail.com>
Diffstat (limited to 'utils/include')
-rw-r--r--utils/include/a.out.h4
-rw-r--r--utils/include/mach.h12
2 files changed, 15 insertions, 1 deletions
diff --git a/utils/include/a.out.h b/utils/include/a.out.h
index 86c7d061..915cdaae 100644
--- a/utils/include/a.out.h
+++ b/utils/include/a.out.h
@@ -31,9 +31,11 @@ struct Exec
#define S_MAGIC _MAGIC(HDR_MAGIC, 26) /* amd64 */
#define T_MAGIC _MAGIC(HDR_MAGIC, 27) /* powerpc64 */
#define R_MAGIC _MAGIC(HDR_MAGIC, 28) /* arm64 */
+#define Z_MAGIC _MAGIC(0, 29) /* riscv */
+#define Y_MAGIC _MAGIC(0, 30) /* riscv64 */
#define MIN_MAGIC 8
-#define MAX_MAGIC 28 /* <= 90 */
+#define MAX_MAGIC 30 /* <= 90 */
#define DYN_MAGIC 0x80000000 /* dlm */
diff --git a/utils/include/mach.h b/utils/include/mach.h
index 1c8d7a83..25e89279 100644
--- a/utils/include/mach.h
+++ b/utils/include/mach.h
@@ -16,6 +16,8 @@
* powerpc,
* powerpc64
* arm64
+ * riscv
+ * riscv64
*/
enum
{
@@ -36,6 +38,8 @@ enum
MAMD64,
MPOWER64,
MARM64,
+ MRISCV,
+ MRISCV64,
/* types of executables */
FNONE = 0, /* unidentified */
FMIPS, /* v.out */
@@ -67,6 +71,10 @@ enum
FPOWER64B, /* 9.out bootable */
FARM64, /* arm64 */
FARM64B, /* arm64 bootable */
+ FRISCV, /* riscv */
+ FRISCVB, /* riscv bootable */
+ FRISCV64, /* riscv64 */
+ FRISCV64B, /* riscv64 bootable */
ANONE = 0, /* dissembler types */
AMIPS,
@@ -85,6 +93,8 @@ enum
AAMD64,
APOWER64,
AARM64,
+ ARISCV,
+ ARISCV64,
/* object file types */
Obj68020 = 0, /* .2 */
ObjSparc, /* .k */
@@ -103,6 +113,8 @@ enum
ObjSpim, /* .0 */
ObjPower64, /* .9 */
ObjArm64, /* .4? */
+ ObjRiscv, /* .i */
+ ObjRiscv64, /* .j */
Maxobjtype,
CNONE = 0, /* symbol table classes */