diff options
Diffstat (limited to 'src/sim/process.cc')
-rw-r--r-- | src/sim/process.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc index 224152a32..a01cfea91 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -129,6 +129,8 @@ Process::Process(ProcessParams *params, EmulationPageTable *pTable, exitGroup = new bool(); sigchld = new bool(); + image = objFile->buildImage(); + if (!debugSymbolTable) { debugSymbolTable = new SymbolTable(); if (!objFile->loadGlobalSymbols(debugSymbolTable) || @@ -271,6 +273,16 @@ Process::revokeThreadContext(int context_id) } void +Process::init() +{ + // Patch the ld_bias for dynamic executables. + updateBias(); + + if (objFile->getInterpreter()) + interpImage = objFile->getInterpreter()->buildImage(); +} + +void Process::initState() { if (contextIds.empty()) @@ -283,6 +295,10 @@ Process::initState() tc->activate(); pTable->initState(); + + // load object file into target memory + image.write(initVirtMem); + interpImage.write(initVirtMem); } DrainState |