diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 19915249c5c70..c4caa01265b5b 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -50,8 +50,6 @@ class SectionBase { Kind kind() const { return (Kind)sectionKind; } - StringRef name; - uint8_t sectionKind : 3; // The next two bit fields are only used by InputSectionBase, but we @@ -62,17 +60,19 @@ class SectionBase { // 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; @@ -95,8 +95,8 @@ class SectionBase { 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) {} };