syscall_emul: implement arm openat
authorCiro Santilli <ciro.santilli@arm.com>
Wed, 26 Sep 2018 13:43:25 +0000 (14:43 +0100)
committerCiro Santilli <ciro.santilli@arm.com>
Mon, 29 Oct 2018 15:14:30 +0000 (15:14 +0000)
This is especially important because the Ubuntu 18.04 packaged
arm-linux-gnueabihf-gcc uses the system call on the program initialization,
which leads all programs to fail with:

fatal: syscall openat (#322) unimplemented.

Change-Id: I5596162ad19644df7b6d21f2a46acc07030001ae
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/13004
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/linux/process.cc

index c01dece113cfe3febd59cf717aca11b14e1ecbc9..2c64a46cae27d38a357ad3c3bffa9d7cec70a1ab 100644 (file)
@@ -443,7 +443,7 @@ static SyscallDesc syscallDescs32[] = {
     /* 319 */ SyscallDesc("mbind", unimplementedFunc),
     /* 320 */ SyscallDesc("get_mempolicy", unimplementedFunc),
     /* 321 */ SyscallDesc("set_mempolicy", unimplementedFunc),
-    /* 322 */ SyscallDesc("openat", unimplementedFunc),
+    /* 322 */ SyscallDesc("openat", openatFunc<ArmLinux32>),
     /* 323 */ SyscallDesc("mkdirat", unimplementedFunc),
     /* 324 */ SyscallDesc("mknodat", unimplementedFunc),
     /* 325 */ SyscallDesc("fchownat", unimplementedFunc),