[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 14:22:17 PDT 2016


If at all possible I would frame that in terms of the existing comparison
function.

Do you want to give it a try or would be able to test a patch if I wrote
one?

Cheers,
Rafael

On Sep 22, 2016 11:20 AM, "Eugene Leviant" <evgeny.leviant at gmail.com> wrote:

> Yep, for the very first version I'd find last allocatable section with
> same access specifier (R/W/X), and insert orphan section after.
> I think George attempted to do something like this already.
>
> https://reviews.llvm.org/D23352
>
> 2016-09-22 18:02 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160922/baf4640a/attachment.html>


More information about the llvm-commits mailing list