]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/GenFw: move .debug contents to .data to save space
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 27 Jul 2015 13:49:54 +0000 (13:49 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Mon, 27 Jul 2015 13:49:54 +0000 (13:49 +0000)
commit0192b71ca322265099ca0e75da5b668d69d8667d
treebf4d833a5680416947650a9a801635d3573cabb3
parent299c3aec0fb4f3bd9a4f5e1eae9be83f7702b9a5
BaseTools/GenFw: move .debug contents to .data to save space

In order to reduce the memory footprint of PE/COFF images when
using large values for the PE/COFF section alignment, move the
contents of the .debug section to data, and point the debug data
directory entry to it. This allows us to drop the .debug section
entirely, as well as any associated rounding. Since our .debug
section only contains the filename of the ELF input image, the
penalty of keeping this data in a non-discardable section is
negligible.

Note that the PE/COFF spec v6.3 explicitly mentions that this is
allowed.

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@18077 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/Source/C/GenFw/Elf64Convert.c