From 5c1d631f36bc0d1a99875fb54b92a5df510fa9e3 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 22 Jan 2007 16:14:06 -0500 Subject: 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 --- src/sim/process.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sim') 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)."); -- cgit v1.2.3 From 60eaa03d72a13863596e64343d7407af1cab51c5 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 22 Jan 2007 21:57:01 -0500 Subject: fix compiling on x86/Solaris --HG-- extra : convert_revision : f7d21fc277dd7172c244d83fb012883dc8b67895 --- src/sim/byteswap.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sim') diff --git a/src/sim/byteswap.hh b/src/sim/byteswap.hh index 7b1ae701e..4ac1ee711 100644 --- a/src/sim/byteswap.hh +++ b/src/sim/byteswap.hh @@ -130,7 +130,7 @@ template 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 static inline T htole(T value) {return swap_byte(value);} template static inline T letoh(T value) {return swap_byte(value);} template static inline T htobe(T value) {return value;} -- cgit v1.2.3