summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-01-22 16:14:06 -0500
committerAli Saidi <saidi@eecs.umich.edu>2007-01-22 16:14:06 -0500
commit5c1d631f36bc0d1a99875fb54b92a5df510fa9e3 (patch)
tree1417488f2cbc8509f495cf1ca54c3fd46652c518 /src/sim
parente347b49a4edfe89ed5c5352b6c1b93b69ab00134 (diff)
downloadgem5-5c1d631f36bc0d1a99875fb54b92a5df510fa9e3.tar.xz
check if an executable is dynamic and die if it is
Only implemented for ELf. Someone might want to implement it for ecoff and some point src/base/loader/elf_object.cc: src/base/loader/elf_object.hh: src/base/loader/object_file.cc: src/base/loader/object_file.hh: add a function to check if an executable is dynamic src/sim/process.cc: check if an executable is dynamic and die if it is --HG-- extra : convert_revision : 830b1b50b08a5abaf895ce6251bbc702c986eebf
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/process.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index b43fa7d00..63ff33969 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -440,6 +440,11 @@ LiveProcess::create(const std::string &nm, System *system, int stdin_fd,
fatal("Can't load object file %s", executable);
}
+ if (objFile->isDynamic())
+ fatal("Object file is a dynamic executable however only static "
+ "executables are supported!\n Please recompile your "
+ "executable as a static binary and try again.\n");
+
#if THE_ISA == ALPHA_ISA
if (objFile->getArch() != ObjectFile::Alpha)
fatal("Object file architecture does not match compiled ISA (Alpha).");