arch,base: Separate the idea of a memory image and object file.
authorGabe Black <gabeblack@google.com>
Wed, 2 Oct 2019 04:15:06 +0000 (21:15 -0700)
committerGabe Black <gabeblack@google.com>
Sat, 12 Oct 2019 04:10:59 +0000 (04:10 +0000)
commit6ee86bf497ea87a585fe8e4651760e71244fa2fb
treeb2038b4d87285261ce57d29e82ad9e67baf99676
parent211869ea950f3cc3116655f06b1d46d3fa39fb3a
arch,base: Separate the idea of a memory image and object file.

A memory image can be described by an object file, but an object file
is more than a memory image. Also, it makes sense to manipulate a
memory image to, for instance, change how it's loaded into memory. That
takes on larger implications (relocations, the entry point, symbols,
etc.) when talking about the whole object file, and also modifies
aspects which may not need to change. For instance if an image needs
to be loaded into memory at addresses different from what's in the
object file, but other things like symbols need to stay unmodified.

Change-Id: Ia360405ffb2c1c48e0cc201ac0a0764357996a54
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21466
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
34 files changed:
src/arch/alpha/process.cc
src/arch/alpha/system.cc
src/arch/arm/freebsd/system.cc
src/arch/arm/linux/system.cc
src/arch/arm/process.cc
src/arch/arm/system.cc
src/arch/mips/process.cc
src/arch/power/process.cc
src/arch/riscv/bare_metal/system.cc
src/arch/riscv/process.cc
src/arch/sparc/process.cc
src/arch/sparc/process.hh
src/arch/sparc/system.cc
src/arch/x86/process.cc
src/base/SConscript
src/base/loader/aout_object.cc
src/base/loader/aout_object.hh
src/base/loader/dtb_object.cc
src/base/loader/dtb_object.hh
src/base/loader/ecoff_object.cc
src/base/loader/ecoff_object.hh
src/base/loader/elf_object.cc
src/base/loader/elf_object.hh
src/base/loader/memory_image.cc [new file with mode: 0644]
src/base/loader/memory_image.hh [new file with mode: 0644]
src/base/loader/object_file.cc
src/base/loader/object_file.hh
src/base/loader/raw_object.cc
src/base/loader/raw_object.hh
src/sim/process.cc
src/sim/process.hh
src/sim/syscall_emul.hh
src/sim/system.cc
src/sim/system.hh