UefiPayloadPkg/PayloadLoader: Remove assertion

For R_386_RELATIVE and R_X86_64_RELATIVE, today's logic assumes that
the content pointed by the Rela->r_offset is 0 but it's not always
TRUE. We observed that linker may set the content to Rela->r_addend.

The patch removes the assertion.
There is no functionality impact for this patch.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
This commit is contained in:
Ray Ni 2021-06-29 11:07:51 +08:00 committed by mergify[bot]
parent 939ed3a592
commit 3cde0d553d
2 changed files with 0 additions and 2 deletions

View File

@ -164,7 +164,6 @@ ProcessRelocation32 (
// Calculation: B + A
//
if (RelaType == SHT_RELA) {
ASSERT (*Ptr == 0);
*Ptr = (UINT32) Delta + Rela->r_addend;
} else {
//

View File

@ -173,7 +173,6 @@ ProcessRelocation64 (
// Calculation: B + A
//
if (RelaType == SHT_RELA) {
ASSERT (*Ptr == 0);
*Ptr = Delta + Rela->r_addend;
} else {
//