During discussion of D18499 was stated:
"Orphan sections are sections present in the input files which are not explicitly placed into the output file by the linker script. We place orphan sections at end of file."
This patch does not really affect D18499 because order of OutputSections in D18499 patch does not make sence anymore (script do all layout stuff).
But this patch changes sorting predicate to place orphans to the end. At least that is needed to keep OutputSections in sync with output to
set Sec->SectionIndex correctly for futher finalization.
Forgot to change the comment.
I think it can be: