summaryrefslogtreecommitdiff
path: root/base/loader/ecoff_object.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/loader/ecoff_object.cc')
-rw-r--r--base/loader/ecoff_object.cc27
1 files changed, 3 insertions, 24 deletions
diff --git a/base/loader/ecoff_object.cc b/base/loader/ecoff_object.cc
index a4b8c8713..cd37abaa7 100644
--- a/base/loader/ecoff_object.cc
+++ b/base/loader/ecoff_object.cc
@@ -29,8 +29,6 @@
#include <string>
#include "base/loader/ecoff_object.hh"
-
-#include "mem/translating_port.hh"
#include "base/loader/symtab.hh"
#include "base/trace.hh" // for DPRINTF
@@ -68,12 +66,15 @@ EcoffObject::EcoffObject(const string &_filename, int _fd,
text.baseAddr = aoutHdr->text_start;
text.size = aoutHdr->tsize;
+ text.fileImage = fileData + ECOFF_TXTOFF(execHdr);
data.baseAddr = aoutHdr->data_start;
data.size = aoutHdr->dsize;
+ data.fileImage = fileData + ECOFF_DATOFF(execHdr);
bss.baseAddr = aoutHdr->bss_start;
bss.size = aoutHdr->bsize;
+ bss.fileImage = NULL;
DPRINTFR(Loader, "text: 0x%x %d\ndata: 0x%x %d\nbss: 0x%x %d\n",
text.baseAddr, text.size, data.baseAddr, data.size,
@@ -82,28 +83,6 @@ EcoffObject::EcoffObject(const string &_filename, int _fd,
bool
-EcoffObject::loadSections(TranslatingPort *memPort, bool loadPhys)
-{
- Addr textAddr = text.baseAddr;
- Addr dataAddr = data.baseAddr;
-
- if (loadPhys) {
- textAddr &= (ULL(1) << 40) - 1;
- dataAddr &= (ULL(1) << 40) - 1;
- }
-
- // Since we don't really have an MMU and all memory is
- // zero-filled, there's no need to set up the BSS segment.
- memPort->writeBlobFunctional(textAddr, fileData + ECOFF_TXTOFF(execHdr),
- text.size, true);
- memPort->writeBlobFunctional(dataAddr, fileData + ECOFF_DATOFF(execHdr),
- data.size, true);
-
- return true;
-}
-
-
-bool
EcoffObject::loadGlobalSymbols(SymbolTable *symtab)
{
if (!symtab)