forked from OSchip/llvm-project
[Mips] Factor out constant represents gp value offset to the
MipsTargetLayout class method. llvm-svn: 199236
This commit is contained in:
parent
acb301fab1
commit
0b4dd91582
|
@ -178,7 +178,8 @@ void MipsTargetHandler::finalizeSymbolValues() {
|
|||
assert(gpDispAtomIter != _targetLayout.absoluteAtoms().end());
|
||||
_gpDispSymAtom = (*gpDispAtomIter);
|
||||
_gpDispSymAtom->_virtualAddr =
|
||||
gotSection ? gotSection->virtualAddr() + 0x7FF0 : 0;
|
||||
gotSection ? gotSection->virtualAddr() + _targetLayout.getGPOffset()
|
||||
: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,9 @@ public:
|
|||
: TargetLayout<ELFType>(ctx),
|
||||
_gotSection(new (_alloc) MipsGOTSection<ELFType>(ctx)) {}
|
||||
|
||||
/// \brief GP offset relative to .got section.
|
||||
uint64_t getGPOffset() const { return 0x7FF0; }
|
||||
|
||||
const MipsGOTSection<ELFType> &getGOTSection() const { return *_gotSection; }
|
||||
|
||||
virtual AtomSection<ELFType> *
|
||||
|
|
Loading…
Reference in New Issue