brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.6 KiB · 972d0ae Raw
163 lines · plain
1# Show that multiple CUs can have a single common .debug_abbrev table. This can2# occur due to e.g. LTO.3 4# REQUIRES: x86-registered-target5 6# RUN: llvm-mc --filetype=obj --triple=x86_64-pc-linux %s -o %t.o7# RUN: llvm-symbolizer --obj=%t.o 0 16 --functions=short | FileCheck %s8 9# CHECK:      foo10# CHECK-NEXT: foo.c:1:011 12# CHECK:      bar13# CHECK-NEXT: bar.c:2:014 15.global foo16.type foo,@function17foo:18.Lfunc_begin0:19    .file   1 "." "foo.c"20    .loc    1 1 021    ret22.Lfunc_end0:23 24.global bar25.p2align 4, 0x9026.type bar,@function27bar:28.Lfunc_begin1:29    .file   2 "." "bar.c"30    .loc    2 2 031    ret32.Lfunc_end1:33 34    .section    .debug_str,"MS",@progbits,135.Linfo_string1:36    .asciz  "foo.c"37.Linfo_string2:38    .asciz  "."39.Linfo_string3:40    .asciz  "foo"41.Linfo_string4:42    .asciz  "bar.c"43.Linfo_string5:44    .asciz  "bar"45 46    # Regular .debug_abbrev section with CU and subprogram, but duplicated, with second47    # half reordered slightly, to show that the correct abbrev is being referenced.48    .section    .debug_abbrev,"",@progbits49    .byte   1                       # Abbreviation Code50    .byte   17                      # DW_TAG_compile_unit51    .byte   1                       # DW_CHILDREN_yes52    .byte   3                       # DW_AT_name53    .byte   14                      # DW_FORM_strp54    .byte   16                      # DW_AT_stmt_list55    .byte   23                      # DW_FORM_sec_offset56    .byte   27                      # DW_AT_comp_dir57    .byte   14                      # DW_FORM_strp58    .byte   17                      # DW_AT_low_pc59    .byte   1                       # DW_FORM_addr60    .byte   18                      # DW_AT_high_pc61    .byte   6                       # DW_FORM_data462    .byte   0                       # EOM(1)63    .byte   0                       # EOM(2)64    .byte   2                       # Abbreviation Code65    .byte   46                      # DW_TAG_subprogram66    .byte   0                       # DW_CHILDREN_no67    .byte   17                      # DW_AT_low_pc68    .byte   1                       # DW_FORM_addr69    .byte   18                      # DW_AT_high_pc70    .byte   6                       # DW_FORM_data471    .byte   3                       # DW_AT_name72    .byte   14                      # DW_FORM_strp73    .byte   58                      # DW_AT_decl_file74    .byte   11                      # DW_FORM_data175    .byte   59                      # DW_AT_decl_line76    .byte   11                      # DW_FORM_data177    .byte   63                      # DW_AT_external78    .byte   25                      # DW_FORM_flag_present79    .byte   0                       # EOM(1)80    .byte   0                       # EOM(2)81    # Second-half starts here.82    .byte   3                       # Abbreviation Code83    .byte   17                      # DW_TAG_compile_unit84    .byte   1                       # DW_CHILDREN_yes85    .byte   16                      # DW_AT_stmt_list86    .byte   23                      # DW_FORM_sec_offset87    .byte   27                      # DW_AT_comp_dir88    .byte   14                      # DW_FORM_strp89    .byte   17                      # DW_AT_low_pc90    .byte   1                       # DW_FORM_addr91    .byte   18                      # DW_AT_high_pc92    .byte   6                       # DW_FORM_data493    .byte   3                       # DW_AT_name94    .byte   14                      # DW_FORM_strp95    .byte   0                       # EOM(1)96    .byte   0                       # EOM(2)97    .byte   4                       # Abbreviation Code98    .byte   46                      # DW_TAG_subprogram99    .byte   0                       # DW_CHILDREN_no100    .byte   17                      # DW_AT_low_pc101    .byte   1                       # DW_FORM_addr102    .byte   18                      # DW_AT_high_pc103    .byte   6                       # DW_FORM_data4104    .byte   58                      # DW_AT_decl_file105    .byte   11                      # DW_FORM_data1106    .byte   59                      # DW_AT_decl_line107    .byte   11                      # DW_FORM_data1108    .byte   63                      # DW_AT_external109    .byte   25                      # DW_FORM_flag_present110    .byte   3                       # DW_AT_name111    .byte   14                      # DW_FORM_strp112    .byte   0                       # EOM(1)113    .byte   0                       # EOM(2)114    .byte   0                       # EOM(3)115 116    .section    .debug_info,"",@progbits117    # First CU table.118    .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit119.Ldebug_info_start0:120    .short  4                       # DWARF version number121    .long   .debug_abbrev           # Offset Into Abbrev. Section122    .byte   8                       # Address Size (in bytes)123    .byte   1                       # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit124    .long   .Linfo_string1          # DW_AT_name125    .long   .Lline_table_start0     # DW_AT_stmt_list126    .long   .Linfo_string2          # DW_AT_comp_dir127    .quad   .Lfunc_begin0           # DW_AT_low_pc128    .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc129    .byte   2                       # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram130    .quad   .Lfunc_begin0           # DW_AT_low_pc131    .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc132    .long   .Linfo_string3          # DW_AT_name133    .byte   1                       # DW_AT_decl_file134    .byte   1                       # DW_AT_decl_line135                                        # DW_AT_external136    .byte   0                       # End Of Children Mark137.Ldebug_info_end0:138 139    # Second CU table.140    .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit141.Ldebug_info_start1:142    .short  4                       # DWARF version number143    .long   .debug_abbrev           # Offset Into Abbrev. Section144    .byte   8                       # Address Size (in bytes)145    .byte   3                       # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit146    .long   .Lline_table_start0     # DW_AT_stmt_list147    .long   .Linfo_string2          # DW_AT_comp_dir148    .quad   .Lfunc_begin1           # DW_AT_low_pc149    .long   .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc150    .long   .Linfo_string4          # DW_AT_name151    .byte   4                       # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram152    .quad   .Lfunc_begin1           # DW_AT_low_pc153    .long   .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc154    .byte   1                       # DW_AT_decl_file155    .byte   1                       # DW_AT_decl_line156                                        # DW_AT_external157    .long   .Linfo_string5          # DW_AT_name158    .byte   0                       # End Of Children Mark159.Ldebug_info_end1:160 161    .section    .debug_line,"",@progbits162.Lline_table_start0:163