summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputSection.h')
-rw-r--r--lld/ELF/InputSection.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h
index 23e3a547ebb..ad63e16f69c 100644
--- a/lld/ELF/InputSection.h
+++ b/lld/ELF/InputSection.h
@@ -42,9 +42,10 @@ public:
// The garbage collector sets sections' Live bits.
// If GC is disabled, all sections are considered live by default.
- InputSectionData(Kind SectionKind, StringRef Name, bool Compressed, bool Live)
+ InputSectionData(Kind SectionKind, StringRef Name, ArrayRef<uint8_t> Data,
+ bool Compressed, bool Live)
: SectionKind(SectionKind), Live(Live), Compressed(Compressed),
- Name(Name) {}
+ Name(Name), Data(Data) {}
private:
unsigned SectionKind : 3;
@@ -61,9 +62,10 @@ public:
StringRef Name;
+ ArrayRef<uint8_t> Data;
+
// If a section is compressed, this has the uncompressed section data.
std::unique_ptr<char[]> UncompressedData;
- size_t UncompressedDataSize = 0;
std::vector<Relocation> Relocations;
};
@@ -84,7 +86,8 @@ protected:
public:
InputSectionBase()
- : InputSectionData(Regular, "", false, false), Repl(this) {}
+ : InputSectionData(Regular, "", ArrayRef<uint8_t>(), false, false),
+ Repl(this) {}
InputSectionBase(ObjectFile<ELFT> *File, const Elf_Shdr *Header,
StringRef Name, Kind SectionKind);
@@ -110,8 +113,6 @@ public:
// section.
uintX_t getOffset(uintX_t Offset) const;
- ArrayRef<uint8_t> getSectionData() const;
-
void uncompress();
void relocate(uint8_t *Buf, uint8_t *BufEnd);
OpenPOWER on IntegriCloud