Reviewed-by: Guo Dong <guo.d...@intel.com>
-----Original Message----- From: Lu, James <james...@intel.com> Sent: Tuesday, July 19, 2022 11:58 PM To: devel@edk2.groups.io Cc: Ni, Ray <ray...@intel.com>; Dong, Guo <guo.d...@intel.com>; Guo, Gua <gua....@intel.com> Subject: RE: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Hi Ray, Any comment on this patch? Thanks, James -----Original Message----- From: Lu, James <james...@intel.com> Sent: Monday, July 11, 2022 1:06 PM To: devel@edk2.groups.io Cc: Lu, James <james...@intel.com>; Ni, Ray <ray...@intel.com>; Dong, Guo <guo.d...@intel.com>; Guo, Gua <gua....@intel.com> Subject: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition From: James Lu <james...@intel.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray...@intel.com> Cc: Guo Dong <guo.d...@intel.com> Cc: Gua Guo <gua....@intel.com> Signed-off-by: James Lu <james...@intel.com> --- UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index b002c4b9cf..cb915e7142 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -292,7 +292,7 @@ RelocateElf32Dynamic ( } } - if (RelaAddress == MAX_UINT64) {+ if (RelaAddress == MAX_UINT32) { ASSERT (RelaCount == 0); ASSERT (RelaEntrySize == 0); ASSERT (RelaSize == 0);-- 2.26.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91608): https://edk2.groups.io/g/devel/message/91608 Mute This Topic: https://groups.io/mt/92303921/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-