[lld] r282118 - Once more unto the strict weak ordering, once more.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 08:02:26 PDT 2016


On 22 September 2016 at 09:40, Eugene Leviant <evgeny.leviant at gmail.com> wrote:
>> Do you have an example?
>
> PHDRS { kernel  PT_LOAD; }
>
> SECTIONS {
>   .rwx : { *(.rwx) } : kernel
>   .ro : { *(.ro) } : kernel
> }
>
> If you place any ro orphan section to the beginning of the list,
> you'll create extra PT_LOAD. In my case you'll get unbootable kernel
> :-)
>
>
> I'm pretty sure (although I can't prove that) that putting orphan
> section after the last scripted section with compatible attributes
> will do a better job.

I see. Right now we put the orphan section it the first position such
that they compare less than the section that follows.

You suggestion in to put them in the last position such that they
don't compare less than the section that precedes them, is that
correct?

Cheers,
Rafael


More information about the llvm-commits mailing list