summaryrefslogtreecommitdiff
path: root/base/loader/object_file.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-04 03:09:23 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-04 03:09:23 -0500
commit7c4c623302dca7da95b1c95d4968f4ef76de391d (patch)
treee7fe108cc927ef7381683ae2e7509ea17d272856 /base/loader/object_file.hh
parentdd0d8e628742c824cd5074433dc97ff7ebd92497 (diff)
downloadgem5-7c4c623302dca7da95b1c95d4968f4ef76de391d.tar.xz
Filled out the object file loader so it can load object files for several OSs and architectures.
SConscript: Added ./libelf as an include search directory. There might be a better spot for this than where I put it. arch/SConscript: Combined the linux_process.h and tru64_process.h into process.h. This allows each ISA to support processes from arbitrary OSs. arch/alpha/SConscript: Added process.cc as a source file. It provides an implementation of createProcess, which takes an object_file object and creates the appropriate process object, or dies. base/loader/elf_object.cc: Actually extract the OS and architecture from the elf file, rather than always guessing Alpha and Linux. base/loader/object_file.hh: Added constants for SPARC, MIPS, and Solaris, and changed the include for the Addr type. sim/process.cc: Pushed creation of specific process objects into the ISA specific code. --HG-- extra : convert_revision : b4754e7ca8328672d07e1394c4d162e199606b53
Diffstat (limited to 'base/loader/object_file.hh')
-rw-r--r--base/loader/object_file.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh
index 3c8659e18..1b44ae14f 100644
--- a/base/loader/object_file.hh
+++ b/base/loader/object_file.hh
@@ -29,7 +29,9 @@
#ifndef __OBJECT_FILE_HH__
#define __OBJECT_FILE_HH__
-#include "arch/isa_traits.hh" // for Addr
+#include <string>
+
+#include "sim/host.hh" // for Addr
class FunctionalMemory;
class SymbolTable;
@@ -40,13 +42,16 @@ class ObjectFile
enum Arch {
UnknownArch,
- Alpha
+ Alpha,
+ SPARC,
+ MIPS
};
enum OpSys {
UnknownOpSys,
Tru64,
- Linux
+ Linux,
+ Solaris
};
protected: