From ef4f3aa3f7e3c28c7f0e1a3c35711f1a85becd71 Mon Sep 17 00:00:00 2001 From: Oliver Smith-Denny Date: Sun, 27 Oct 2024 09:35:30 -0700 Subject: MdePkg: MdeLibs.dsc.inc: Apply StackCheckLibNull to All Module Types Now that the ResetVectors are USER_DEFINED modules, they will not be linked against StackCheckLibNull, which were the only modules causing issues. So, we can now remove the kludge we had before and the requirement for every DSC to include StackCheckLibNull for SEC modules and just apply StackCheckLibNull globally. This also changes every DSC to drop the SEC definition of StackCheckLibNull. Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Oliver Smith-Denny --- MdePkg/MdeLibs.dsc.inc | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'MdePkg') diff --git a/MdePkg/MdeLibs.dsc.inc b/MdePkg/MdeLibs.dsc.inc index 542b5f77f4..19a883d50d 100644 --- a/MdePkg/MdeLibs.dsc.inc +++ b/MdePkg/MdeLibs.dsc.inc @@ -20,6 +20,14 @@ SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf + StackCheckFailureHookLib|MdePkg/Library/StackCheckFailureHookLibNull/StackCheckFailureHookLibNull.inf + +!ifndef CUSTOM_STACK_CHECK_LIB + # If CUSTOM_STACK_CHECK_LIB is set, MdeLibs.dsc.inc will not link StackCheckLibNull and it is expected that the + # DSC being built is providing it's own implementation of StackCheckLib. + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf + +!endif [LibraryClasses.ARM, LibraryClasses.AARCH64] # @@ -30,16 +38,3 @@ # definitions for the intrinsic functions. # NULL|MdePkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf - -# -# Stack Cookies cannot be generically applied to SEC modules because they may not define _ModuleEntryPoint and when we -# link a library in, we have to be able to define the entry point. SEC modules that do define _ModuleEntryPoint can -# apply a library class override to get StackCheckLibNull.inf. -# -# If CUSTOM_STACK_CHECK_LIB is set, MdeLibs.dsc.inc will not link StackCheckLibNull and it is expected that the -# DSC being built is providing it's own implementation of StackCheckLib. -# -[LibraryClasses.common.PEI_CORE, LibraryClasses.common.PEIM, LibraryClasses.common.DXE_CORE, LibraryClasses.common.SMM_CORE, LibraryClasses.common.MM_CORE_STANDALONE, LibraryClasses.common.DXE_DRIVER, LibraryClasses.common.DXE_RUNTIME_DRIVER, LibraryClasses.common.DXE_SMM_DRIVER, LibraryClasses.common.MM_STANDALONE, LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common.UEFI_APPLICATION] -!ifndef CUSTOM_STACK_CHECK_LIB - NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf -!endif -- cgit v1.2.3