We have a special version of CpuExceptionHandlerLib for XCODE5, whose linker (LLD) does not permit absolute symbol references in read-only sections.
Instead of fixing this up at runtime (which is done by writing the fixed up values to the .text section, which we'd prefer to avoid), pass the appropriate linker switches to allow these absolute relocations. Changes since v2: - pass linker switches to permit absolute relocations in read-only regions, and keep all code in .text Cc: Ni, Ray <ray...@intel.com> Cc: Andrew Fish <af...@apple.com> Cc: "Kinney, Michael D" <michael.d.kin...@intel.com> Cc: "Liu, Zhiguang" <zhiguang....@intel.com> Cc: Rebecca Cran <rebe...@bsdio.com> Cc: Tom Lendacky <thomas.lenda...@amd.com> Ard Biesheuvel (6): BaseTools/tools_def XCODE: Link X64 with -read_only_relocs suppress BaseTools/tools_def CLANGDWARF: Permit text relocations UefiCpuPkg/CpuExceptionHandlerLib: Use single SEC/PEI version UefiCpuPkg/CpuExceptionHandlerLib: Remove needless runtime fixups OvmfPkg: Drop special Xcode5 version of exception handler library UefiCpuPkg/CpuExceptionHandlerLib: Drop special XCODE5 version BaseTools/Conf/tools_def.template | 8 +- OvmfPkg/AmdSev/AmdSevX64.dsc | 4 - OvmfPkg/CloudHv/CloudHvX64.dsc | 4 - OvmfPkg/IntelTdx/IntelTdxX64.dsc | 4 - OvmfPkg/Microvm/MicrovmX64.dsc | 4 - OvmfPkg/OvmfPkgIa32.dsc | 4 - OvmfPkg/OvmfPkgIa32X64.dsc | 4 - OvmfPkg/OvmfPkgX64.dsc | 4 - OvmfPkg/OvmfXen.dsc | 4 - UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf | 2 +- UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf | 2 +- UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf | 2 +- UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmCpuExceptionHandlerLib.inf | 2 +- UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ExceptionHandlerAsm.nasm | 92 ++++++++++++++--- UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandlerAsm.nasm => SecPeiExceptionHandlerAsm.nasm} | 103 +++----------------- UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf | 65 ------------ UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.uni | 18 ---- 17 files changed, 98 insertions(+), 228 deletions(-) rename UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{Xcode5ExceptionHandlerAsm.nasm => SecPeiExceptionHandlerAsm.nasm} (70%) delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf delete mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.uni -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102212): https://edk2.groups.io/g/devel/message/102212 Mute This Topic: https://groups.io/mt/97960759/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-