From dd2b3bde4c3d067af68e1f2d10db81d9d0af9cb5 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 1 Oct 2019 21:22:07 -0700 Subject: arch,base: Stop loading the interpreter in ElfObject. The interpreter is a separate object file, and while it's convenient to hide loading it in the code which loads the main object file, it breaks the conceptual abstraction since you only asked it to load the main object file. Also, this makes every object file format reimplement the idea of loading the interpreter. Admittedly only ELF recognizes and sets up an interpreter, but other formats conceptually could too. This does move that limitted hypothetical redundancy out of the object file formats and moves it into the process objects, but I think conceptually that's where it belongs. It would also probably be pretty easy to add a method to the base Process class that would handle loading an image and also the interpreter image. This change does not (yet) separate reading symbol tables. Change-Id: I4a165eac599a9bcd30371a162379e833c4cc89b4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21465 Tested-by: kokoro Reviewed-by: Brandon Potter Reviewed-by: Andreas Sandberg Maintainer: Gabe Black --- src/arch/arm/process.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/arch/arm') diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc index f98572690..ff3b92f48 100644 --- a/src/arch/arm/process.cc +++ b/src/arch/arm/process.cc @@ -271,6 +271,8 @@ ArmProcess::argsInit(int pageSize, IntRegIndex spIndex) // load object file into target memory objFile->loadSegments(initVirtMem); + if (objFile->getInterpreter()) + objFile->getInterpreter()->loadSegments(initVirtMem); //Setup the auxilliary vectors. These will already have endian conversion. //Auxilliary vectors are loaded only for elf formatted executables. -- cgit v1.2.3