[llvm-xray] Support for PIE
authorPetr Hosek <phosek@chromium.org>
Fri, 14 Dec 2018 01:37:56 +0000 (01:37 +0000)
committerPetr Hosek <phosek@chromium.org>
Fri, 14 Dec 2018 01:37:56 +0000 (01:37 +0000)
commit493a08248353ea95a310a8a515e69068305e6f6c
tree9853935e8c99030437714262476f3a54c088ab5e
parentafa75d7843c92a7ac9a194f4b1a2396c03e3efd8
[llvm-xray] Support for PIE

When the instrumented binary is linked as PIE, we need to apply the
relative relocations to sleds. This is handled by the dynamic linker
at runtime, but when processing the file we have to do it ourselves.

Differential Revision: https://reviews.llvm.org/D55542

llvm-svn: 349120
llvm/lib/XRay/InstrumentationMap.cpp
llvm/test/tools/llvm-xray/X86/Inputs/elf64-pie.bin [new file with mode: 0755]
llvm/test/tools/llvm-xray/X86/extract-instrmap-pie.ll [new file with mode: 0644]