From: Giacomo Travaglini Date: Wed, 1 Apr 2020 16:19:49 +0000 (+0100) Subject: arch-arm: Handle empty object_file scenario in ArmFsWorkload X-Git-Tag: v20.0.0.0~203 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06a92e0d8c9042c2b8cd027b3c187f94c56e9b91;p=gem5.git arch-arm: Handle empty object_file scenario in ArmFsWorkload At the moment it is actually possible to pass en empty object file to the ArmFsWorkload (OsKernel) class. We need to handle this situation as well. In case no bootloader nor object file is passed, we default to AArch64 (default value for ArmFsWorkload) Change-Id: I3b4aa8b8d61a8fac08da218125984b3bb1d38fb9 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27707 Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Tested-by: kokoro Reviewed-by: Gabe Black --- diff --git a/src/arch/arm/fs_workload.cc b/src/arch/arm/fs_workload.cc index 3d8115621..8f40293eb 100644 --- a/src/arch/arm/fs_workload.cc +++ b/src/arch/arm/fs_workload.cc @@ -96,7 +96,7 @@ FsWorkload::FsWorkload(Params *p) bootldr->loadGlobalSymbols(debugSymbolTable); _highestELIs64 = (bootldr->getArch() == ObjectFile::Arm64); - } else { + } else if (obj) { _highestELIs64 = (obj->getArch() == ObjectFile::Arm64); } }