summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 6c3b172c2..91ddb2567 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1886,17 +1886,14 @@ mmapImpl(SyscallDesc *desc, int num, ThreadContext *tc, bool is_mmap2)
// executing inside the loader by checking the program counter value.
// XXX: with multiprogrammed workloads or multi-node configurations,
// this will not work since there is a single global symbol table.
- ObjectFile *interpreter = p->getInterpreter();
- if (interpreter) {
- if (interpreter->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());
-
- if (lib) {
- lib->loadAllSymbols(debugSymbolTable,
- lib->minSegmentAddr(), start);
- }
+ 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());
+
+ if (lib) {
+ lib->loadAllSymbols(debugSymbolTable,
+ lib->buildImage().minAddr(), start);
}
}