[PATCH] D32612: Remove LinkerScript::flush

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 16:30:38 PDT 2017


peter.smith added a comment.

This looks good to me too.

One thing I observed when writing the code in the initial Thunks submission to insert the Thunks back into the InputSectionDescriptions was that the order of OutputSections::Sections should match the order of InputSectionDescription::Sections (on the assumption that any additional Sections added to OutputSections::Sections were added on the end). If I'm correct I think you may be able to:

- Extract the last InputSectionBase from the last InputSectionDescription
- Find this section in OutputSection::Sections
- From the next section to the end of OutputSection::Sections should be your missing sections.

I may have missed something though.

Looking forward we'll need to make some changes to OutputSections::finalize(), if there are orphan link-order sections (the sentinel .ARM.exidx) for example they will get added to a new InputSectionDescription. The current sort of link order sections will only work on a single InputSectionDescription. When I get back to the office on Tuesday I'll rebase https://reviews.llvm.org/D32233, and my Thunks patches on top of this.


https://reviews.llvm.org/D32612





More information about the llvm-commits mailing list