From: Giacomo Travaglini Date: Fri, 22 Nov 2019 14:12:50 +0000 (+0000) Subject: sim-se: Check Path redirection when mmapping X-Git-Tag: v19.0.0.0~255 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ccc46bbc20dd30f2288faa3d22ed46024e36dc92;p=gem5.git sim-se: Check Path redirection when mmapping Every syscall file access should go through the redirection process Change-Id: I1ba2063b5a254e11f47392bdad0bf0887ba73d3d Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23063 Reviewed-by: Brandon Potter Reviewed-by: Jason Lowe-Power Maintainer: Brandon Potter Tested-by: kokoro --- diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 2d4ef25fd..0eaec4c1f 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -1890,7 +1890,10 @@ mmapImpl(SyscallDesc *desc, int num, ThreadContext *tc, bool is_mmap2) 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()); + auto process = tc->getProcessPtr(); + ObjectFile *lib = createObjectFile( + process->checkPathRedirect( + ffdp->getFileName())); if (lib) { lib->loadAllSymbols(debugSymbolTable,