summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorOliver Smith-Denny <osde@microsoft.com>2024-10-27 09:35:30 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-11-13 21:01:46 +0000
commitef4f3aa3f7e3c28c7f0e1a3c35711f1a85becd71 (patch)
treee1f4b0304ae241b9b1ef6ff51f26fb0c6682ed48 /MdePkg
parentfd9e9848ac8ebd349e1fe2c15a46c56566a106c7 (diff)
downloadedk2-ef4f3aa3f7e3c28c7f0e1a3c35711f1a85becd71.tar.gz
edk2-ef4f3aa3f7e3c28c7f0e1a3c35711f1a85becd71.tar.bz2
edk2-ef4f3aa3f7e3c28c7f0e1a3c35711f1a85becd71.zip
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 <osde@linux.microsoft.com>
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/MdeLibs.dsc.inc21
1 files changed, 8 insertions, 13 deletions
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