[PATCH 0/6] ld: Add "-z textonly" option to ELF linker

H.J. Lu hjl.tools@gmail.com
Wed Jan 10 13:08:00 GMT 2018


On Tue, Jan 9, 2018 at 8:45 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Jan 10, 2018 at 09:40:19AM +1030, Alan Modra wrote:
>> that means a glibc change is needed (I think).  Can we make ld.so
>> clear out leading and trailing rubbish from PF_X segments for glibc
>> 2.27?
>
> On second thoughts, that's not such a good idea.  If we write to a
> memory page it becomes unshared.  So it seems we must align to
> common-page-size.
>

LOAD segments needs to aligned to max-page-size.  RELRO is
optional, ignore it at run-time won't break programs.

-- 
H.J.



More information about the Binutils mailing list