From 56967e317bd7cc730e98ecaf0ab218fe3160857c Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 16 Apr 2020 16:58:34 +0100 Subject: [PATCH] sim-se: add missing path redirection to mmap createObjectFile The redirection call was mistakenly removed at: Ide158e69cdff19bc81157e3e9826bcabc2a51140 and that breaks running cross compiled dynamically linked executables in SE. JIRA: https://gem5.atlassian.net/browse/GEM5-430 Change-Id: I33419c78fbf183cda0bba98f7035a2b25ebc6fa3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27887 Reviewed-by: Matthew Poremba Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Tested-by: kokoro Maintainer: Gabe Black --- src/sim/syscall_emul.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index e1a23a087..11561a6f7 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1713,7 +1713,8 @@ mmapFunc(SyscallDesc *desc, ThreadContext *tc, if (p->interpImage.contains(tc->pcState().instAddr())) { std::shared_ptr fdep = (*p->fds)[tgt_fd]; auto ffdp = std::dynamic_pointer_cast(fdep); - ObjectFile *lib = createObjectFile(ffdp->getFileName()); + ObjectFile *lib = createObjectFile(p->checkPathRedirect( + ffdp->getFileName())); DPRINTF_SYSCALL(Verbose, "Loading symbols from %s\n", ffdp->getFileName()); -- 2.30.2