base: Fix gem5.fast compilation
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 15 Oct 2019 11:54:08 +0000 (12:54 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 16 Oct 2019 08:15:14 +0000 (08:15 +0000)
Change-Id: I86c83e8622ae5a88ff802ccb1cb919194c1251ef
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21820
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/loader/aout_object.cc
src/base/loader/ecoff_object.cc
src/base/loader/elf_object.cc

index 47f3021b7cedf9419415ef190088eb12dd83f6ba..99713d911691a80e0aeda2be53035defe1c4fecf 100644 (file)
@@ -76,7 +76,7 @@ AoutObject::buildImage() const
             MemoryImage::Segment{ "bss", N_BSSADDR(*execHdr), execHdr->bsize}
     });
 
-    for (auto &seg: image.segments())
+    for (auto M5_VAR_USED &seg: image.segments())
         DPRINTFR(Loader, "%s\n", seg);
 
     return image;
index 2f534311a4364456cd56a4d566b20a9b36edd734..7af2c7aec1ef053ed075dcfb0c4bfea56f7d8efd 100644 (file)
@@ -89,7 +89,7 @@ EcoffObject::buildImage() const
             { "bss", aoutHdr->bss_start, aoutHdr->bsize }
     });
 
-    for (auto &seg: image.segments())
+    for (auto M5_VAR_USED &seg: image.segments())
         DPRINTFR(Loader, "%s\n", seg);
 
     return image;
index e35c28bd0ccab3be1786ef2773a89ce076faf2be..33aa2d8d148ee0b6e252da2ce8628b32f9f2c695 100644 (file)
@@ -131,7 +131,7 @@ ElfObject::ElfObject(ImageFileDataPtr ifd) : ObjectFile(ifd)
             "No loadable segments in '%s'. ELF file corrupted?\n",
             imageData->filename());
 
-    for (auto &seg: image.segments())
+    for (auto M5_VAR_USED &seg: image.segments())
         DPRINTFR(Loader, "%s\n", seg);
 
     // We will actually read the sections when we need to load them