diff options
author | Ray Ni <ray.ni@intel.com> | 2021-06-29 11:07:51 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-30 07:12:54 +0000 |
commit | 3cde0d553d9324a3681b65f9d9a2a8691af26840 (patch) | |
tree | e68c5a8e316807e709eea2fd0250945c7f1ba7f9 /UefiPayloadPkg | |
parent | 939ed3a59223f516e5168577ba61ee3baf98eeea (diff) | |
download | edk2-3cde0d553d9324a3681b65f9d9a2a8691af26840.zip edk2-3cde0d553d9324a3681b65f9d9a2a8691af26840.tar.gz edk2-3cde0d553d9324a3681b65f9d9a2a8691af26840.tar.bz2 |
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>
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r-- | UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 1 | ||||
-rw-r--r-- | UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c index dd27d3c..780f2d9 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c @@ -164,7 +164,6 @@ ProcessRelocation32 ( // Calculation: B + A
//
if (RelaType == SHT_RELA) {
- ASSERT (*Ptr == 0);
*Ptr = (UINT32) Delta + Rela->r_addend;
} else {
//
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c index 3f4f129..0f1b06e 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf64Lib.c @@ -173,7 +173,6 @@ ProcessRelocation64 ( // Calculation: B + A
//
if (RelaType == SHT_RELA) {
- ASSERT (*Ptr == 0);
*Ptr = Delta + Rela->r_addend;
} else {
//
|