[PATCH] D32612: Remove LinkerScript::flush

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 13:29:30 PDT 2017


On 27 April 2017 at 19:30, Peter Smith via Phabricator
<reviews at reviews.llvm.org> wrote:
> 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.

For SHF_LINK_ORDER this fails, no?

> 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