This is the mail archive of the
mailing list for the binutils project.
Re: RFC: x86: Enable -z separate-code by default
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 19 Feb 2018 15:22:16 +0100
- Subject: Re: RFC: x86: Enable -z separate-code by default
- Authentication-results: sourceware.org; auth=none
- References: <20180219131555.GA22753@gmail.com> <email@example.com> <CAMe9rOqpKXZNG7=iWy8pifd2LHmL-dxcohcYnmybiu_Lm4PrTA@mail.gmail.com>
On 02/19/2018 03:15 PM, H.J. Lu wrote:
On Mon, Feb 19, 2018 at 5:37 AM, Florian Weimer <firstname.lastname@example.org> 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.
Surely this change *reduces* the effectiveness of the page cache because
the file is larger.
For the other caches, wouldn't it be possible to achieve the same effect
by aligning section boundaries to the cache line size?