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:
committed by
Brandon Potter
parent
dc338b402f
commit
da7e63d088
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user