diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-09-25 20:03:51 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-09-25 20:03:51 -0700 |
commit | 9ef0f6a7f13a789bccfadf363861f5ff81709fc7 (patch) | |
tree | bd9f80a47246e3a5610fe0e733e2fbbf3697f87f /src/base/loader/elf_object.hh | |
parent | 85d46ce470a498e3611885982f99fd9afe6e37e7 (diff) | |
download | gem5-9ef0f6a7f13a789bccfadf363861f5ff81709fc7.tar.xz |
Loader: Load all segments of an elf, rather than just the "text" and "data".
--HG--
extra : convert_revision : b28bb9ac5cde72878e948d64f629de6e4b42c2e8
Diffstat (limited to 'src/base/loader/elf_object.hh')
-rw-r--r-- | src/base/loader/elf_object.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh index 3e7c85874..5c5f6907d 100644 --- a/src/base/loader/elf_object.hh +++ b/src/base/loader/elf_object.hh @@ -33,11 +33,15 @@ #include "base/loader/object_file.hh" #include <set> +#include <vector> class ElfObject : public ObjectFile { protected: + //The global definition of a "Section" is closest to elf's segments. + typedef ObjectFile::Section Segment; + //These values are provided to a linux process by the kernel, so we //need to keep them around. Addr _programHeaderTable; @@ -55,9 +59,13 @@ class ElfObject : public ObjectFile void getSections(); bool sectionExists(std::string sec); + std::vector<Segment> extraSegments; + public: virtual ~ElfObject() {} + bool loadSections(Port *memPort, + Addr addrMask = std::numeric_limits<Addr>::max()); virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask = std::numeric_limits<Addr>::max()); virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask = |