audk/MdeModulePkg/Core
Ard Biesheuvel 1cf4e9339d MdeModulePkg: DxeCore: fully initialize image context before passing it on
When the DXE core is loaded, it invokes the PeCoffExtraActionLib library
function 'PeCoffLoaderRelocateImageExtraAction' explicitly, which may be
in addition to the same function having been called by the DxeIpl PE/COFF
loader instance.

The ImageContext that DXE core presents to this function is only partially
initialized, which may result in the following output on AArch64 systems:

add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226240
<some intermediate output>
add-symbol-file ..MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll 0x5F226000

This is caused by incorrect data in the ImageContext structure, which means
the start of the .text section is calculated incorrectly. In general, it is
the duty of the caller to present a valid ImageContext structure, so let's
add the missing values before invoking PeCoffLoaderRelocateImageExtraAction().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-03-01 10:15:59 +01:00
..
Dxe MdeModulePkg: DxeCore: fully initialize image context before passing it on 2016-03-01 10:15:59 +01:00
DxeIplPeim MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Pei MdeModulePkg: Update PeiCore dispatcher to handle PEIM and PEI_CORE only 2016-02-29 16:28:56 +08:00
PiSmmCore MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
RuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00