X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FGenFw%2FElf64Convert.c;h=54011d75f1ec6c9951071be5b5261a091200e058;hp=c39bdff063ab4cecbd6bb49c16fe32a22e9b5de6;hb=3f0218003141ae38152f5a2520c969445afc721f;hpb=d69e8a7b79bdfb282f35616d3030f02934d6271e diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index c39bdff063..54011d75f1 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -1,7 +1,7 @@ /** @file Elf64 convert solution -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available @@ -376,6 +376,15 @@ ScanSections64 ( } } + // + // Check if mCoffAlignment is larger than MAX_COFF_ALIGNMENT + // + if (mCoffAlignment > MAX_COFF_ALIGNMENT) { + Error (NULL, 0, 3000, "Invalid", "Section alignment is larger than MAX_COFF_ALIGNMENT."); + assert (FALSE); + } + + // // Move the PE/COFF header right before the first section. This will help us // save space when converting to TE.