Brandon Potter has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/12312
Change subject: syscall_emul: do not redirect for /proc/self/exe
......................................................................
syscall_emul: do not redirect for /proc/self/exe
Change-Id: I38286282759963f479efe97db5818a32b3a7dd73
---
M src/sim/syscall_emul.cc
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 6d687ff..5a80c4e 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -408,9 +408,6 @@
if (!virt_mem.tryReadString(path, p->getSyscallArg(tc, index)))
return -EFAULT;
- // Adjust path for cwd and redirection
- path = p->checkPathRedirect(path);
-
Addr buf_ptr = p->getSyscallArg(tc, index);
size_t bufsiz = p->getSyscallArg(tc, index);
@@ -418,6 +415,8 @@
int result = -1;
if (path != "/proc/self/exe") {
+ // Adjust path for cwd and redirection
+ path = p->checkPathRedirect(path);
result = readlink(path.c_str(), (char *)buf.bufferPtr(), bufsiz);
} else {
// Emulate readlink() called on '/proc/self/exe' should return the
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12312
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I38286282759963f479efe97db5818a32b3a7dd73
Gerrit-Change-Number: 12312
Gerrit-PatchSet: 1
Gerrit-Owner: Brandon Potter <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev