89 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3# RUN: ld.lld --gdb-index %t.o -o %t 2>&1 | count 04# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s5 6# cuIndexAndAttrs of _start:7# attributes << 24 | cuIndex = 48 << 24 | 0 = 0x300000008# cuIndexAndAttrs of foo:9# attributes << 24 | cuIndex = 48 << 24 | 1 = 0x3000000110# CHECK: Symbol table11# CHECK-DAG: String name: _start, CU vector index: 012# CHECK-DAG: String name: foo, CU vector index: 113# CHECK: Constant pool14# CHECK-NEXT: 0(0x0): 0x3000000015# CHECK-NEXT: 1(0x8): 0x3000000116 17.globl _start, foo18_start:19foo:20 21.section .debug_abbrev,"",@progbits22 .byte 1 # Abbreviation Code23 .byte 17 # DW_TAG_compile_unit24 .byte 1 # DW_CHILDREN_yes25 .ascii "\264B" # DW_AT_GNU_pubnames26 .byte 25 # DW_FORM_flag_present27 .byte 0 # EOM(1)28 .byte 0 # EOM(2)29 .byte 2 # Abbreviation Code30 .byte 46 # DW_TAG_subprogram31 .byte 0 # DW_CHILDREN_no32 .byte 3 # DW_AT_name33 .byte 8 # DW_FORM_string34 .byte 0 # EOM(1)35 .byte 0 # EOM(2)36 .byte 037 38.section .debug_info,"",@progbits39.Lcu_begin0:40 .long .Lcu_end0 - .Lcu_begin0 - 441 .short 4 # DWARF version number42 .long 0 # Offset Into Abbrev. Section43 .byte 8 # Address Size44.Ldie0:45 .byte 1 # Abbrev [1] DW_TAG_compile_unit46 .byte 2 # Abbrev [2] DW_TAG_subprogram47 .asciz "_start" # DW_AT_name48 .byte 049 .byte 050.Lcu_end0:51.Lcu_begin1:52 .long .Lcu_end1 - .Lcu_begin1 - 453 .short 4 # DWARF version number54 .long 0 # Offset Into Abbrev. Section55 .byte 8 # Address Size56.Ldie1:57 .byte 1 # Abbrev [1] DW_TAG_compile_unit58 .byte 2 # Abbrev [2] DW_TAG_subprogram59 .asciz "foo" # DW_AT_name60 .byte 061.Lcu_end1:62 63# Swap sets to test the case where pubnames are in a64# different order than the CUs they refer to.65.section .debug_gnu_pubnames,"",@progbits66 # cuIndex: 167 .long .LpubNames_end1 - .LpubNames_begin168.LpubNames_begin1:69 .short 2 # Version70 .long .Lcu_begin1 # CU Offset71 .long .Lcu_end1 - .Lcu_begin172 .long .Ldie1 - .Lcu_begin173 .byte 48 # Attributes: FUNCTION, EXTERNAL74 .asciz "foo" # External Name75 .long 076.LpubNames_end1:77 78 # cuIndex: 079 .long .LpubNames_end0 - .LpubNames_begin080.LpubNames_begin0:81 .short 2 # Version82 .long .Lcu_begin0 # CU Offset83 .long .Lcu_end0 - .Lcu_begin084 .long .Ldie0 - .Lcu_begin085 .byte 48 # Attributes: FUNCTION, EXTERNAL86 .asciz "_start" # External Name87 .long 088.LpubNames_end0:89