]> xenbits.xensource.com Git - ovmf.git/commitdiff
OvmfPkg: Use Xcode5 version of CpuExceptionHandlerLib for CLANGDWARF
authorRebecca Cran <rebecca@bsdio.com>
Tue, 28 Mar 2023 17:31:08 +0000 (11:31 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Mar 2023 12:47:19 +0000 (12:47 +0000)
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>
OvmfPkg/OvmfPkgX64.dsc

index 4a276e1ec0d9d73b4d49ad386bd875718871d809..b2f3d14cd94d5fff3715d86516d2b40aa2989423 100644 (file)
   PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf\r
   PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf\r
   MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf\r
-!if $(TOOL_CHAIN_TAG) == "XCODE5"\r
+!if $(TOOL_CHAIN_TAG) == "XCODE5" || $(TOOL_CHAIN_TAG) == "CLANGDWARF"\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf\r
 !else\r
   CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf\r