Index: llvm/trunk/include/llvm/Object/ELF.h =================================================================== --- llvm/trunk/include/llvm/Object/ELF.h +++ llvm/trunk/include/llvm/Object/ELF.h @@ -32,7 +32,7 @@ namespace object { StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type); -uint32_t getELFRelrRelocationType(uint32_t Machine); +uint32_t getELFRelativeRelocationType(uint32_t Machine); StringRef getELFSectionTypeName(uint32_t Machine, uint32_t Type); // Subclasses of ELFFile may need this for template instantiation @@ -113,7 +113,7 @@ StringRef getRelocationTypeName(uint32_t Type) const; void getRelocationTypeName(uint32_t Type, SmallVectorImpl &Result) const; - uint32_t getRelrRelocationType() const; + uint32_t getRelativeRelocationType() const; const char *getDynamicTagAsString(unsigned Arch, uint64_t Type) const; const char *getDynamicTagAsString(uint64_t Type) const; @@ -415,8 +415,8 @@ } template -uint32_t ELFFile::getRelrRelocationType() const { - return getELFRelrRelocationType(getHeader()->e_machine); +uint32_t ELFFile::getRelativeRelocationType() const { + return getELFRelativeRelocationType(getHeader()->e_machine); } template Index: llvm/trunk/lib/Object/ELF.cpp =================================================================== --- llvm/trunk/lib/Object/ELF.cpp +++ llvm/trunk/lib/Object/ELF.cpp @@ -154,7 +154,7 @@ #undef ELF_RELOC -uint32_t llvm::object::getELFRelrRelocationType(uint32_t Machine) { +uint32_t llvm::object::getELFRelativeRelocationType(uint32_t Machine) { switch (Machine) { case ELF::EM_X86_64: return ELF::R_X86_64_RELATIVE; @@ -300,7 +300,7 @@ Elf_Rela Rela; Rela.r_info = 0; Rela.r_addend = 0; - Rela.setType(getRelrRelocationType(), false); + Rela.setType(getRelativeRelocationType(), false); std::vector Relocs; // Word type: uint32_t for Elf32, and uint64_t for Elf64. Index: llvm/trunk/lib/XRay/InstrumentationMap.cpp =================================================================== --- llvm/trunk/lib/XRay/InstrumentationMap.cpp +++ llvm/trunk/lib/XRay/InstrumentationMap.cpp @@ -85,22 +85,22 @@ RelocMap Relocs; if (ObjFile.getBinary()->isELF()) { - uint32_t RelrRelocationType = [](object::ObjectFile *ObjFile) { + uint32_t RelativeRelocation = [](object::ObjectFile *ObjFile) { if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else if (const auto *ELFObj = dyn_cast(ObjFile)) - return ELFObj->getELFFile()->getRelrRelocationType(); + return ELFObj->getELFFile()->getRelativeRelocationType(); else return static_cast(0); }(ObjFile.getBinary()); for (const object::SectionRef &Section : Sections) { for (const object::RelocationRef &Reloc : Section.relocations()) { - if (Reloc.getType() != RelrRelocationType) + if (Reloc.getType() != RelativeRelocation) continue; if (auto AddendOrErr = object::ELFRelocationRef(Reloc).getAddend()) Relocs.insert({Reloc.getOffset(), *AddendOrErr});