audk/BaseTools/Scripts
Thomas Palmer 03630a8148 Preserve hii section in GCC binaries
According to UEFI spec:
Once an image is loaded, LoadImage() installs
EFI_HII_PACKAGE_LIST_PROTOCOL on the handle if the image contains a
custom PE/COFF resource with the type 'HII'. The protocol's
interface pointer points to the HII package list which is contained
in the resource's data.

This is controlled by the UEFI_HII_RESOURCE_SECTION define in the INF
file.  When present the HII resource is linked with the module
binary.

Unfortunately GCC-built binaries have been stripping the .hii section
entirely.  See  "[edk2] HII gEfiHiiPackageListProtocolGuid problem
with  GCC48(VS2012x86 works)"
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/13438
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/14899

This patch tells the linker to preserve the .hii sections

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Bruce Cran <bruce.cran@gmail.com>
Reviewed-by: Bruce Cran <bruce.cran@gmail.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2016-07-26 10:21:45 +08:00
..
ConvertMasmToNasm.py BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm files 2016-06-28 13:16:53 -07:00
ConvertUni.py BaseTools/Scripts: Add ConvertUni.py script 2015-12-15 04:50:50 +00:00
GccBase.lds Preserve hii section in GCC binaries 2016-07-26 10:21:45 +08:00
MemoryProfileSymbolGen.py BaseTools MemoryProfileSymbolGen.py: Handle 64bits rva from "nm -l xxx.dll" 2016-07-05 17:25:38 +08:00
PatchCheck.py BaseTools PatchCheck.py: Support binary diff 2015-12-03 08:18:00 +00:00
Rvct-Align4K.sct BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
Rvct-Align32.sct BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
SetVisualStudio.bat BaseTools: Update Scripts to support VS2015 env 2015-12-22 01:01:54 +00:00
ShowEnvironment.bat BaseTools: Update Scripts to support VS2015 env 2015-12-22 01:01:54 +00:00
UpdateBuildVersions.py 1. Update UpdateBuildVersion.py; 2015-02-06 03:40:27 +00:00