diff options
| author | Denis Protivensky <dprotivensky@accesssoftek.com> | 2015-04-10 09:54:10 +0000 | 
|---|---|---|
| committer | Denis Protivensky <dprotivensky@accesssoftek.com> | 2015-04-10 09:54:10 +0000 | 
| commit | b56dff5729d985d80f76d699fbb56e2ce854183e (patch) | |
| tree | f8ce36a63c7daffb0876b4b7f2fe6b73070b619b | |
| parent | 4bf08947a12887ce368a9ec399c26b35ae8137f9 (diff) | |
| download | bcm5719-llvm-b56dff5729d985d80f76d699fbb56e2ce854183e.tar.gz bcm5719-llvm-b56dff5729d985d80f76d699fbb56e2ce854183e.zip  | |
[ARM] Improve veneer handling and introduce handlePlain method
Handle veneers only for call-like relocations.
llvm-svn: 234580
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp b/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp index ebc0dd95033..ea84369f361 100644 --- a/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp @@ -297,12 +297,14 @@ template <class Derived> class ARMRelocationPass : public Pass {      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) {  | 

