mirror of https://github.com/acidanthera/audk.git
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:
parent
939ed3a592
commit
3cde0d553d
|
@ -164,7 +164,6 @@ ProcessRelocation32 (
|
||||||
// Calculation: B + A
|
// Calculation: B + A
|
||||||
//
|
//
|
||||||
if (RelaType == SHT_RELA) {
|
if (RelaType == SHT_RELA) {
|
||||||
ASSERT (*Ptr == 0);
|
|
||||||
*Ptr = (UINT32) Delta + Rela->r_addend;
|
*Ptr = (UINT32) Delta + Rela->r_addend;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
|
|
@ -173,7 +173,6 @@ ProcessRelocation64 (
|
||||||
// Calculation: B + A
|
// Calculation: B + A
|
||||||
//
|
//
|
||||||
if (RelaType == SHT_RELA) {
|
if (RelaType == SHT_RELA) {
|
||||||
ASSERT (*Ptr == 0);
|
|
||||||
*Ptr = Delta + Rela->r_addend;
|
*Ptr = Delta + Rela->r_addend;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue