diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2015-07-09 08:55:23 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-07-09 08:55:23 +0000 |
commit | 55e96f9c601781b8dc52c40747922f6ca3521f9e (patch) | |
tree | 04f2ffc05f0f2f9ebd6fcb97f100856a7c25100b /MdeModulePkg | |
parent | 1f149f8ca6a0d273b3e28c047d868399c4890d79 (diff) | |
download | edk2-55e96f9c601781b8dc52c40747922f6ca3521f9e.zip edk2-55e96f9c601781b8dc52c40747922f6ca3521f9e.tar.gz edk2-55e96f9c601781b8dc52c40747922f6ca3521f9e.tar.bz2 |
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 'MdeModulePkg')
0 files changed, 0 insertions, 0 deletions