summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-09-28 19:07:17 -0700
committerGabe Black <gabeblack@google.com>2019-10-08 17:46:04 +0000
commit93595f4a2a069d1b10c6ff63a5f5273b3a695549 (patch)
treee110cceeaa10166ccaad416515609ee025980183 /src
parentcb1eb7e29d196cc4febca194b7d295e88c37c093 (diff)
downloadgem5-93595f4a2a069d1b10c6ff63a5f5273b3a695549.tar.xz
base: Get rid of the unused global pointer in object files.
This was only ever read from Alpha, and nothing ever set it. It defaulted to zero, so this change just propogates that value through to the Alpha Process class. Change-Id: I569cf9d61a37322dbd88de1038a2af74c64bbe7a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21461 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/arch/alpha/process.cc2
-rw-r--r--src/base/loader/object_file.cc2
-rw-r--r--src/base/loader/object_file.hh4
3 files changed, 2 insertions, 6 deletions
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc
index 83c4c2619..ea1cb0819 100644
--- a/src/arch/alpha/process.cc
+++ b/src/arch/alpha/process.cc
@@ -213,7 +213,7 @@ AlphaProcess::initState()
argsInit(MachineBytes, PageBytes);
ThreadContext *tc = system->getThreadContext(contextIds[0]);
- tc->setIntReg(GlobalPointerReg, objFile->globalPointer());
+ tc->setIntReg(GlobalPointerReg, 0);
//Operate in user mode
tc->setMiscRegNoEffect(IPR_ICM, mode_user << 3);
tc->setMiscRegNoEffect(IPR_DTB_CM, mode_user << 3);
diff --git a/src/base/loader/object_file.cc b/src/base/loader/object_file.cc
index ede8922e9..0bb897cee 100644
--- a/src/base/loader/object_file.cc
+++ b/src/base/loader/object_file.cc
@@ -57,7 +57,7 @@ ObjectFile::ObjectFile(const string &_filename,
size_t _len, uint8_t *_data,
Arch _arch, OpSys _op_sys)
: filename(_filename), fileData(_data), len(_len),
- arch(_arch), opSys(_op_sys), entry(0), globalPtr(0),
+ arch(_arch), opSys(_op_sys), entry(0),
text{0, nullptr, 0}, data{0, nullptr, 0}, bss{0, nullptr, 0}
{
}
diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh
index bd9d6260a..14dee3be0 100644
--- a/src/base/loader/object_file.hh
+++ b/src/base/loader/object_file.hh
@@ -123,7 +123,6 @@ class ObjectFile
};
Addr entry;
- Addr globalPtr;
Section text;
Section data;
@@ -131,13 +130,10 @@ class ObjectFile
bool loadSection(Section *sec, const PortProxy& mem_proxy, Addr mask,
Addr offset = 0);
- void setGlobalPointer(Addr global_ptr) { globalPtr = global_ptr; }
public:
Addr entryPoint() const { return entry; }
- Addr globalPointer() const { return globalPtr; }
-
Addr textBase() const { return text.baseAddr; }
Addr dataBase() const { return data.baseAddr; }
Addr bssBase() const { return bss.baseAddr; }