[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / test / tools / dsymutil / X86 / call-site-entry-reloc.test
blob46e947044ffcaa7b8742e0db631da29220cc3c13
1 Test binaries created with the following commands:
3 $ cat call.c
4 __attribute__((noinline, noreturn)) void foo() {
5     asm volatile("" ::: "memory");
6       __builtin_unreachable();
8 __attribute__((noinline)) void bar() {
9     asm volatile("nop" :::);
10       foo();
13 int main() { bar(); }
15 $ clang -g call.c -fomit-frame-pointer -c -Os -o call.o
16 $ clang -g call.o -o call
18 The test requires the return PC to match a relocation (in this case the
19 DW_AT_high_pc of main). Without this change the value would get relocated
20 twice.
22 RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_return_pc/call -o %t.dSYM
23 RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_return_pc
25 CHECK: DW_AT_call_return_pc  (0x0000000100000f72)
26 CHECK: DW_AT_call_return_pc  (0x0000000100000f78)