namespace lld {
namespace coff {
-OutputSection::OutputSection(StringRef N, uint32_t SI)
- : Name(N), SectionIndex(SI) {
- memset(&Header, 0, sizeof(Header));
-}
-
void OutputSection::setRVA(uint64_t RVA) {
Header.VirtualAddress = RVA;
for (Chunk *C : Chunks)
// non-overlapping file offsets and RVAs.
class OutputSection {
public:
- OutputSection(StringRef Name, uint32_t SectionIndex);
+ OutputSection(StringRef N, uint32_t SI)
+ : Name(N), SectionIndex(SI), Header({}) {}
void setRVA(uint64_t);
void setFileOffset(uint64_t);
void addChunk(Chunk *C);
void setStringTableOff(uint32_t V) { StringTableOff = V; }
private:
- coff_section Header;
StringRef Name;
uint32_t SectionIndex;
+ coff_section Header;
uint32_t StringTableOff = 0;
std::vector<Chunk *> Chunks;
};