diff options
Diffstat (limited to 'src/arch/riscv/process.cc')
-rw-r--r-- | src/arch/riscv/process.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/arch/riscv/process.cc b/src/arch/riscv/process.cc index 35dde7600..617efa0ee 100644 --- a/src/arch/riscv/process.cc +++ b/src/arch/riscv/process.cc @@ -75,7 +75,7 @@ RiscvProcess64::RiscvProcess64(ProcessParams *params, ObjectFile *objFile) : const Addr stack_base = 0x7FFFFFFFFFFFFFFFL; const Addr max_stack_size = 8 * 1024 * 1024; const Addr next_thread_stack_base = stack_base - max_stack_size; - const Addr brk_point = roundUp(objFile->maxSegmentAddr(), PageBytes); + const Addr brk_point = roundUp(image.maxAddr(), PageBytes); const Addr mmap_end = 0x4000000000000000L; memState = make_shared<MemState>(brk_point, stack_base, max_stack_size, next_thread_stack_base, mmap_end); @@ -87,7 +87,7 @@ RiscvProcess32::RiscvProcess32(ProcessParams *params, ObjectFile *objFile) : const Addr stack_base = 0x7FFFFFFF; const Addr max_stack_size = 8 * 1024 * 1024; const Addr next_thread_stack_base = stack_base - max_stack_size; - const Addr brk_point = roundUp(objFile->maxSegmentAddr(), PageBytes); + const Addr brk_point = roundUp(image.maxAddr(), PageBytes); const Addr mmap_end = 0x40000000L; memState = make_shared<MemState>(brk_point, stack_base, max_stack_size, next_thread_stack_base, mmap_end); @@ -123,10 +123,6 @@ RiscvProcess::argsInit(int pageSize) const int RandomBytes = 16; const int addrSize = sizeof(IntType); - updateBias(); - objFile->loadSegments(initVirtMem); - if (objFile->getInterpreter()) - objFile->getInterpreter()->loadSegments(initVirtMem); ElfObject* elfObject = dynamic_cast<ElfObject*>(objFile); memState->setStackMin(memState->getStackBase()); |