summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-03-28 11:31:08 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-03-29 12:47:19 +0000
commitb697a31a8db5f23ed1030f0fea1b56c107ca85a3 (patch)
treefce6a746c8d8c3a1e9790395088a6ee79d42c9b6 /OvmfPkg
parent8f8e4fa3f32e993b7f6feee259d8bd3281c0f067 (diff)
downloadedk2-b697a31a8db5f23ed1030f0fea1b56c107ca85a3.tar.gz
edk2-b697a31a8db5f23ed1030f0fea1b56c107ca85a3.tar.bz2
edk2-b697a31a8db5f23ed1030f0fea1b56c107ca85a3.zip
OvmfPkg: Use Xcode5 version of CpuExceptionHandlerLib for CLANGDWARF
The CLANGDWARF toolchain has the same problem as XCODE5 linking CpuExceptionHandlerLib. So, use the Xcode5SecPeiCpuExceptionHandlerLib.inf when building with the CLANGDWARF toolchain. Since the difference is that the non-Xcode5 version uses `mov` while the Xcode5 version uses `lea`, they can be merged in future with the single version using `lea`. [ardb: the main difference is that the 'mov' instructions result in absolute symbol references, which are necessary because the code in question is copied in memory independently from the code that carries the symbols it refers to. The Xcode5 version has additional runtime handling to fix up the copied code with the correct absolute references.] Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Acked-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/OvmfPkgX64.dsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 4a276e1ec0..b2f3d14cd9 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -297,7 +297,7 @@
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-!if $(TOOL_CHAIN_TAG) == "XCODE5"
+!if $(TOOL_CHAIN_TAG) == "XCODE5" || $(TOOL_CHAIN_TAG) == "CLANGDWARF"
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
!else
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf