[lld] r234580 - [ARM] Improve veneer handling and introduce handlePlain method
Denis Protivensky
dprotivensky at accesssoftek.com
Fri Apr 10 02:54:11 PDT 2015
Author: denis-protivensky
Date: Fri Apr 10 04:54:10 2015
New Revision: 234580
URL: http://llvm.org/viewvc/llvm-project?rev=234580&view=rev
Log:
[ARM] Improve veneer handling and introduce handlePlain method
Handle veneers only for call-like relocations.
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=234580&r1=234579&r2=234580&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp Fri Apr 10 04:54:10 2015
@@ -297,12 +297,14 @@ template <class Derived> class ARMReloca
case R_ARM_MOVT_ABS:
case R_ARM_THM_MOVW_ABS_NC:
case R_ARM_THM_MOVT_ABS:
+ static_cast<Derived *>(this)->handlePlain(atom, ref);
+ break;
case R_ARM_THM_CALL:
case R_ARM_CALL:
case R_ARM_JUMP24:
case R_ARM_THM_JUMP24:
case R_ARM_THM_JUMP11:
- static_cast<Derived *>(this)->handleIFUNC(atom, ref);
+ static_cast<Derived *>(this)->handlePlain(atom, ref);
static_cast<Derived *>(this)->handleVeneer(atom, ref);
break;
case R_ARM_TLS_IE32:
@@ -666,6 +668,11 @@ public:
ARMStaticRelocationPass(const elf::ARMLinkingContext &ctx)
: ARMRelocationPass(ctx) {}
+ /// \brief Handle ordinary relocation references.
+ std::error_code handlePlain(const DefinedAtom &atom, const Reference &ref) {
+ return handleIFUNC(atom, ref);
+ }
+
/// \brief Get the veneer for ARM B/BL instructions.
const VeneerAtom *getVeneer_ARM_B_BL(const DefinedAtom *da,
StringRef secName) {
@@ -728,6 +735,11 @@ public:
ARMDynamicRelocationPass(const elf::ARMLinkingContext &ctx)
: ARMRelocationPass(ctx) {}
+ /// \brief Handle ordinary relocation references.
+ std::error_code handlePlain(const DefinedAtom &atom, const Reference &ref) {
+ return handleIFUNC(atom, ref);
+ }
+
/// \brief Get the veneer for ARM B/BL instructions.
const VeneerAtom *getVeneer_ARM_B_BL(const DefinedAtom *da,
StringRef secName) {
More information about the llvm-commits
mailing list