[BOLT][DWARF] Fix high pc patching
authorVladislav Khmelevsky <och95@yandex.ru>
Fri, 14 Jan 2022 22:03:42 +0000 (01:03 +0300)
committerVladislav Khmelevsky <och95@yandex.ru>
Fri, 14 Jan 2022 22:05:16 +0000 (01:05 +0300)
commitfb3b86fedc991facd1fcfe25ac86985959a9b647
tree796e13e63239a37f1e62009826daed691042b3aa
parent650fc40b6d8d9a5869b4fca525d5f237b0ee2803
[BOLT][DWARF] Fix high pc patching

The DW_FORM_addr form of highPC address is written in absolute addres,
the data form is written in offset-from-low pc format.

Due to the large test binary the test is prepared separately in
https://github.com/rafaelauler/bolt-tests/pull/8

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

Reviewed By: ayermolo

Differential Revision: https://reviews.llvm.org/D117217
bolt/lib/Rewrite/DWARFRewriter.cpp