Kind kind() const { return (Kind)sectionKind; }
- StringRef name;
-
uint8_t sectionKind : 3;
// The next two bit fields are only used by InputSectionBase, but we
// Set for sections that should not be folded by ICF.
uint8_t keepUnique : 1;
+ uint8_t partition = 1;
+ uint32_t type;
+ StringRef name;
+
// The 1-indexed partition that this section is assigned to by the garbage
// collector, or 0 if this section is dead. Normally there is only one
// partition, so this will either be 0 or 1.
- uint8_t partition = 1;
elf::Partition &getPartition() const;
// These corresponds to the fields in Elf_Shdr.
- uint32_t alignment;
uint64_t flags;
+ uint32_t alignment;
uint32_t entsize;
- uint32_t type;
uint32_t link;
uint32_t info;
constexpr SectionBase(Kind sectionKind, StringRef name, uint64_t flags,
uint32_t entsize, uint32_t alignment, uint32_t type,
uint32_t info, uint32_t link)
- : name(name), sectionKind(sectionKind), bss(false), keepUnique(false),
- alignment(alignment), flags(flags), entsize(entsize), type(type),
+ : sectionKind(sectionKind), bss(false), keepUnique(false), type(type),
+ name(name), flags(flags), alignment(alignment), entsize(entsize),
link(link), info(info) {}
};