[PATCH] D26889: [ELF] - Implemented -no-rosegment.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 01:50:49 PST 2016


I see. So may be would be better then to do:

+SingleRoRx = Args.hasArg(OPT_no_rosegment); 
at regular place where we read all arguments.

And add:
HasSections = true;
+Config->SingleRoRx = true;
in script .

?

Best regards,
George.
________________________________________
От: Rafael Avila de Espindola <rafael.espindola at gmail.com>
Отправлено: 28 ноября 2016 г. 12:47
Кому: George Rimar
Копия: emaste at freebsd.org; Evgeny Leviant; llvm-commits at lists.llvm.org; reviews+D26889+public+9203b1bdc75081d7 at reviews.llvm.org; ruiu at google.com
Тема: RE: [PATCH] D26889: [ELF] - Implemented -no-rosegment.

George Rimar <grimar at accesssoftek.com> writes:

>>I think you should also change compareSectionsNonScript. We don't have
>>to reorder ro/rx sections. It should use the new config variable and
>>that variable should be set when a linker script has SECTIONS.
>
> There is a little problem with such approach:
> HasSections is set very late, during createFiles(), so not possible to use it earlier. I updated the patch to demonstrate.
> Probably would be better to check both NoRosegment + HasSections and do not introduce that new flag ?

But SingleRoRx is not used early, right. So whatever sets HasSections
can set SingleRoRx too.

Cheers,
Rafael


More information about the llvm-commits mailing list