RFC: x86: Enable -z separate-code by default
Szabolcs Nagy
szabolcs.nagy@arm.com
Thu Jul 19 13:19:00 GMT 2018
On 22/02/18 17:43, H.J. Lu wrote:
> From 5c7e47ff34a11b412a30c1f644f8a4d46074eb50 Mon Sep 17 00:00:00 2001
> From: "H.J. Lu"<hjl.tools@gmail.com>
> Date: Wed, 14 Feb 2018 04:09:05 -0800
> Subject: [PATCH] ld: Add --enable-separate-code
>
> This patch adds --enable-separate-code to ld configure to turn on
> -z separate-code by default and enables it by default for Linux/x86.
> This avoids mixing code pages with data to improve cache performance
> as well as security.
>
> To reduce x86-64 executable and shared object sizes, the maximum page
> size is reduced from 2MB to 4KB when -z separate-code is turned on by
> default. Note: -z max-page-size= can be used to set the maximum page
> size.
>
> We compared SPEC CPU 2017 performance before and after this change on
> Skylake server. There are no any significant performance changes.
> Everything is mostly below ±1%.
>
this broke static linking because program headers may no longer
be in a load segment (binutils 2.31 produces broken binaries).
i opened
https://sourceware.org/bugzilla/show_bug.cgi?id=23428
More information about the Binutils
mailing list