ImageTool: Explicitly convert IR to XIP for PE emission

This commit is contained in:
Marvin Häuser 2023-04-02 14:38:17 +02:00
parent 0bfa467344
commit d27a576b86

View File

@ -886,8 +886,15 @@ ToolImageEmitPe (
memset (&Context, 0, sizeof (Context));
Context.Image = Image;
// FIXME: Non-XIP is not well-supported right now.
Context.FileAlignment = Image->SegmentInfo.SegmentAlignment;
Result = ImageConvertToXip ((image_tool_image_info_t *)Image);
if (!Result) {
raise ();
return NULL;
}
Context.Image = Image;
Result = EmitPeGetHeaderSizes (Image, &Context.HdrInfo);
if (!Result) {