diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-04-03 22:29:15 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-06 06:52:55 +0000 |
commit | a257988f590ba90dd8394dd6bc7014ae9d814a08 (patch) | |
tree | af2a50ca6c04da259ffa671279c3e325a826bcc5 /UefiCpuPkg | |
parent | 8d185dfb66700e65035d51f149570aeab728c665 (diff) | |
download | edk2-a257988f590ba90dd8394dd6bc7014ae9d814a08.tar.gz edk2-a257988f590ba90dd8394dd6bc7014ae9d814a08.tar.bz2 edk2-a257988f590ba90dd8394dd6bc7014ae9d814a08.zip |
BaseTools/tools_def CLANGDWARF: Permit text relocations
We rely on PIE executables to get the codegen that is suitable for
PE/COFF conversion where the resulting executables can be loaded
anywhere in the address space.
However, ELF linkers may default to disallowing text relocations in PIE
executables, as this would require text segments to be updated at
runtime, which is bad for security and increases the copy-on-write
footprint of ELF executables and shared libraries.
However, none of those concerns apply to PE/COFF executables in the
context of EFI, which are copied into memory rather than mmap()'ed, and
fixed up by the loader before launch.
So pass -z notext to the LLD linker to permit runtime relocations in
read-only sections.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'UefiCpuPkg')
0 files changed, 0 insertions, 0 deletions