]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools/tools_def IA32: disable PIE code generation explicitly
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 11 Jun 2018 07:34:52 +0000 (09:34 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 12 Jun 2018 06:08:49 +0000 (08:08 +0200)
commitc25d3905523ae4961bb039b1aba597983f7e3e4e
tree5508afcafae4342c83f3dc3d6da6f352813d3c68
parent051bf6e0af59741116a3f68bce7ed6d79fc801ab
BaseTools/tools_def IA32: disable PIE code generation explicitly

As a security measure, some distros now build their GCC toolchains with
PIE code generation enabled by default, because it is a prerequisite
for ASLR to be enabled when running the executable.

This typically results in slightly larger code, but it also generates
ELF relocations that our tooling cannot deal with, so let's disable it
explicitly when using GCC49 or later for IA32. (Note that this does not
apply to X64: it uses PIE code deliberately in some cases, and our
tooling does deal with the resuling relocations)

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Conf/tools_def.template