This is demo of linker script tree representation.
Since SECTION can be:
SECTION {
assignment<>
outputsection<>
assignment<>
...
phds<>
assignment<>
outputsection<>
}This classes hierarchy can keep something like that for parsing.
I took Phdrs command for example. Previously it was not section command, when it seems it should be.
Since you are trying to define a class to represent https://sourceware.org/binutils/docs/ld/Output-Section-Description.html#Output-Section-Description, you want to reflect the structure of the command. So I guess you want to define something like
struct OutputSectionDescription { std::vector<OutputSectionCommand> Commands; std::vector<StringRef> Phdrs; std::vector<uint8_t> Filler; }