diff options
Diffstat (limited to 'include/llvm/Object/RelocVisitor.h')
| -rw-r--r-- | include/llvm/Object/RelocVisitor.h | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h index d5e4258cb0a76..5e0df98d86279 100644 --- a/include/llvm/Object/RelocVisitor.h +++ b/include/llvm/Object/RelocVisitor.h @@ -16,7 +16,6 @@  #ifndef LLVM_OBJECT_RELOCVISITOR_H  #define LLVM_OBJECT_RELOCVISITOR_H -#include "llvm/ADT/StringRef.h"  #include "llvm/Object/COFF.h"  #include "llvm/Object/ELFObjectFile.h"  #include "llvm/Object/MachO.h" @@ -175,6 +174,14 @@ private:          case llvm::ELF::R_ARM_ABS32:            return visitELF_ARM_ABS32(R, Value);          } +      case Triple::lanai: +        switch (RelocType) { +        case llvm::ELF::R_LANAI_32: +          return visitELF_Lanai_32(R, Value); +        default: +          HasError = true; +          return RelocToApply(); +        }        case Triple::mipsel:        case Triple::mips:          switch (RelocType) { @@ -311,6 +318,13 @@ private:      return RelocToApply(Res, 4);    } +  /// Lanai ELF +  RelocToApply visitELF_Lanai_32(RelocationRef R, uint64_t Value) { +    int64_t Addend = getELFAddend(R); +    uint32_t Res = (Value + Addend) & 0xFFFFFFFF; +    return RelocToApply(Res, 4); +  } +    /// MIPS ELF    RelocToApply visitELF_MIPS_32(RelocationRef R, uint64_t Value) {      uint32_t Res = Value & 0xFFFFFFFF; | 
