Page MenuHomePhabricator

Support for 64-bit PC-relative relocations for X86_64
ClosedPublic

Authored by OlegPliss on Sep 19 2019, 5:15 PM.

Details

Summary

ELF files generated for X86_64 targets may contain 64-bit PC-relative relocations. For instance, an exception handler table entry contains the start of exception-throwing frame relative to the start of exception handler. As these two labels belong to different sections, their difference and so the relocation is 64-bit.

An attempt to parse such file, i.e. in DWARFContext::create, results in "failed to compute relocation" error.

The proposed simple and straightforward fix adds support for such relocations to RelocationResolver.cpp.

Diff Detail

Repository
rL LLVM

Event Timeline

OlegPliss created this revision.Sep 19 2019, 5:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 19 2019, 5:15 PM
MaskRay accepted this revision.Sep 19 2019, 6:15 PM
This revision is now accepted and ready to land.Sep 19 2019, 6:15 PM
This revision was automatically updated to reflect the committed changes.