diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/tools/llvm-objcopy/ELF/Object.h | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/Object.h')
-rw-r--r-- | llvm/tools/llvm-objcopy/ELF/Object.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/Object.h b/llvm/tools/llvm-objcopy/ELF/Object.h index 97702a66bc479..ed89e916b8385 100644 --- a/llvm/tools/llvm-objcopy/ELF/Object.h +++ b/llvm/tools/llvm-objcopy/ELF/Object.h @@ -424,6 +424,8 @@ public: virtual void markSymbols(); virtual void replaceSectionReferences(const DenseMap<SectionBase *, SectionBase *> &); + // Notify the section that it is subject to removal. + virtual void onRemove(); }; class Segment { @@ -799,10 +801,14 @@ public: void accept(SectionVisitor &) const override; void accept(MutableSectionVisitor &Visitor) override; void finalize() override; + Error removeSectionReferences( + bool AllowBrokenLinks, + function_ref<bool(const SectionBase *)> ToRemove) override; Error removeSymbols(function_ref<bool(const Symbol &)> ToRemove) override; void markSymbols() override; void replaceSectionReferences( const DenseMap<SectionBase *, SectionBase *> &FromTo) override; + void onRemove() override; static bool classof(const SectionBase *S) { return S->OriginalType == ELF::SHT_GROUP; @@ -1066,6 +1072,7 @@ public: Ptr->Index = Sections.size(); return *Ptr; } + void addNewSymbolTable(); Segment &addSegment(ArrayRef<uint8_t> Data) { Segments.emplace_back(std::make_unique<Segment>(Data)); return *Segments.back(); |