edk2/BaseTools/Source/C
Ard Biesheuvel 02a5421f57 BaseTools/GenFw: move PE/COFF header closer to payload
The secondary header (not the DOS header) of a PE/COFF binary
does not reside at a fixed offset. Instead, its offset into the
file is recorded in the DOS header.

This gives us the flexibility to move it, along with the section
headers, to right before the first section if there is considerable
space before it, i.e., when the PE/COFF file alignment is substantially
larger than the size of the header.

Since the PE/COFF to TE conversion replaces everything before the
section headers with a simple TE header, this change removes all
the header padding from such images, leading to smaller files.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18078 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 13:50:09 +00:00
..
BootSectImage BootSectImage.exe, EfiLdrImage.exe and Split.exe tools have incorrect output from the --version option. 2014-08-25 20:06:55 +00:00
Common BaseTools/Common: fix heap overrun in ReadMemoryFileLine () 2015-07-26 08:03:15 +00:00
EfiLdrImage License header updated to match correct format. 2014-08-28 13:53:34 +00:00
EfiRom License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenBootSector License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenCrc32 License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenFfs License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenFv BaseTools: Fix build on FreeBSD and allow use of non-gcc system compiler 2015-07-08 01:06:25 +00:00
GenFw BaseTools/GenFw: move PE/COFF header closer to payload 2015-07-27 13:50:09 +00:00
GenPage License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenSec License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenVtf License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GnuGenBootSector License header updated to match correct format. 2014-08-28 13:53:34 +00:00
Include BaseTools: Add missing EfiPersistentMemory to EFI_MEMORY_TYPE 2015-07-01 15:21:03 +00:00
LzmaCompress BaseTools: Fix build on FreeBSD and allow use of non-gcc system compiler 2015-07-08 01:06:25 +00:00
Makefiles BaseTools: Fix build on FreeBSD and allow use of non-gcc system compiler 2015-07-08 01:06:25 +00:00
PyEfiCompressor License header updated to match correct format. 2014-08-28 13:53:34 +00:00
PyUtility License header updated to match correct format. 2014-08-28 13:53:34 +00:00
Split BootSectImage.exe, EfiLdrImage.exe and Split.exe tools have incorrect output from the --version option. 2014-08-25 20:06:55 +00:00
TianoCompress License header updated to match correct format. 2014-08-28 13:53:34 +00:00
VfrCompile BaseTools: Fix build on FreeBSD and allow use of non-gcc system compiler 2015-07-08 01:06:25 +00:00
VolInfo License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GNUmakefile Sync BaseTool trunk (version r2670) into EDKII BaseTools. 2014-07-01 07:10:10 +00:00
Makefile Fix nmake cleanall bugs. 2014-08-25 05:00:34 +00:00