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 <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23063
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2019-11-22 14:12:50 +00:00
parent 5441dd19ed
commit ccc46bbc20

View File

@@ -1890,7 +1890,10 @@ mmapImpl(SyscallDesc *desc, int num, ThreadContext *tc, bool is_mmap2)
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());
auto process = tc->getProcessPtr();
ObjectFile *lib = createObjectFile(
process->checkPathRedirect(
ffdp->getFileName()));
if (lib) {
lib->loadAllSymbols(debugSymbolTable,