This is similar to what was done for InputSection.
With this the various fields are stored in host order and only converted to target order when writing.
My objective is to
- Make OutputSectionBase a class instead of a class template.
- Make InputSectionBase a class
- Merge InputSectionBase and InputSectionData
Specialize the storage, for example, we probably don't need 64 bits for Entsize. This will mean that 32 bit ELFs will be a bit bloated as uintX_t will be replaced with uint64_t, but I don't expect that to be a major problem.
In any case, I think this is already an independent cleanup.
Add a comment saying that these fields correspond to Elf_Shdr members.