Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel
authorAlex Orlov <aorlov@accesssoftek.com>
Thu, 15 Apr 2021 11:06:20 +0000 (15:06 +0400)
committerAlex Orlov <aorlov@accesssoftek.com>
Thu, 15 Apr 2021 11:06:20 +0000 (15:06 +0400)
commit49cbf4cd85a9ae6b53947fb8cf39ccfb56becc57
tree85183eccdeb0d65ae82d411ac478a46ee76f7a0b
parent6adebe3fd2914f1f87e8e984d1bf17639b119a89
Fix bug in .eh_frame/.debug_frame PC offset calculation for DW_EH_PE_pcrel

This fixes the following bugs:
https://bugs.llvm.org/show_bug.cgi?id=27249
https://bugs.llvm.org/show_bug.cgi?id=46414

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D100328
lld/test/ELF/eh-frame-hdr-augmentation.s
llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug_frame_offset.test
llvm/test/tools/llvm-objdump/MachO/eh_frame-arm64.test