mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-25 02:37:39 +02:00
ImageTool: Fix ARM image generation
This commit is contained in:
parent
7b210acbc6
commit
373bb081ee
@ -634,7 +634,11 @@ CreateIntermediate (
|
|||||||
++NumRelocs;
|
++NumRelocs;
|
||||||
}
|
}
|
||||||
} else if (mEhdr->e_machine == EM_ARM) {
|
} else if (mEhdr->e_machine == EM_ARM) {
|
||||||
|
if ((ELF_R_TYPE(Rel->r_info) == R_ARM_THM_MOVW_ABS_NC)
|
||||||
|
|| (ELF_R_TYPE(Rel->r_info) == R_ARM_RABS32)
|
||||||
|
|| (ELF_R_TYPE(Rel->r_info) == R_ARM_ABS32)) {
|
||||||
|
++NumRelocs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ typedef struct {
|
|||||||
uint32_t RelocTableSize;
|
uint32_t RelocTableSize;
|
||||||
uint32_t HiiTableSize;
|
uint32_t HiiTableSize;
|
||||||
uint32_t DebugTableSize;
|
uint32_t DebugTableSize;
|
||||||
uint16_t FileAlignment;
|
uint32_t FileAlignment;
|
||||||
} image_tool_pe_emit_context_t;
|
} image_tool_pe_emit_context_t;
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -887,7 +887,7 @@ ToolImageEmitPe (
|
|||||||
memset (&Context, 0, sizeof (Context));
|
memset (&Context, 0, sizeof (Context));
|
||||||
|
|
||||||
Context.Image = Image;
|
Context.Image = Image;
|
||||||
Context.FileAlignment = (uint16_t)Image->SegmentInfo.SegmentAlignment;
|
Context.FileAlignment = Image->SegmentInfo.SegmentAlignment;
|
||||||
|
|
||||||
Result = EmitPeGetHeaderSizes (Image, &Context.HdrInfo);
|
Result = EmitPeGetHeaderSizes (Image, &Context.HdrInfo);
|
||||||
if (!Result) {
|
if (!Result) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user