From: Ciro Santilli Date: Thu, 16 Apr 2020 15:58:34 +0000 (+0100) Subject: sim-se: add missing path redirection to mmap createObjectFile X-Git-Tag: v20.0.0.0~188 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=56967e317bd7cc730e98ecaf0ab218fe3160857c;p=gem5.git 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 --- 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());