[lld] r233374 - [ARM] Simplify IFUNC code by removing useless handler
Denis Protivensky
dprotivensky at accesssoftek.com
Fri Mar 27 05:41:36 PDT 2015
Author: denis-protivensky
Date: Fri Mar 27 07:41:36 2015
New Revision: 233374
URL: http://llvm.org/viewvc/llvm-project?rev=233374&view=rev
Log:
[ARM] Simplify IFUNC code by removing useless handler
Modified:
lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp?rev=233374&r1=233373&r2=233374&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Fri Mar 27 07:41:36 2015
@@ -289,14 +289,12 @@ protected:
ga->addReferenceELF_ARM(R_ARM_ABS32, 0, da, 0);
ga->addReferenceELF_ARM(R_ARM_IRELATIVE, 0, da, 0);
auto pa = createPLTforGOT(ga);
-
#ifndef NDEBUG
ga->_name = "__got_ifunc_";
ga->_name += da->name();
pa->_name = "__plt_ifunc_";
pa->_name += da->name();
#endif
-
_gotMap[da] = ga;
_pltMap[da] = pa;
_gotVector.push_back(ga);
@@ -304,14 +302,6 @@ protected:
return pa;
}
- /// \brief Handle adding of PLT entry by marking the reference
- /// as requiring veneer generation.
- std::error_code handlePLTEntry(Reference &ref, const PLTAtom *pa) {
- ref.setTarget(pa);
-
- return std::error_code();
- }
-
/// \brief Redirect the call to the PLT stub for the target IFUNC.
///
/// This create a PLT and GOT entry for the IFUNC if one does not exist. The
@@ -319,8 +309,7 @@ protected:
std::error_code handleIFUNC(const Reference &ref) {
auto target = dyn_cast<const DefinedAtom>(ref.target());
if (target && target->contentType() == DefinedAtom::typeResolver) {
- return handlePLTEntry(const_cast<Reference &>(ref),
- getIFUNCPLTEntry(target));
+ const_cast<Reference &>(ref).setTarget(getIFUNCPLTEntry(target));
}
return std::error_code();
}
More information about the llvm-commits
mailing list