summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/byteswap.hh2
-rw-r--r--src/sim/process.cc5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/sim/byteswap.hh b/src/sim/byteswap.hh
index f8e5215cf..da427f1e1 100644
--- a/src/sim/byteswap.hh
+++ b/src/sim/byteswap.hh
@@ -130,7 +130,7 @@ template <typename T> static inline T letobe(T value) {return swap_byte(value);}
//For conversions not involving the guest system, we can define the functions
//conditionally based on the BYTE_ORDER macro and outside of the namespaces
-#if defined(_BIG_ENDIAN) || BYTE_ORDER == BIG_ENDIAN
+#if defined(_BIG_ENDIAN) || !defined(_LITTLE_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
template <typename T> static inline T htole(T value) {return swap_byte(value);}
template <typename T> static inline T letoh(T value) {return swap_byte(value);}
template <typename T> static inline T htobe(T value) {return value;}
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).");