summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Workspace/BuildClassObject.py
diff options
context:
space:
mode:
authorRay Ni <ray.ni@intel.com>2021-06-29 05:43:58 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-30 10:12:54 +0300
commit939ed3a59223f516e5168577ba61ee3baf98eeea (patch)
tree748dbfc6ae830ba5273a91657891d20bb3ed9fb6 /BaseTools/Source/Python/Workspace/BuildClassObject.py
parent580b11201ed001f9533c6782ec87d430b1736040 (diff)
downloadedk2-939ed3a59223f516e5168577ba61ee3baf98eeea.tar.xz
UefiPayloadPkg/PayloadLoader: Fix bug in locating relocation section
Per ELF spec, the DT_REL/DT_RELA tag in dynamic section stores the virtual address of the relocation section. But today's code logic treats it as the section offset and finds the relocation section whose offset equals to DT_REL/DT_RELA. The logic can work when the section offset equals to the section virtual address. But when the ELF is generated from the link script that reserves a sizeof(pe_header) in the file beginning, the section offset doesn't equal to section virtual address. Such logic can not find the relocation section. The patch fixes this bug. 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 'BaseTools/Source/Python/Workspace/BuildClassObject.py')
0 files changed, 0 insertions, 0 deletions