28 lines · plain
1// RUN: llvm-dwarfdump -debug-info %p/Inputs/dwarfdump-macho-relocs.macho.x86_64.o | FileCheck %s2 3// The dumped file has 2 functions in different sections of the __TEXT segment.4// Check that the addresses are are dumped correctly5 6// Compiled with: clang -x c -g -c -o dwarfdump-macho-relocs.macho.x86_64.o dwarfdump-macho-relocs.test7 8__attribute__((section("__TEXT,__blah")))9int foo() {10 return 42;11}12 13// CHECK: DW_TAG_subprogram14// CHECK-NEXT: DW_AT_low_pc{{.*}}0x000000000000002015// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000002b16// CHECK-NEXT: DW_AT_frame_base17// CHECK-NEXT: DW_AT_name{{.*}}"foo"18 19int main() {20 return foo();21}22 23// CHECK: DW_TAG_subprogram24// CHECK-NEXT: DW_AT_low_pc{{.*}}0x000000000000000025// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000001a26// CHECK-NEXT: DW_AT_frame_base27// CHECK-NEXT: DW_AT_name{{.*}}"main"28