[lld] r199237 - [Mips] Do not store a pointer to the AtomLayout related to the
Simon Atanasyan
simon at atanasyan.com
Tue Jan 14 10:19:36 PST 2014
Author: atanasyan
Date: Tue Jan 14 12:19:35 2014
New Revision: 199237
URL: http://llvm.org/viewvc/llvm-project?rev=199237&view=rev
Log:
[Mips] Do not store a pointer to the AtomLayout related to the
_GLOBAL_OFFSET_TABLE_ symbol. We do not use this ponter anywhere after
assigning of virtual address.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp?rev=199237&r1=199236&r2=199237&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp Tue Jan 14 12:19:35 2014
@@ -171,8 +171,7 @@ void MipsTargetHandler::finalizeSymbolVa
auto gotAtomIter = _targetLayout.findAbsoluteAtom("_GLOBAL_OFFSET_TABLE_");
assert(gotAtomIter != _targetLayout.absoluteAtoms().end());
- _gotSymAtom = (*gotAtomIter);
- _gotSymAtom->_virtualAddr = gotSection ? gotSection->virtualAddr() : 0;
+ (*gotAtomIter)->_virtualAddr = gotSection ? gotSection->virtualAddr() : 0;
auto gpDispAtomIter = _targetLayout.findAbsoluteAtom("_gp_disp");
assert(gpDispAtomIter != _targetLayout.absoluteAtoms().end());
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h?rev=199237&r1=199236&r2=199237&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h Tue Jan 14 12:19:35 2014
@@ -69,7 +69,6 @@ private:
llvm::BumpPtrAllocator _alloc;
MipsTargetLayout<Mips32ElELFType> _targetLayout;
MipsTargetRelocationHandler _relocationHandler;
- AtomLayout *_gotSymAtom;
AtomLayout *_gpDispSymAtom;
};
More information about the llvm-commits
mailing list