[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 08:20:49 PDT 2016
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
More information about the llvm-commits
mailing list