Some architecture specific ELF section flags might have the same value (for example SHF_X86_64_LARGE and SHF_HEX_GPREL) and we have to check machine architectures to select an appropriate set of possible flags.
The patch selects architecture specific flags into separate arrays ElfxxxSectionFlags and combines ElfSectionFlags and ElfxxxSectionFlags before pass to the StreamWriter::printFlags() method.
Missing default case I guess?