BaseTools: Update GenFw to support 4K alignment.

Get maximum section alignment from each ELF section, and this alignment is used to create PE header.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17727 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Ard Biesheuvel
2015-06-29 03:17:34 +00:00
committed by yingke
parent bbb6369486
commit 54b1b57a59
4 changed files with 33 additions and 4 deletions

View File

@@ -96,11 +96,11 @@ CoffAddFixup(
mCoffFile = realloc (
mCoffFile,
mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
mCoffOffset + sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
memset (
mCoffFile + mCoffOffset, 0,
sizeof(EFI_IMAGE_BASE_RELOCATION) + 2*0x1000
sizeof(EFI_IMAGE_BASE_RELOCATION) + 2 * MAX_COFF_ALIGNMENT
);
mCoffBaseRel = (EFI_IMAGE_BASE_RELOCATION*)(mCoffFile + mCoffOffset);