sim-se: add missing path redirection to mmap createObjectFile
authorCiro Santilli <ciro.santilli@arm.com>
Thu, 16 Apr 2020 15:58:34 +0000 (16:58 +0100)
committerCiro Santilli <ciro.santilli@arm.com>
Fri, 17 Apr 2020 14:36:39 +0000 (14:36 +0000)
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 <matthew.poremba@amd.com>
Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/sim/syscall_emul.hh

index e1a23a087eb2c32aa6f0909bf0df1df71e90b81a..11561a6f7fc0ec3dc2bd4c17816dcbb6cd62f480 100644 (file)
@@ -1713,7 +1713,8 @@ mmapFunc(SyscallDesc *desc, ThreadContext *tc,
         if (p->interpImage.contains(tc->pcState().instAddr())) {
             std::shared_ptr<FDEntry> fdep = (*p->fds)[tgt_fd];
             auto ffdp = std::dynamic_pointer_cast<FileFDEntry>(fdep);
-            ObjectFile *lib = createObjectFile(ffdp->getFileName());
+            ObjectFile *lib = createObjectFile(p->checkPathRedirect(
+                    ffdp->getFileName()));
             DPRINTF_SYSCALL(Verbose, "Loading symbols from %s\n",
                 ffdp->getFileName());