52 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: ld.lld --gdb-index -e main %t.o -o %t4# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s5 6# CHECK: .gdb_index contents:7# CHECK: Address area offset = 0x28, has 1 entries:8# CHECK-NEXT: Low/High address = [0x201120, 0x201121) (Size: 0x1), CU id = 09 10## .debug_ranges contains 2 entries. .Lfunc_end0 is defined in the discarded11## .text.foo. Test we resolve it to a non-zero value, otherwise the address area12## of .gdb_index will not included [.Lfunc_begin1, .Lfunc_end1).13 14.section .text.foo,"aex",@progbits15.Lfunc_begin0:16 ret17.Lfunc_end0:18 19.section .text.bar,"ax",@progbits20.Lfunc_begin1:21 ret22.Lfunc_end1:23 24.section .debug_abbrev,"",@progbits25 .byte 1 # Abbreviation Code26 .byte 17 # DW_TAG_compile_unit27 .byte 0 # DW_CHILDREN_no28 .byte 85 # DW_AT_ranges29 .byte 23 # DW_FORM_sec_offset30 .byte 0 # EOM(1)31 .byte 0 # EOM(2)32 .byte 033 34.section .debug_info,"",@progbits35.Lcu_begin0:36 .long .Lcu_end0 - .Lcu_begin0 - 437 .short 4 # DWARF version number38 .long 0 # Offset Into Abbrev. Section39 .byte 8 # Address Size40.Ldie0:41 .byte 1 # Abbrev [1] DW_TAG_compile_unit42 .long 0 # DW_AT_ranges43.Lcu_end0:44 45.section .debug_ranges,"",@progbits46 .quad .Lfunc_begin047 .quad .Lfunc_end048 .quad .Lfunc_begin149 .quad .Lfunc_end150 .quad 051 .quad 052