diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-16 00:16:11 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-07-21 13:32:09 +0200 |
commit | f49513f666ed25d24bdf3a02a1fdb5d18ae081c0 (patch) | |
tree | 050c3888d01be79c80a0838a27bffd7cac412b06 /ShellPkg/Application/Shell/ShellManParser.c | |
parent | 1252a681a67da81bf1304c7ac836f90eab8bb7cb (diff) | |
download | edk2-platforms-f49513f666ed25d24bdf3a02a1fdb5d18ae081c0.tar.xz |
BaseTools/tools_def: switch GCC/X64 to the PIE small model
The ordinary small code model for x86_64 cannot be used in UEFI, since
it assumes the executable is loaded in the first 2 GB of memory.
Therefore, we use the large model instead, which can execute anywhere,
but uses absolute 64-bit wide quantities for all symbol references,
which is costly in terms of code size.
So switch to the PIE small code model, this uses 32-bit relative
references where possible, but does not make any assumptions about the
load address (i.e., all absolute symbol references are 64-bits wide).
Note that, due to the 'protected' visibility pragma introduced in an
earlier patch, there is no need for the EDK2 build system to deal with
GOT related ELF relocation types.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-By: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'ShellPkg/Application/Shell/ShellManParser.c')
0 files changed, 0 insertions, 0 deletions