diff options
author | Paul Moore <pmoore@redhat.com> | 2014-09-26 12:50:40 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-02-06 17:50:18 -0500 |
commit | 2176cdc71cc5dcc066879eeff5744d007bbce932 (patch) | |
tree | f8ea6cfd85e0d839203d2b84b31cae9f2b45b0ca /tools | |
parent | daed219e5df2e85f994b89a55f7271849367a7f1 (diff) | |
download | libseccomp-2176cdc71cc5dcc066879eeff5744d007bbce932.tar.gz |
tools: add ppc64 support
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/scmp_arch_detect.c | 6 | ||||
-rw-r--r-- | tools/scmp_bpf_disasm.c | 4 | ||||
-rw-r--r-- | tools/scmp_bpf_sim.c | 4 | ||||
-rw-r--r-- | tools/util.c | 6 |
4 files changed, 20 insertions, 0 deletions
diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c index 5a87252..d23d2ec 100644 --- a/tools/scmp_arch_detect.c +++ b/tools/scmp_arch_detect.c @@ -99,6 +99,12 @@ int main(int argc, char *argv[]) case SCMP_ARCH_MIPSEL64N32: printf("mipsel64n32\n"); break; + case SCMP_ARCH_PPC64: + printf("ppc64\n"); + break; + case SCMP_ARCH_PPC64LE: + printf("ppc64le\n"); + break; default: printf("unknown\n"); } diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c index 349b8a8..9199e17 100644 --- a/tools/scmp_bpf_disasm.c +++ b/tools/scmp_bpf_disasm.c @@ -334,6 +334,10 @@ int main(int argc, char *argv[]) arch = AUDIT_ARCH_MIPS64N32; else if (strcmp(optarg, "mipsel64n32") == 0) arch = AUDIT_ARCH_MIPSEL64N32; + else if (strcmp(optarg, "ppc64") == 0) + arch = AUDIT_ARCH_PPC64; + else if (strcmp(optarg, "ppc64le") == 0) + arch = AUDIT_ARCH_PPC64LE; else exit_usage(argv[0]); break; diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c index bb3a2e7..d3e439f 100644 --- a/tools/scmp_bpf_sim.c +++ b/tools/scmp_bpf_sim.c @@ -249,6 +249,10 @@ int main(int argc, char *argv[]) arch = AUDIT_ARCH_MIPS64N32; else if (strcmp(optarg, "mipsel64n32") == 0) arch = AUDIT_ARCH_MIPSEL64N32; + else if (strcmp(optarg, "ppc64") == 0) + arch = AUDIT_ARCH_PPC64; + else if (strcmp(optarg, "ppc64le") == 0) + arch = AUDIT_ARCH_PPC64LE; else exit_fault(EINVAL); break; diff --git a/tools/util.c b/tools/util.c index 9b58bbb..f998009 100644 --- a/tools/util.c +++ b/tools/util.c @@ -62,6 +62,12 @@ #elif __MIPSEL__ #define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32 #endif /* _MIPS_SIM_NABI32 */ +#elif __PPC64__ +#ifdef __BIG_ENDIAN__ +#define ARCH_NATIVE AUDIT_ARCH_PPC64 +#else +#define ARCH_NATIVE AUDIT_ARCH_PPC64LE +#endif #else #error the simulator code needs to know about your machine type #endif |