41 lines · plain
1## Test binaries created with the following commands:2 3## $ cat call-dwarf5.c4## __attribute__((noinline, noreturn)) void foo() {5## asm volatile("" ::: "memory");6## __builtin_unreachable();7## }8## __attribute__((noinline)) void bar() {9## asm volatile("nop" :::);10## foo();11## }12 13## int main() { bar(); }14 15## $ clang -gdwarf-5 call-dwarf5.c -fomit-frame-pointer -c -Os -o call-dwarf5.o16## $ clang -gdwarf-5 call-dwarf5.o -o call-dwarf517 18## The test requires the return PC to match a relocation (in this case the19## DW_AT_high_pc of main). Without this change the value would get relocated20## twice.21 22#RUN: dsymutil -oso-prepend-path %p/../Inputs -y %s -o %t.dSYM23#RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_return_pc24 25#RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs -y %s -o %t.dSYM26#RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_return_pc27 28#CHECK: DW_AT_call_return_pc (0x0000000100000f72)29#CHECK: DW_AT_call_return_pc (0x0000000100000f78)30 31---32triple: 'x86_64-apple-darwin'33objects:34 - filename: 'call-dwarf5.o'35 timestamp: 167537391236 symbols:37 - { sym: _foo, objAddr: 0x0, binAddr: 0x100000F69, size: 0x2 }38 - { sym: _bar, objAddr: 0x2, binAddr: 0x100000F6B, size: 0x7 }39 - { sym: _main, objAddr: 0x9, binAddr: 0x100000F72, size: 0x6 }40...41