summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-11-30 15:51:54 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-11-30 15:51:54 -0500
commit8c4f7a0404c1a1787761cf34b3e7800d9596ac0a (patch)
tree09bc9d4f153b9491709723b6b5c3df392d7a05a6 /src/base
parent7b9ef9716b2a6a5744c080b1b7a69b2509fb29d3 (diff)
downloadgem5-8c4f7a0404c1a1787761cf34b3e7800d9596ac0a.tar.xz
Load the hypervisor symbols twice, once with an address mask so that we can get symbols for where it's copied to in memory
Add the ability to use an address mask for symbol loading Rather then silently failing on platform accesses panic Move BadAddr/IsaFake no Device from Tsunami Let the system kernel be none, but warn about it configs/common/FSConfig.py: We don't have a kernel for sparc yet src/arch/sparc/system.cc: Load the hypervisor symbols twice, once with an address mask so that we can get symbols for where it's copied to in memory src/base/loader/aout_object.cc: src/base/loader/aout_object.hh: src/base/loader/ecoff_object.cc: src/base/loader/ecoff_object.hh: src/base/loader/elf_object.cc: src/base/loader/elf_object.hh: src/base/loader/object_file.hh: src/base/loader/raw_object.cc: src/base/loader/raw_object.hh: Add the ability to use an address mask for symbol loading src/dev/sparc/t1000.cc: Rather then silently failing on platform accesses panic src/dev/sparc/t1000.hh: fix up a couple of platform comments src/python/m5/objects/Bus.py: src/python/m5/objects/Device.py: src/python/m5/objects/T1000.py: src/python/m5/objects/Tsunami.py: Move BadAddr/IsaFake no Device from Tsunami src/python/m5/objects/System.py: Let kernel be none src/sim/system.cc: Let the system kernel be none, but warn about it --HG-- extra : convert_revision : 92f6afef599a3d3c7c5026d03434102c41c7b5f4
Diffstat (limited to 'src/base')
-rw-r--r--src/base/loader/aout_object.cc4
-rw-r--r--src/base/loader/aout_object.hh6
-rw-r--r--src/base/loader/ecoff_object.cc4
-rw-r--r--src/base/loader/ecoff_object.hh6
-rw-r--r--src/base/loader/elf_object.cc4
-rw-r--r--src/base/loader/elf_object.hh6
-rw-r--r--src/base/loader/object_file.hh6
-rw-r--r--src/base/loader/raw_object.cc8
-rw-r--r--src/base/loader/raw_object.hh6
9 files changed, 30 insertions, 20 deletions
diff --git a/src/base/loader/aout_object.cc b/src/base/loader/aout_object.cc
index 6691bd4ae..8fbad8030 100644
--- a/src/base/loader/aout_object.cc
+++ b/src/base/loader/aout_object.cc
@@ -82,14 +82,14 @@ AoutObject::AoutObject(const string &_filename, int _fd,
bool
-AoutObject::loadGlobalSymbols(SymbolTable *symtab)
+AoutObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
{
// a.out symbols not supported yet
return false;
}
bool
-AoutObject::loadLocalSymbols(SymbolTable *symtab)
+AoutObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
{
// a.out symbols not supported yet
return false;
diff --git a/src/base/loader/aout_object.hh b/src/base/loader/aout_object.hh
index d180d69f3..7bac5be65 100644
--- a/src/base/loader/aout_object.hh
+++ b/src/base/loader/aout_object.hh
@@ -48,8 +48,10 @@ class AoutObject : public ObjectFile
public:
virtual ~AoutObject() {}
- virtual bool loadGlobalSymbols(SymbolTable *symtab);
- virtual bool loadLocalSymbols(SymbolTable *symtab);
+ virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
+ virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
static ObjectFile *tryFile(const std::string &fname, int fd,
size_t len, uint8_t *data);
diff --git a/src/base/loader/ecoff_object.cc b/src/base/loader/ecoff_object.cc
index 134f2d98d..a5a0ad9a4 100644
--- a/src/base/loader/ecoff_object.cc
+++ b/src/base/loader/ecoff_object.cc
@@ -86,7 +86,7 @@ EcoffObject::EcoffObject(const string &_filename, int _fd,
bool
-EcoffObject::loadGlobalSymbols(SymbolTable *symtab)
+EcoffObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
{
if (!symtab)
return false;
@@ -115,7 +115,7 @@ EcoffObject::loadGlobalSymbols(SymbolTable *symtab)
}
bool
-EcoffObject::loadLocalSymbols(SymbolTable *symtab)
+EcoffObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
{
if (!symtab)
return false;
diff --git a/src/base/loader/ecoff_object.hh b/src/base/loader/ecoff_object.hh
index 05c604b2b..ca6fa2dd0 100644
--- a/src/base/loader/ecoff_object.hh
+++ b/src/base/loader/ecoff_object.hh
@@ -52,8 +52,10 @@ class EcoffObject : public ObjectFile
public:
virtual ~EcoffObject() {}
- virtual bool loadGlobalSymbols(SymbolTable *symtab);
- virtual bool loadLocalSymbols(SymbolTable *symtab);
+ virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
+ virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
static ObjectFile *tryFile(const std::string &fname, int fd,
size_t len, uint8_t *data);
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index 2ca0d4f4a..7339507f6 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -330,13 +330,13 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
}
bool
-ElfObject::loadGlobalSymbols(SymbolTable *symtab)
+ElfObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
{
return loadSomeSymbols(symtab, STB_GLOBAL);
}
bool
-ElfObject::loadLocalSymbols(SymbolTable *symtab)
+ElfObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
{
return loadSomeSymbols(symtab, STB_LOCAL);
}
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh
index 9755426b4..fb728b3c5 100644
--- a/src/base/loader/elf_object.hh
+++ b/src/base/loader/elf_object.hh
@@ -53,8 +53,10 @@ class ElfObject : public ObjectFile
public:
virtual ~ElfObject() {}
- virtual bool loadGlobalSymbols(SymbolTable *symtab);
- virtual bool loadLocalSymbols(SymbolTable *symtab);
+ virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
+ virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
static ObjectFile *tryFile(const std::string &fname, int fd,
size_t len, uint8_t *data);
diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh
index 64085185d..6e98332c5 100644
--- a/src/base/loader/object_file.hh
+++ b/src/base/loader/object_file.hh
@@ -78,8 +78,10 @@ class ObjectFile
virtual bool loadSections(Port *memPort, Addr addrMask =
std::numeric_limits<Addr>::max());
- virtual bool loadGlobalSymbols(SymbolTable *symtab) = 0;
- virtual bool loadLocalSymbols(SymbolTable *symtab) = 0;
+ virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max()) = 0;
+ virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max()) = 0;
Arch getArch() const { return arch; }
OpSys getOpSys() const { return opSys; }
diff --git a/src/base/loader/raw_object.cc b/src/base/loader/raw_object.cc
index 1faf33426..2a52b0d6e 100644
--- a/src/base/loader/raw_object.cc
+++ b/src/base/loader/raw_object.cc
@@ -61,21 +61,21 @@ RawObject::RawObject(const std::string &_filename, int _fd, size_t _len,
}
bool
-RawObject::loadGlobalSymbols(SymbolTable *symtab)
+RawObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
{
int fnameStart = filename.rfind('/',filename.size()) + 1;
int extStart = filename.rfind('.',filename.size());
- symtab->insert(text.baseAddr, filename.substr(fnameStart,
+ symtab->insert(text.baseAddr & addrMask, filename.substr(fnameStart,
extStart-fnameStart) + "_start");
return true;
}
bool
-RawObject::loadLocalSymbols(SymbolTable *symtab)
+RawObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
{
int fnameStart = filename.rfind('/',filename.size()) + 1;
int extStart = filename.rfind('.',filename.size());
- symtab->insert(text.baseAddr, filename.substr(fnameStart,
+ symtab->insert(text.baseAddr & addrMask, filename.substr(fnameStart,
extStart-fnameStart) + "_start");
return true;
}
diff --git a/src/base/loader/raw_object.hh b/src/base/loader/raw_object.hh
index c7fff4e66..9014a2d30 100644
--- a/src/base/loader/raw_object.hh
+++ b/src/base/loader/raw_object.hh
@@ -41,8 +41,10 @@ class RawObject: public ObjectFile
public:
virtual ~RawObject() {}
- virtual bool loadGlobalSymbols(SymbolTable *symtab);
- virtual bool loadLocalSymbols(SymbolTable *symtab);
+ virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
+ virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
static ObjectFile *tryFile(const std::string &fname, int fd, size_t len,
uint8_t *data);