summaryrefslogtreecommitdiff
path: root/OvmfPkg/OvmfPkgX64.fdf
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2015-07-09 08:55:23 +0000
committerlersek <lersek@Edk2>2015-07-09 08:55:23 +0000
commit55e96f9c601781b8dc52c40747922f6ca3521f9e (patch)
tree04f2ffc05f0f2f9ebd6fcb97f100856a7c25100b /OvmfPkg/OvmfPkgX64.fdf
parent1f149f8ca6a0d273b3e28c047d868399c4890d79 (diff)
downloadedk2-platforms-55e96f9c601781b8dc52c40747922f6ca3521f9e.tar.xz
OvmfPkg: Fix GCC49 build hang in PeiCore
PeiCore hang when loads a PEIM whose section alignment requirement is 0x40 but the actual base address is 0x20 aligned. The issue is caused by the following facts, in order: 1. GCC49 requires the section alignment of .data to be 0x40. So a new link script gcc4.9-ld-script was added for GCC49 to specify the 0x40 alignment. 2. GenFw tool was enhanced to sync ELF's section alignment to PE header. Before the enhancement, the section alignment of converted PE image always equals to 0x20. If only with #1 change, GCC49 build image won't hang in PeiCore because the converted PE image still claims 0x20 section alignment which is aligned to the align setting set in FDF file. But later with #2 change, the converted PE image starts to claims 0x40 section alignment, while build tool still puts the PEIM in 0x20 aligned address, resulting the PeCoffLoaderLoadImage() reports IMAGE_ERROR_INVALID_SECTION_ALIGNMENT error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17902 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/OvmfPkgX64.fdf')
-rw-r--r--OvmfPkg/OvmfPkgX64.fdf4
1 files changed, 2 insertions, 2 deletions
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index 11e74e7ed2..f43d3ddc2b 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -389,7 +389,7 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
[Rule.Common.PEI_CORE]
FILE PEI_CORE = $(NAMED_GUID) {
- PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING ="$(MODULE_NAME)" Optional
VERSION STRING ="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}
@@ -397,7 +397,7 @@ FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
[Rule.Common.PEIM]
FILE PEIM = $(NAMED_GUID) {
PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
- PE32 PE32 Align=32 $(INF_OUTPUT)/$(MODULE_NAME).efi
+ PE32 PE32 Align=Auto $(INF_OUTPUT)/$(MODULE_NAME).efi
UI STRING="$(MODULE_NAME)" Optional
VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
}