summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/ELF/Object.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/Object.h')
-rw-r--r--llvm/tools/llvm-objcopy/ELF/Object.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/Object.h b/llvm/tools/llvm-objcopy/ELF/Object.h
index 0953eb7e184..ec400b5ba60 100644
--- a/llvm/tools/llvm-objcopy/ELF/Object.h
+++ b/llvm/tools/llvm-objcopy/ELF/Object.h
@@ -273,7 +273,9 @@ public:
virtual void initialize(SectionTableRef SecTable);
virtual void finalize();
- virtual Error removeSectionReferences(const SectionBase *Sec);
+ // Remove references to these sections. The list of sections must be sorted.
+ virtual Error
+ removeSectionReferences(function_ref<bool(const SectionBase *)> ToRemove);
virtual Error removeSymbols(function_ref<bool(const Symbol &)> ToRemove);
virtual void accept(SectionVisitor &Visitor) const = 0;
virtual void accept(MutableSectionVisitor &Visitor) = 0;
@@ -334,7 +336,8 @@ public:
void accept(SectionVisitor &Visitor) const override;
void accept(MutableSectionVisitor &Visitor) override;
- Error removeSectionReferences(const SectionBase *Sec) override;
+ Error removeSectionReferences(
+ function_ref<bool(const SectionBase *)> ToRemove) override;
void initialize(SectionTableRef SecTable) override;
void finalize() override;
};
@@ -521,7 +524,8 @@ public:
Symbol *getSymbolByIndex(uint32_t Index);
void updateSymbols(function_ref<void(Symbol &)> Callable);
- Error removeSectionReferences(const SectionBase *Sec) override;
+ Error removeSectionReferences(
+ function_ref<bool(const SectionBase *)> ToRemove) override;
void initialize(SectionTableRef SecTable) override;
void finalize() override;
void accept(SectionVisitor &Visitor) const override;
@@ -573,7 +577,8 @@ protected:
RelocSectionWithSymtabBase() = default;
public:
- Error removeSectionReferences(const SectionBase *Sec) override;
+ Error removeSectionReferences(
+ function_ref<bool(const SectionBase *)> ToRemove) override;
void initialize(SectionTableRef SecTable) override;
void finalize() override;
};
OpenPOWER on IntegriCloud