From 06a92e0d8c9042c2b8cd027b3c187f94c56e9b91 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 1 Apr 2020 17:19:49 +0100 Subject: [PATCH] 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 --- src/arch/arm/fs_workload.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.30.2