mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
UefiPayloadPkg: Enhance universal payload build
If there is no relocation in the payload it would build failure. This will fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com>
This commit is contained in:
parent
72b65146bf
commit
c5811ef1b3
@ -266,6 +266,7 @@ def BuildUniversalPayload(Args):
|
|||||||
#
|
#
|
||||||
RelocBinary = b''
|
RelocBinary = b''
|
||||||
PeCoff = pefile.PE (TargetRebaseFile)
|
PeCoff = pefile.PE (TargetRebaseFile)
|
||||||
|
if hasattr(PeCoff, 'DIRECTORY_ENTRY_BASERELOC'):
|
||||||
for reloc in PeCoff.DIRECTORY_ENTRY_BASERELOC:
|
for reloc in PeCoff.DIRECTORY_ENTRY_BASERELOC:
|
||||||
for entry in reloc.entries:
|
for entry in reloc.entries:
|
||||||
if (entry.type == 0):
|
if (entry.type == 0):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user