diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc index 1c356bc8c7..e4bf3ce416 100644 --- a/EmulatorPkg/EmulatorPkg.dsc +++ b/EmulatorPkg/EmulatorPkg.dsc @@ -151,6 +151,8 @@ PpiListLib|EmulatorPkg/Library/SecPpiListLib/SecPpiListLib.inf DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf TimerLib|EmulatorPkg/Library/PeiTimerLib/PeiTimerLib.inf + # StackCheckLib is not linked for SEC modules by default, this package can link it against its SEC modules + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.common.USER_DEFINED, LibraryClasses.common.BASE] DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf @@ -319,13 +321,25 @@ # Emulator, OS WIN application # CLANGPDB is cross OS tool chain. It depends on WIN_HOST_BUILD flag # to build WinHost application. + # + # USER_DEFINED components skip normal NULL lib linking, so we have to link this + # specially here for the libs that have stack guard enabled ## - EmulatorPkg/Win/Host/WinHost.inf + EmulatorPkg/Win/Host/WinHost.inf { + + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf + } !else ## # Emulator, OS POSIX application + # + # USER_DEFINED components skip normal NULL lib linking, so we have to link this + # specially here for the libs that have stack guard enabled ## - EmulatorPkg/Unix/Host/Host.inf + EmulatorPkg/Unix/Host/Host.inf { + + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf + } !endif !endif