diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf b/StandaloneMmPkg/Core/StandaloneMmCore.inf index d17ff9965b..87bf6e9440 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf @@ -75,3 +75,7 @@ gEfiEventLegacyBootGuid gEfiEventExitBootServicesGuid gEfiEventReadyToBootGuid + +[BuildOptions] + GCC:*_*_*_CC_FLAGS = -fpie + GCC:*_*_*_DLINK_FLAGS = -Wl,-z,text,-Bsymbolic,-pie diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf index 891c292e92..7d6ee4e08e 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntryPoint.inf @@ -48,3 +48,6 @@ gEfiMmPeiMmramMemoryReserveGuid gEfiStandaloneMmNonSecureBufferGuid gEfiArmTfCpuDriverEpDescriptorGuid + +[BuildOptions] + GCC:*_*_*_CC_FLAGS = -fpie