From 9ef0f6a7f13a789bccfadf363861f5ff81709fc7 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 25 Sep 2007 20:03:51 -0700 Subject: Loader: Load all segments of an elf, rather than just the "text" and "data". --HG-- extra : convert_revision : b28bb9ac5cde72878e948d64f629de6e4b42c2e8 --- src/base/loader/elf_object.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/base/loader/elf_object.hh') 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 +#include 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 extraSegments; + public: virtual ~ElfObject() {} + bool loadSections(Port *memPort, + Addr addrMask = std::numeric_limits::max()); virtual bool loadGlobalSymbols(SymbolTable *symtab, Addr addrMask = std::numeric_limits::max()); virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask = -- cgit v1.2.3