From 0a18bc0d6cdcbf68f9bf01ae98ce0f678c62f16f Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 27 Jul 2009 00:50:55 -0700 Subject: [PATCH] ARM: Detect OABI binaries and complain that they're no-longer supported. --- src/base/loader/elf_object.cc | 4 +++- src/base/loader/object_file.hh | 3 ++- src/sim/process.cc | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc index 16fc698dd..15ad88f76 100644 --- a/src/base/loader/elf_object.cc +++ b/src/base/loader/elf_object.cc @@ -107,7 +107,6 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) { case ELFOSABI_LINUX: - case ELFOSABI_ARM: opSys = ObjectFile::Linux; break; case ELFOSABI_SOLARIS: @@ -116,6 +115,9 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data) case ELFOSABI_TRU64: opSys = ObjectFile::Tru64; break; + case ELFOSABI_ARM: + opSys = ObjectFile::LinuxArmOABI; + break; default: opSys = ObjectFile::UnknownOpSys; } diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh index 73df5caf6..e511451b7 100644 --- a/src/base/loader/object_file.hh +++ b/src/base/loader/object_file.hh @@ -59,7 +59,8 @@ class ObjectFile UnknownOpSys, Tru64, Linux, - Solaris + Solaris, + LinuxArmOABI }; protected: diff --git a/src/sim/process.cc b/src/sim/process.cc index c12101069..55bd2f209 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -748,7 +748,9 @@ LiveProcess::create(LiveProcessParams * params) case ObjectFile::Linux: process = new ArmLinuxProcess(params, objFile); break; - + case ObjectFile::LinuxArmOABI: + fatal("M5 does not support ARM OABI binaries. Please recompile with an" + " EABI compiler."); default: fatal("Unknown/unsupported operating system."); } -- 2.30.2