diff options
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/Object.cpp')
-rw-r--r-- | llvm/tools/llvm-objcopy/ELF/Object.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/Object.cpp b/llvm/tools/llvm-objcopy/ELF/Object.cpp index fce6a13..0d4f164 100644 --- a/llvm/tools/llvm-objcopy/ELF/Object.cpp +++ b/llvm/tools/llvm-objcopy/ELF/Object.cpp @@ -893,6 +893,17 @@ Error SymbolTableSection::accept(MutableSectionVisitor &Visitor) { return Visitor.visit(*this); } +StringRef RelocationSectionBase::getNamePrefix() const { + switch (Type) { + case SHT_REL: + return ".rel"; + case SHT_RELA: + return ".rela"; + default: + llvm_unreachable("not a relocation section"); + } +} + Error RelocationSection::removeSectionReferences( bool AllowBrokenLinks, function_ref<bool(const SectionBase *)> ToRemove) { if (ToRemove(Symbols)) { |