diff options
author | Markos Chandras <markos.chandras@imgtec.com> | 2014-04-15 09:36:36 +0100 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-04-15 18:19:39 -0400 |
commit | 9b119de38267358f6e776e826adad0b1be58ed53 (patch) | |
tree | 3e4e62adcffa70f0ab065e0aa994b94dde292ad3 /src/arch.c | |
parent | 87a826b20e9485f6de12404d347b69e98a4ab972 (diff) | |
download | libseccomp-9b119de38267358f6e776e826adad0b1be58ed53.tar.gz |
arch: Add support for MIPS Little Endian
Add support for MIPS 32-bit (O32 ABI) Little Endian
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/arch.c')
-rw-r--r-- | src/arch.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -49,6 +49,8 @@ const struct arch_def *arch_def_native = &arch_def_x86_64; const struct arch_def *arch_def_native = &arch_def_arm; #elif __MIPSEB__ const struct arch_def *arch_def_native = &arch_def_mips; +#elif __MIPSEL__ +const struct arch_def *arch_def_native = &arch_def_mipsel; #else #error the arch code needs to know about your machine type #endif /* machine type guess */ @@ -68,6 +70,7 @@ int arch_valid(uint32_t arch) case SCMP_ARCH_X32: case SCMP_ARCH_ARM: case SCMP_ARCH_MIPS: + case SCMP_ARCH_MIPSEL: return 0; } @@ -94,6 +97,8 @@ const struct arch_def *arch_def_lookup(uint32_t token) return &arch_def_arm; case SCMP_ARCH_MIPS: return &arch_def_mips; + case SCMP_ARCH_MIPSEL: + return &arch_def_mipsel; } return NULL; @@ -119,6 +124,7 @@ int arch_arg_count_max(const struct arch_def *arch) case SCMP_ARCH_ARM: return arm_arg_count_max; case SCMP_ARCH_MIPS: + case SCMP_ARCH_MIPSEL: return mips_arg_count_max; } @@ -188,6 +194,8 @@ int arch_arg_offset(const struct arch_def *arch, unsigned int arg) return arm_arg_offset(arg); case SCMP_ARCH_MIPS: return mips_arg_offset(arg); + case SCMP_ARCH_MIPSEL: + return mipsel_arg_offset(arg); default: return -EDOM; } @@ -215,6 +223,7 @@ int arch_syscall_resolve_name(const struct arch_def *arch, const char *name) case SCMP_ARCH_ARM: return arm_syscall_resolve_name(name); case SCMP_ARCH_MIPS: + case SCMP_ARCH_MIPSEL: return mips_syscall_resolve_name(name); } @@ -243,6 +252,7 @@ const char *arch_syscall_resolve_num(const struct arch_def *arch, int num) case SCMP_ARCH_ARM: return arm_syscall_resolve_num(num); case SCMP_ARCH_MIPS: + case SCMP_ARCH_MIPSEL: return mips_syscall_resolve_num(num); } |