[PATCH] D35809: [LTO] Make sure symbol ordering is honoured

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 12:04:16 PDT 2017


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM but I'd do the same for data-sections as well, so that we respect --gc-sections and --symbol-ordering-file for global variables.

Regarding other object formats, function-sections and data-sections have no effect on MachO because of their wacky subsections-via-symbols feature [1], so we only need to think about COFF. And I think this makes sense for COFF for the same reasons that it does for ELF. Feel free to deal with that in a followup, though.

[1]  Or if we do the thing that James suggested in http://lists.llvm.org/pipermail/llvm-dev/2017-March/110763.html we would want to preserve the status quo by setting function-sections and data-sections to true when targeting MachO.


https://reviews.llvm.org/D35809





More information about the llvm-commits mailing list