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 *> &);
561 bool operator()(const SectionBase *Lhs, const SectionBase *Rhs) const {
585 std::set<const SectionBase *, SectionCompare> Sections;
590 const SectionBase *firstSection() const {
596 void removeSection(const SectionBase *Sec) { Sections.erase(Sec); }
597 void addSection(const SectionBase *Sec) { Sections.insert(Sec); }
602 class Section : public SectionBase {
606 SectionBase *LinkSection = nullptr;
616 function_ref<bool(const SectionBase *)> ToRemove) override;
625 class OwnedDataSection : public SectionBase {
648 OwnedDataSection(SectionBase &S, ArrayRef<uint8_t> Data)
649 : SectionBase(S), Data(std::begin(Data), std::end(Data)) {
659 class CompressedSection : public SectionBase {
669 CompressedSection(const SectionBase &Sec,
681 static bool classof(const SectionBase *S) {
686 class DecompressedSection : public SectionBase {
692 : SectionBase(Sec), ChType(Sec.getChType()) {
710 class StringTableSection : public SectionBase {
726 static bool classof(const SectionBase *S) {
760 SectionBase *DefinedIn = nullptr;
775 class SectionIndexSection : public SectionBase {
807 class SymbolTableSection : public SectionBase {
824 void addSymbol(Twine Name, uint8_t Bind, uint8_t Type, SectionBase *DefinedIn,
836 const SectionBase *getStrTab() const { return SymbolNames; }
843 function_ref<bool(const SectionBase *)> ToRemove) override;
850 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
852 static bool classof(const SectionBase *S) {
873 class RelocationSectionBase : public SectionBase {
875 SectionBase *SecToApplyRel = nullptr;
878 const SectionBase *getSection() const { return SecToApplyRel; }
879 void setSection(SectionBase *Sec) { SecToApplyRel = Sec; }
883 static bool classof(const SectionBase *S) {
919 function_ref<bool(const SectionBase *)> ToRemove) override;
923 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
926 static bool classof(const SectionBase *S) {
936 class GroupSection : public SectionBase {
941 SmallVector<SectionBase *, 3> GroupMembers;
956 void addMember(SectionBase *Sec) { GroupMembers.push_back(Sec); }
963 function_ref<bool(const SectionBase *)> ToRemove) override;
967 const DenseMap<SectionBase *, SectionBase *> &FromTo) override;
970 ConstRange<SectionBase> members() const {
974 static bool classof(const SectionBase *S) {
983 static bool classof(const SectionBase *S) {
992 static bool classof(const SectionBase *S) {
1011 function_ref<bool(const SectionBase *)> ToRemove) override;
1013 static bool classof(const SectionBase *S) {
1020 class GnuDebugLinkSection : public SectionBase {
1102 Expected<SectionBase &> makeSection(const Elf_Shdr &Shdr);
1155 using SecPtr = std::unique_ptr<SectionBase>;
1161 DenseMap<SectionBase *, std::vector<uint8_t>> UpdatedSections;
1163 static bool sectionIsAlloc(const SectionBase &Sec) {
1210 SectionBase *findSection(StringRef Name) {
1220 std::function<bool(const SectionBase &)> ToRemove);
1222 Error replaceSections(const DenseMap<SectionBase *, SectionBase *> &FromTo);