namespace lld {
namespace coff {
-SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H, uint32_t SI)
- : File(F), Header(H), SectionIndex(SI) {
+SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
+ : File(F), Header(H) {
// Initialize SectionName.
File->getCOFFObj()->getSectionName(Header, SectionName);
// A chunk corresponding a section of an input file.
class SectionChunk : public Chunk {
public:
- SectionChunk(ObjectFile *File, const coff_section *Header,
- uint32_t SectionIndex);
+ SectionChunk(ObjectFile *File, const coff_section *Header);
size_t getSize() const override { return Header->SizeOfRawData; }
void writeTo(uint8_t *Buf) override;
bool hasData() const override;
ObjectFile *File;
const coff_section *Header;
- uint32_t SectionIndex;
StringRef SectionName;
std::vector<Chunk *> AssocChildren;
continue;
if (Sec->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE)
continue;
- auto *C = new (Alloc) SectionChunk(this, Sec, I);
+ auto *C = new (Alloc) SectionChunk(this, Sec);
Chunks.push_back(C);
SparseChunks[I] = C;
}