summaryrefslogtreecommitdiff
path: root/base/loader/object_file.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-12-01 19:34:51 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-12-01 19:34:51 -0800
commit745f0044cd65d476b3b190377989eb0af3738df5 (patch)
treebc29a2944891cdfa20edeebe80e3a4ea08c0e3a7 /base/loader/object_file.hh
parent5b24b5a5c5d336eb1594e65826caf2a28da3ede1 (diff)
parent7976794aadd7f308010f88aa3a8a6e3469e37ba7 (diff)
downloadgem5-745f0044cd65d476b3b190377989eb0af3738df5.tar.xz
Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG-- extra : convert_revision : d66ebc598fdcfc9477ea5a1e455b21d7b9e56936
Diffstat (limited to 'base/loader/object_file.hh')
-rw-r--r--base/loader/object_file.hh22
1 files changed, 21 insertions, 1 deletions
diff --git a/base/loader/object_file.hh b/base/loader/object_file.hh
index 5950ea326..a29bdc153 100644
--- a/base/loader/object_file.hh
+++ b/base/loader/object_file.hh
@@ -36,14 +36,31 @@ class SymbolTable;
class ObjectFile
{
+ public:
+
+ enum Arch {
+ UnknownArch,
+ Alpha
+ };
+
+ enum OpSys {
+ UnknownOpSys,
+ Tru64,
+ Linux
+ };
+
protected:
const std::string filename;
int descriptor;
uint8_t *fileData;
size_t len;
+ Arch arch;
+ OpSys opSys;
+
ObjectFile(const std::string &_filename, int _fd,
- size_t _len, uint8_t *_data);
+ size_t _len, uint8_t *_data,
+ Arch _arch, OpSys _opSys);
public:
virtual ~ObjectFile();
@@ -55,6 +72,9 @@ class ObjectFile
virtual bool loadGlobalSymbols(SymbolTable *symtab) = 0;
virtual bool loadLocalSymbols(SymbolTable *symtab) = 0;
+ Arch getArch() const { return arch; }
+ OpSys getOpSys() const { return opSys; }
+
protected:
struct Section {