summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/scmp_arch_detect.c6
-rw-r--r--tools/scmp_bpf_sim.c4
-rw-r--r--tools/util.c6
3 files changed, 16 insertions, 0 deletions
diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c
index b844a68..b6bd2bb 100644
--- a/tools/scmp_arch_detect.c
+++ b/tools/scmp_arch_detect.c
@@ -123,6 +123,12 @@ int main(int argc, char *argv[])
case SCMP_ARCH_RISCV64:
printf("riscv64\n");
break;
+ case SCMP_ARCH_SHEB:
+ printf("sheb\n");
+ break;
+ case SCMP_ARCH_SH:
+ printf("sh\n");
+ break;
default:
printf("unknown\n");
}
diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c
index 3b581c6..04edfbc 100644
--- a/tools/scmp_bpf_sim.c
+++ b/tools/scmp_bpf_sim.c
@@ -287,6 +287,10 @@ int main(int argc, char *argv[])
arch = AUDIT_ARCH_S390X;
else if (strcmp(optarg, "riscv64") == 0)
arch = AUDIT_ARCH_RISCV64;
+ else if (strcmp(optarg, "sheb") == 0)
+ arch = AUDIT_ARCH_SH;
+ else if (strcmp(optarg, "sh") == 0)
+ arch = AUDIT_ARCH_SHEL;
else
exit_fault(EINVAL);
break;
diff --git a/tools/util.c b/tools/util.c
index 7da22f4..afea6c9 100644
--- a/tools/util.c
+++ b/tools/util.c
@@ -80,6 +80,12 @@
#define ARCH_NATIVE AUDIT_ARCH_S390
#elif __riscv && __riscv_xlen == 64
#define ARCH_NATIVE AUDIT_ARCH_RISCV64
+#elif __sh__
+#ifdef __BIG_ENDIAN__
+#define ARCH_NATIVE AUDIT_ARCH_SH
+#else
+#define ARCH_NATIVE AUDIT_ARCH_SHEL
+#endif
#else
#error the simulator code needs to know about your machine type
#endif