summaryrefslogtreecommitdiff
path: root/base/loader/object_file.hh
diff options
context:
space:
mode:
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 {