grimar added a comment. Main change of this patch which do all logic is class OutputSectionFactory in LinkerScript.cpp. All other changes mostly for moving default factory back to writer and for stop exporting it. https://reviews.llvm.org/D23315