diff options
| author | Petr Hosek <phosek@chromium.org> | 2018-12-14 01:37:56 +0000 |
|---|---|---|
| committer | Petr Hosek <phosek@chromium.org> | 2018-12-14 01:37:56 +0000 |
| commit | 493a08248353ea95a310a8a515e69068305e6f6c (patch) | |
| tree | 9853935e8c99030437714262476f3a54c088ab5e /llvm/test | |
| parent | afa75d7843c92a7ac9a194f4b1a2396c03e3efd8 (diff) | |
| download | bcm5719-llvm-493a08248353ea95a310a8a515e69068305e6f6c.tar.gz bcm5719-llvm-493a08248353ea95a310a8a515e69068305e6f6c.zip | |
[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
Diffstat (limited to 'llvm/test')
| -rwxr-xr-x | llvm/test/tools/llvm-xray/X86/Inputs/elf64-pie.bin | bin | 0 -> 465816 bytes | |||
| -rw-r--r-- | llvm/test/tools/llvm-xray/X86/extract-instrmap-pie.ll | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-xray/X86/Inputs/elf64-pie.bin b/llvm/test/tools/llvm-xray/X86/Inputs/elf64-pie.bin Binary files differnew file mode 100755 index 00000000000..ab2745eeba8 --- /dev/null +++ b/llvm/test/tools/llvm-xray/X86/Inputs/elf64-pie.bin diff --git a/llvm/test/tools/llvm-xray/X86/extract-instrmap-pie.ll b/llvm/test/tools/llvm-xray/X86/extract-instrmap-pie.ll new file mode 100644 index 00000000000..987aaf98010 --- /dev/null +++ b/llvm/test/tools/llvm-xray/X86/extract-instrmap-pie.ll @@ -0,0 +1,11 @@ +; This test makes sure we can extract the instrumentation map from an +; XRay-instrumented PIE file. +; +; RUN: llvm-xray extract %S/Inputs/elf64-pie.bin -s | FileCheck %s + +; CHECK: --- +; CHECK-NEXT: - { id: 1, address: 0x00000000000299C0, function: 0x00000000000299C0, kind: function-enter, always-instrument: true, function-name: {{.*foo.*}} } +; CHECK-NEXT: - { id: 1, address: 0x00000000000299D0, function: 0x00000000000299C0, kind: function-exit, always-instrument: true, function-name: {{.*foo.*}} } +; CHECK-NEXT: - { id: 2, address: 0x00000000000299E0, function: 0x00000000000299E0, kind: function-enter, always-instrument: true, function-name: {{.*bar.*}} } +; CHECK-NEXT: - { id: 2, address: 0x00000000000299F6, function: 0x00000000000299E0, kind: function-exit, always-instrument: true, function-name: {{.*bar.*}} } +; CHECK-NEXT: ... |

