diff options
Diffstat (limited to 'llvm/tools/llvm-objcopy/Object.h')
-rw-r--r-- | llvm/tools/llvm-objcopy/Object.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/llvm/tools/llvm-objcopy/Object.h b/llvm/tools/llvm-objcopy/Object.h index 42b2733dc1a..e9a4c35d398 100644 --- a/llvm/tools/llvm-objcopy/Object.h +++ b/llvm/tools/llvm-objcopy/Object.h @@ -26,7 +26,6 @@ #include <vector> namespace llvm { -enum class DebugCompressionType; namespace objcopy { class Buffer; @@ -40,7 +39,6 @@ class DynamicRelocationSection; class GnuDebugLinkSection; class GroupSection; class SectionIndexSection; -class CompressedSection; class Segment; class Object; struct Symbol; @@ -88,7 +86,6 @@ public: virtual void visit(const GnuDebugLinkSection &Sec) = 0; virtual void visit(const GroupSection &Sec) = 0; virtual void visit(const SectionIndexSection &Sec) = 0; - virtual void visit(const CompressedSection &Sec) = 0; }; class SectionWriter : public SectionVisitor { @@ -107,7 +104,6 @@ public: virtual void visit(const GnuDebugLinkSection &Sec) override = 0; virtual void visit(const GroupSection &Sec) override = 0; virtual void visit(const SectionIndexSection &Sec) override = 0; - virtual void visit(const CompressedSection &Sec) override = 0; explicit SectionWriter(Buffer &Buf) : Out(Buf) {} }; @@ -126,7 +122,6 @@ public: void visit(const GnuDebugLinkSection &Sec) override; void visit(const GroupSection &Sec) override; void visit(const SectionIndexSection &Sec) override; - void visit(const CompressedSection &Sec) override; explicit ELFSectionWriter(Buffer &Buf) : SectionWriter(Buf) {} }; @@ -144,7 +139,6 @@ public: void visit(const GnuDebugLinkSection &Sec) override; void visit(const GroupSection &Sec) override; void visit(const SectionIndexSection &Sec) override; - void visit(const CompressedSection &Sec) override; explicit BinarySectionWriter(Buffer &Buf) : SectionWriter(Buf) {} }; @@ -252,7 +246,7 @@ public: class SectionBase { public: - std::string Name; + StringRef Name; Segment *ParentSegment = nullptr; uint64_t HeaderOffset; uint64_t OriginalOffset = std::numeric_limits<uint64_t>::max(); @@ -271,9 +265,6 @@ public: uint64_t Type = ELF::SHT_NULL; ArrayRef<uint8_t> OriginalData; - SectionBase() = default; - SectionBase(const SectionBase &) = default; - virtual ~SectionBase() = default; virtual void initialize(SectionTableRef SecTable); @@ -350,7 +341,7 @@ class OwnedDataSection : public SectionBase { public: OwnedDataSection(StringRef SecName, ArrayRef<uint8_t> Data) : Data(std::begin(Data), std::end(Data)) { - Name = SecName.str(); + Name = SecName; Type = ELF::SHT_PROGBITS; Size = Data.size(); OriginalOffset = std::numeric_limits<uint64_t>::max(); @@ -359,20 +350,6 @@ public: void accept(SectionVisitor &Sec) const override; }; -class CompressedSection : public SectionBase { - MAKE_SEC_WRITER_FRIEND - - DebugCompressionType CompressionType; - uint64_t DecompressedSize; - uint64_t DecompressedAlign; - SmallVector<char, 128> CompressedData; - -public: - CompressedSection(const SectionBase &Sec, - DebugCompressionType CompressionType); - void accept(SectionVisitor &Visitor) const override; -}; - // There are two types of string tables that can exist, dynamic and not dynamic. // In the dynamic case the string table is allocated. Changing a dynamic string // table would mean altering virtual addresses and thus the memory image. So |