audk/UefiCpuPkg/Library/CpuExceptionHandlerLib/X64
Ard Biesheuvel e5fcaeb133 UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only
The CPU exception handler library code was rewritten at some point to
populate the vector code templates with absolute references at runtime,
given that the XCODE linker does not permit absolute references in
executable code when creating PIE executables.

This is rather unfortunate, as this prevents us from using strict
permissions on the memory mappings, given that the .text section needs
to be writable at runtime for this arrangement to work.

So let's make this hack XCODE-only, by setting a preprocessor #define
from the command line when using the XCODE toolchain, and only including
the runtime fixup code when the macro is defined.

While at it, rename the Xcode5ExceptionHandlerAsm.nasm source file and
drop the Xcode5 prefix: this code is used by other toolchains too.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2023-04-06 06:52:55 +00:00
..
ArchExceptionHandler.c UefiCpuPkg/CpuExceptionHandlerLib: Code optimization to allow bigger stack 2022-10-08 05:45:22 +00:00
ArchInterruptDefs.h UefiCpuPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
ExceptionHandlerAsm.nasm UefiCpuPkg/CpuExceptionHandlerLib: Make runtime fixups XCODE-only 2023-04-06 06:52:55 +00:00
SecPeiExceptionHandlerAsm.nasm UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version 2023-04-06 06:52:55 +00:00