audk/BaseTools/Source/C/GenFw
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
..
Elf32Convert.c BaseTools/GenFw: move PE/COFF header closer to payload 2015-07-27 13:50:09 +00:00
Elf32Convert.h License header updated to match correct format. 2014-08-28 13:53:34 +00:00
Elf64Convert.c BaseTools/GenFw: move PE/COFF header closer to payload 2015-07-27 13:50:09 +00:00
Elf64Convert.h License header updated to match correct format. 2014-08-28 13:53:34 +00:00
ElfConvert.c BaseTools: Update GenFw to support 4K alignment. 2015-06-29 03:17:34 +00:00
ElfConvert.h BaseTools: Update GenFw to support 4K alignment. 2015-06-29 03:17:34 +00:00
GNUmakefile Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
GenFw.c License header updated to match correct format. 2014-08-28 13:53:34 +00:00
GenFw.h License header updated to match correct format. 2014-08-28 13:53:34 +00:00
Makefile Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
elf32.h Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
elf64.h Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
elf_common.h Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00