OvmfPkg: set 4 KB section alignment for DXE_RUNTIME_DRIVER modules

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
This commit is contained in:
Ard Biesheuvel 2015-09-30 08:53:00 +00:00 committed by lersek
parent abbe4e57f4
commit ddd89cd50d
3 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,9 @@
MSFT:RELEASE_*_*_CC_FLAGS = /D MDEPKG_NDEBUG
GCC:*_*_*_CC_FLAGS = -mno-mmx -mno-sse
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
################################################################################
#
# SKU Identification section - list of all SKU IDs supported by this Platform.

View File

@ -49,6 +49,9 @@
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
################################################################################
#
# SKU Identification section - list of all SKU IDs supported by this Platform.

View File

@ -49,6 +49,9 @@
INTEL:*_*_X64_GENFW_FLAGS = --keepexceptiontable
!endif
[BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
################################################################################
#
# SKU Identification section - list of all SKU IDs supported by this Platform.