Lines Matching refs:SectionBase
34 class SectionBase; variable
51 ArrayRef<std::unique_ptr<SectionBase>> Sections;
54 using iterator = pointee_iterator<const std::unique_ptr<SectionBase> *>;
56 explicit SectionTableRef(ArrayRef<std::unique_ptr<SectionBase>> Secs) in SectionTableRef()
64 Expected<SectionBase *> getSection(uint32_t Index, Twine ErrMsg);
283 void writeSection(const SectionBase *Sec, ArrayRef<uint8_t> Data);
332 void writeShdr(const SectionBase &Sec);
373 bool operator()(const SectionBase *Lhs, const SectionBase *Rhs) const;
376 std::set<const SectionBase *, SectionCompare> Sections;
379 Error checkSection(const SectionBase &Sec);
390 class SectionBase {
415 SectionBase() = default;
416 SectionBase(const SectionBase &) = default;
418 virtual ~SectionBase() = default;
425 function_ref<bool(const SectionBase *)> ToRemove);
431 replaceSectionReferences(const DenseMap<SectionBase *, SectionBase *> &);
440 bool operator()(const SectionBase *Lhs, const SectionBase *Rhs) const { in operator()
464 std::set<const SectionBase *, SectionCompare> Sections;
469 const SectionBase *firstSection() const { in firstSection()
475 void removeSection(const SectionBase *Sec) { Sections.erase(Sec); } in removeSection()
476 void addSection(const SectionBase *Sec) { Sections.insert(Sec); } in addSection()
481 class Section : public SectionBase {
485 SectionBase *LinkSection = nullptr;
494 function_ref<bool(const SectionBase *)> ToRemove) override;
502 class OwnedDataSection : public SectionBase {
525 OwnedDataSection(SectionBase &S, ArrayRef<uint8_t> Data) in OwnedDataSection()
526 : SectionBase(S), Data(std::begin(Data), std::end(Data)) { in OwnedDataSection()
536 class CompressedSection : public SectionBase {
545 CompressedSection(const SectionBase &Sec,
556 static bool classof(const SectionBase *S) { in classof()
561 class DecompressedSection : public SectionBase {
566 : SectionBase(Sec) { in DecompressedSection()
584 class StringTableSection : public SectionBase {
600 static bool classof(const SectionBase *S) { in classof()
634 SectionBase *DefinedIn = nullptr;
649 class SectionIndexSection : public SectionBase {
681 class SymbolTableSection : public SectionBase {
697 void addSymbol(Twine Name, uint8_t Bind, uint8_t Type, SectionBase *DefinedIn,
708 const SectionBase *getStrTab() const { return SymbolNames; } in getStrTab()
715 function_ref<bool(const SectionBase *)> ToRemove) override;
722 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
724 static bool classof(const SectionBase *S) { in classof()
745 class RelocationSectionBase : public SectionBase {
747 SectionBase *SecToApplyRel = nullptr;
750 const SectionBase *getSection() const { return SecToApplyRel; } in getSection()
751 void setSection(SectionBase *Sec) { SecToApplyRel = Sec; } in setSection()
755 static bool classof(const SectionBase *S) { in classof()
790 function_ref<bool(const SectionBase *)> ToRemove) override;
794 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
797 static bool classof(const SectionBase *S) { in classof()
807 class GroupSection : public SectionBase {
812 SmallVector<SectionBase *, 3> GroupMembers;
824 void addMember(SectionBase *Sec) { GroupMembers.push_back(Sec); } in addMember()
831 function_ref<bool(const SectionBase *)> ToRemove) override;
835 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
838 static bool classof(const SectionBase *S) { in classof()
847 static bool classof(const SectionBase *S) { in classof()
856 static bool classof(const SectionBase *S) { in classof()
875 function_ref<bool(const SectionBase *)> ToRemove) override;
877 static bool classof(const SectionBase *S) { in classof()
884 class GnuDebugLinkSection : public SectionBase {
966 Expected<SectionBase &> makeSection(const Elf_Shdr &Shdr);
1019 using SecPtr = std::unique_ptr<SectionBase>;
1025 DenseMap<SectionBase *, std::vector<uint8_t>> UpdatedSections;
1027 static bool sectionIsAlloc(const SectionBase &Sec) { in sectionIsAlloc()
1073 SectionBase *findSection(StringRef Name) { in findSection()
1083 std::function<bool(const SectionBase &)> ToRemove);
1084 Error replaceSections(const DenseMap<SectionBase *, SectionBase *> &FromTo);