Fixes handling logic for i386/ELF GOTPC relocation
authorKshitij Jain <jkshtj@outlook.com>
Sat, 14 Jan 2023 01:31:43 +0000 (01:31 +0000)
committerKshitij Jain <jkshtj@outlook.com>
Sat, 14 Jan 2023 05:01:49 +0000 (05:01 +0000)
commita3e975d42efa2ec1349c1a3ce203d78bbd7ee10d
tree07dfb69cb75fd591ff3c7f5c9d43a3a0cd337ab0
parent347028a4d8da8aa1ae311c95424999fcd31d98cb
Fixes handling logic for i386/ELF GOTPC relocation

The i386/ELF JITLink backend was not correctly handling the GOTPC relocation
by skipping the in-built addend, which was manifesting itself in the form of
a segmentation fault in the `LF_external_to_absolute_conversion.s` test. This
CR has fixed that issue.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D141746
llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp