Lines Matching defs:SectionBase

34 class SectionBase;
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)
64 Expected<SectionBase *> getSection(uint32_t Index, Twine ErrMsg);
286 void writeSection(const SectionBase *Sec, ArrayRef<uint8_t> Data);
335 void writeShdr(const SectionBase &Sec);
387 std::vector<const SectionBase *> Sections;
389 Error checkSection(const SectionBase &S) const;
484 void writeSection(const SectionBase &S, ArrayRef<uint8_t> Data);
509 class SectionBase {
534 SectionBase() = default;
535 SectionBase(const SectionBase &) = default;
537 virtual ~SectionBase() = default;
544 function_ref<bool(const SectionBase *)> ToRemove);
550 replaceSectionReferences(const DenseMap<SectionBase *, SectionBase *> &);
562 bool operator()(const SectionBase *Lhs, const SectionBase *Rhs) const {
586 std::set<const SectionBase *, SectionCompare> Sections;
591 const SectionBase *firstSection() const {
597 void removeSection(const SectionBase *Sec) { Sections.erase(Sec); }
598 void addSection(const SectionBase *Sec) { Sections.insert(Sec); }
603 class Section : public SectionBase {
607 SectionBase *LinkSection = nullptr;
617 function_ref<bool(const SectionBase *)> ToRemove) override;
628 class OwnedDataSection : public SectionBase {
651 OwnedDataSection(SectionBase &S, ArrayRef<uint8_t> Data)
652 : SectionBase(S), Data(std::begin(Data), std::end(Data)) {
663 class CompressedSection : public SectionBase {
673 CompressedSection(const SectionBase &Sec,
685 static bool classof(const SectionBase *S) {
690 class DecompressedSection : public SectionBase {
696 : SectionBase(Sec), ChType(Sec.getChType()) {
714 class StringTableSection : public SectionBase {
730 static bool classof(const SectionBase *S) {
764 SectionBase *DefinedIn = nullptr;
779 class SectionIndexSection : public SectionBase {
811 class SymbolTableSection : public SectionBase {
828 void addSymbol(Twine Name, uint8_t Bind, uint8_t Type, SectionBase *DefinedIn,
840 const SectionBase *getStrTab() const { return SymbolNames; }
847 function_ref<bool(const SectionBase *)> ToRemove) override;
854 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
856 static bool classof(const SectionBase *S) {
877 class RelocationSectionBase : public SectionBase {
879 SectionBase *SecToApplyRel = nullptr;
882 const SectionBase *getSection() const { return SecToApplyRel; }
883 void setSection(SectionBase *Sec) { SecToApplyRel = Sec; }
887 static bool classof(const SectionBase *S) {
923 function_ref<bool(const SectionBase *)> ToRemove) override;
927 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
930 static bool classof(const SectionBase *S) {
940 class GroupSection : public SectionBase {
945 SmallVector<SectionBase *, 3> GroupMembers;
960 void addMember(SectionBase *Sec) { GroupMembers.push_back(Sec); }
967 function_ref<bool(const SectionBase *)> ToRemove) override;
971 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
974 ConstRange<SectionBase> members() const {
978 static bool classof(const SectionBase *S) {
987 static bool classof(const SectionBase *S) {
996 static bool classof(const SectionBase *S) {
1015 function_ref<bool(const SectionBase *)> ToRemove) override;
1017 static bool classof(const SectionBase *S) {
1024 class GnuDebugLinkSection : public SectionBase {
1106 Expected<SectionBase &> makeSection(const Elf_Shdr &Shdr);
1159 using SecPtr = std::unique_ptr<SectionBase>;
1165 DenseMap<SectionBase *, std::vector<uint8_t>> UpdatedSections;
1167 static bool sectionIsAlloc(const SectionBase &Sec) {
1215 Error updateSectionData(SectionBase &S, ArrayRef<uint8_t> Data);
1217 SectionBase *findSection(StringRef Name) {
1227 std::function<bool(const SectionBase &)> ToRemove);
1229 Error replaceSections(const DenseMap<SectionBase *, SectionBase *> &FromTo);