aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-14 21:27:56 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-15 16:02:37 +0200
commit19f9bc13d374058b83b2712f119bb42559b35c0c (patch)
tree2e2744f8f1e3036736e3535ae776ff1409bf5368 /executor/executor.cc
parent52a33fd516102a98d3753bf69417235b655a68dc (diff)
pkg/csource: support archs other than x86_64
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 7ccca2230..87a597253 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -268,9 +268,10 @@ int main(int argc, char** argv)
install_segv_handler();
use_temporary_dir();
-#ifdef __i386__
- // mmap syscall on i386 is translated to old_mmap and has different signature.
+#if defined(__i386__) || defined(__arm__)
+ // mmap syscall on i386/arm is translated to old_mmap and has different signature.
// As a workaround fix it up to mmap2, which has signature that we expect.
+ // pkg/csource has the same hack.
for (size_t i = 0; i < sizeof(syscalls) / sizeof(syscalls[0]); i++) {
if (syscalls[i].sys_nr == __NR_mmap)
syscalls[i].sys_nr = __NR_mmap2;