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

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 15:14:20 PDT 2016


I'm using a variation of George patch which can handle predefined sections
and it works good for me. Not sure if you can do this with sorting, but
I'll test it. If it works I'll have less things to merge.

пятница, 23 сентября 2016 г. пользователь Rafael Espíndola написал:

> 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
> <javascript:_e(%7B%7D,'cvml','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
>> <javascript:_e(%7B%7D,'cvml','rafael.espindola at gmail.com');>>:
>> > On 22 September 2016 at 09:40, Eugene Leviant <evgeny.leviant at gmail.com
>> <javascript:_e(%7B%7D,'cvml','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/20160923/b658f726/attachment.html>


More information about the llvm-commits mailing list