]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: set 4 KB section alignment for DXE_RUNTIME_DRIVER modules
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 30 Sep 2015 08:53:00 +0000 (08:53 +0000)
committerlersek <lersek@Edk2>
Wed, 30 Sep 2015 08:53:00 +0000 (08:53 +0000)
Increase the section alignment to 4 KB for DXE_RUNTIME_DRIVER modules.
This allows the OS to map them with tightened permissions (i.e., R-X for
.text and RW- for .data). This is a prerequisite for enabling the
EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA (sic)
feature that was introduced in UEFIv2.5.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18564 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc

index 5d651e30cdffac169dc89319a1c785847a023479..77fd21cd59683152bf5ccee5fa41f75817cf26fc 100644 (file)
@@ -44,6 +44,9 @@
   MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG\r
   GCC:*_*_*_CC_FLAGS                   = -mno-mmx -mno-sse\r
 \r
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]\r
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
+\r
 ################################################################################\r
 #\r
 # SKU Identification section - list of all SKU IDs supported by this Platform.\r
index 8c053b887a66ab351c17b2b9c281d64538615fbc..47cc311165d078e4e3938423e0097db17576edb2 100644 (file)
@@ -48,6 +48,9 @@
   GCC:*_*_X64_GENFW_FLAGS   = --keepexceptiontable\r
   INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable\r
 !endif\r
+\r
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]\r
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
   \r
 ################################################################################\r
 #\r
index 024ee81fdc54ca21de87edf2ac90c83ff384916e..44b9c792e12ed805657e8722bd918ae0e00cd69d 100644 (file)
@@ -49,6 +49,9 @@
   INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable\r
 !endif\r
 \r
+[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]\r
+  GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000\r
+\r
 ################################################################################\r
 #\r
 # SKU Identification section - list of all SKU IDs supported by this Platform.\r