This change moves the SHF_LINK_ORDER processing forward and makes it run on InputSectionDescriptions::Sections rather than OutputSections.
- The .ARM.exidx sentinel section is added as an InputSection if there is at least one .ARM.exidx section present. It will be added to the linker script with the other .ARM.exidx sections.
- The sorting of the SHF_LINK_ORDER sections and writing of the sentinel section contents now accounts for the section not always guaranteed last.
- The sorting of the SHF_LINK_ORDER is moved to LinkerScript
- The fabricated linker script commands are moved as far forward as possible
This is a step towards removing the need for the late LinkerScript::synchronize() function. It cannot be removed completely until Thunks are inserted directly into InputSectionDescriptions.
The current implementation of fabricateDefaultCommands() is moved up as far it can be with its current implementation. To move it further up we would need to split out the parts that rely on the program headers.