MdeModulePkg/DxeCore: set ImageContext Handle and ImageRead() fields
Set the ImageContext.Handle and ImageContext.ImageRead() fields so that PeCoffLoaderRelocateImageExtraAction() can invoke PeCoffLoaderGetImageInfo or PeCoffLoaderGetPeHeader if desired to obtain additional metadata. We will use this to create a PeCoffLoaderRelocateImageExtraAction() implementation that applies boot time strict mapping permissions to PE/COFF modules. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -315,6 +315,8 @@ DxeMain (
|
||||
if (Status == EFI_SUCCESS) {
|
||||
ImageContext.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)EntryPoint;
|
||||
}
|
||||
ImageContext.Handle = (VOID *)(UINTN)gDxeCoreLoadedImage->ImageBase;
|
||||
ImageContext.ImageRead = PeCoffLoaderImageReadFromMemory;
|
||||
PeCoffLoaderRelocateImageExtraAction (&ImageContext);
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user