This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: x86: Enable -z separate-code by default


On Mon, Feb 19, 2018 at 5:37 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 02/19/2018 02:15 PM, H.J. Lu wrote:
>>
>> This patch enables -z separate-code by default for x86.  To reduce
>> x86-64 binary size, set ELF_MAXPAGESIZE to 4KB.
>
>
> What is the reason for doing that?

This avoids loading code pages which also contains data.
This improves cache performance as well as security.

> Wouldn't it need GCC changes as well to be truly effective?

No.  Linker can control the segment layout without GCC help.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]