sim-se: const for loader's loadSection param

The port proxy can be declared as a reference to a const proxy
rather than just a reference to a proxy.

Change-Id: I4640b0c5f33e2334c1e7630131f78607ced40a34
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12301
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
Brandon Potter
2018-08-28 14:49:51 -04:00
committed by Brandon Potter
parent dc338b402f
commit da7e63d088
4 changed files with 9 additions and 7 deletions

View File

@@ -73,8 +73,8 @@ ObjectFile::~ObjectFile()
bool
ObjectFile::loadSection(Section *sec, PortProxy& mem_proxy, Addr addr_mask,
Addr offset)
ObjectFile::loadSection(Section *sec, const PortProxy& mem_proxy,
Addr addr_mask, Addr offset)
{
if (sec->size != 0) {
Addr addr = (sec->baseAddr & addr_mask) + offset;
@@ -91,7 +91,8 @@ ObjectFile::loadSection(Section *sec, PortProxy& mem_proxy, Addr addr_mask,
bool
ObjectFile::loadSections(PortProxy& mem_proxy, Addr addr_mask, Addr offset)
ObjectFile::loadSections(const PortProxy& mem_proxy, Addr addr_mask,
Addr offset)
{
return (loadSection(&text, mem_proxy, addr_mask, offset)
&& loadSection(&data, mem_proxy, addr_mask, offset)