195 lines · plain
1# Note: This file is compiled from the following code, for 2# the purpose of creating an overflowed dwo section.3# After being compiled from source, section `.debug_info.dwo`4# is changed to have length (2^32 - 30) Bytes, and added 5# padding with `.fill` directive, so it is likely to 6# overflow when packed with other files.7# 8# clang -g -S -gsplit-dwarf -gdwarf-4 hello.c9#10# #include <stdio.h>11# void hello() {12# printf("hello\n");13# }14 15 .text16 .file "hello.c"17 .globl hello # -- Begin function hello18 .p2align 4, 0x9019 .type hello,@function20hello: # @hello21.Lfunc_begin0:22 .file 1 "/xxxxxx/xxxx/xxxxxxxxxx/xxxxxxxx/hello" "hello.c"23 .loc 1 3 0 # hello.c:3:024 .cfi_startproc25# %bb.0:26 pushq %rbp27 .cfi_def_cfa_offset 1628 .cfi_offset %rbp, -1629 movq %rsp, %rbp30 .cfi_def_cfa_register %rbp31.Ltmp0:32 .loc 1 4 5 prologue_end # hello.c:4:533 movabsq $.L.str, %rdi34 movb $0, %al35 callq printf36 .loc 1 5 1 # hello.c:5:137 popq %rbp38 .cfi_def_cfa %rsp, 839 retq40.Ltmp1:41.Lfunc_end0:42 .size hello, .Lfunc_end0-hello43 .cfi_endproc44 # -- End function45 .type .L.str,@object # @.str46 .section .rodata.str1.1,"aMS",@progbits,147.L.str:48 .asciz "hello\n"49 .size .L.str, 750 51 .section .debug_abbrev,"",@progbits52 .byte 1 # Abbreviation Code53 .byte 17 # DW_TAG_compile_unit54 .byte 0 # DW_CHILDREN_no55 .byte 16 # DW_AT_stmt_list56 .byte 23 # DW_FORM_sec_offset57 .byte 27 # DW_AT_comp_dir58 .byte 14 # DW_FORM_strp59 .ascii "\264B" # DW_AT_GNU_pubnames60 .byte 25 # DW_FORM_flag_present61 .ascii "\260B" # DW_AT_GNU_dwo_name62 .byte 14 # DW_FORM_strp63 .ascii "\261B" # DW_AT_GNU_dwo_id64 .byte 7 # DW_FORM_data865 .byte 17 # DW_AT_low_pc66 .byte 1 # DW_FORM_addr67 .byte 18 # DW_AT_high_pc68 .byte 6 # DW_FORM_data469 .ascii "\263B" # DW_AT_GNU_addr_base70 .byte 23 # DW_FORM_sec_offset71 .byte 0 # EOM(1)72 .byte 0 # EOM(2)73 .byte 0 # EOM(3)74 .section .debug_info,"",@progbits75.Lcu_begin0:76 # .long 4294967295 # 2^32 - 1 #44 # Length of Unit77 .long 44 # Length of Unit78 .short 4 # DWARF version number79 .long .debug_abbrev # Offset Into Abbrev. Section80 .byte 8 # Address Size (in bytes)81 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit82 .long .Lline_table_start0 # DW_AT_stmt_list83 .long .Lskel_string0 # DW_AT_comp_dir84 # DW_AT_GNU_pubnames85 .long .Lskel_string1 # DW_AT_GNU_dwo_name86 .quad -94954012350180462 # DW_AT_GNU_dwo_id87 .quad .Lfunc_begin0 # DW_AT_low_pc88 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc89 .long .Laddr_table_base0 # DW_AT_GNU_addr_base90 # .fill 4294967251 # = 2^32 - 1 - 4491 .section .debug_str,"MS",@progbits,192.Lskel_string0:93 .asciz "/xxxxxx/xxxx/xxxxxxxxxx/xxxxxxxx/hello" # string offset=094.Lskel_string1:95 .asciz "hello.dwo" # string offset=3996 .section .debug_str.dwo,"eMS",@progbits,197.Linfo_string0:98 .asciz "hello" # string offset=099.Linfo_string1:100 .asciz "clang version 11.1.0 (https://github.com/llvm/llvm-project.git 173544ee3d09cdce8665f2097f677c31e1f1a9a1)" # string offset=6101.Linfo_string2:102 .asciz "hello.c" # string offset=111103.Linfo_string3:104 .asciz "hello.dwo" # string offset=119105 .section .debug_str_offsets.dwo,"e",@progbits106 .long 0107 .long 6108 .long 111109 .long 119110 .section .debug_info.dwo,"e",@progbits111 .long 4294967266 # 2^32 - 30 #33 # Length of Unit112 .short 4 # DWARF version number113 .long 0 # Offset Into Abbrev. Section114 .byte 8 # Address Size (in bytes)115 .byte 1 # Abbrev [1] 0xb:0x1a DW_TAG_compile_unit116 .byte 1 # DW_AT_producer117 .short 12 # DW_AT_language118 .byte 2 # DW_AT_name119 .byte 3 # DW_AT_GNU_dwo_name120 .quad -94954012350180462 # DW_AT_GNU_dwo_id121 .byte 2 # Abbrev [2] 0x19:0xb DW_TAG_subprogram122 .byte 0 # DW_AT_low_pc123 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc124 .byte 1 # DW_AT_frame_base125 .byte 86126 .byte 0 # DW_AT_name127 .byte 1 # DW_AT_decl_file128 .byte 3 # DW_AT_decl_line129 # DW_AT_external130 .byte 0 # End Of Children Mark131 .fill 4294967233 # 2^32 - 30 - 33132 .section .debug_abbrev.dwo,"e",@progbits133 .byte 1 # Abbreviation Code134 .byte 17 # DW_TAG_compile_unit135 .byte 1 # DW_CHILDREN_yes136 .byte 37 # DW_AT_producer137 .ascii "\202>" # DW_FORM_GNU_str_index138 .byte 19 # DW_AT_language139 .byte 5 # DW_FORM_data2140 .byte 3 # DW_AT_name141 .ascii "\202>" # DW_FORM_GNU_str_index142 .ascii "\260B" # DW_AT_GNU_dwo_name143 .ascii "\202>" # DW_FORM_GNU_str_index144 .ascii "\261B" # DW_AT_GNU_dwo_id145 .byte 7 # DW_FORM_data8146 .byte 0 # EOM(1)147 .byte 0 # EOM(2)148 .byte 2 # Abbreviation Code149 .byte 46 # DW_TAG_subprogram150 .byte 0 # DW_CHILDREN_no151 .byte 17 # DW_AT_low_pc152 .ascii "\201>" # DW_FORM_GNU_addr_index153 .byte 18 # DW_AT_high_pc154 .byte 6 # DW_FORM_data4155 .byte 64 # DW_AT_frame_base156 .byte 24 # DW_FORM_exprloc157 .byte 3 # DW_AT_name158 .ascii "\202>" # DW_FORM_GNU_str_index159 .byte 58 # DW_AT_decl_file160 .byte 11 # DW_FORM_data1161 .byte 59 # DW_AT_decl_line162 .byte 11 # DW_FORM_data1163 .byte 63 # DW_AT_external164 .byte 25 # DW_FORM_flag_present165 .byte 0 # EOM(1)166 .byte 0 # EOM(2)167 .byte 0 # EOM(3)168 .section .debug_addr,"",@progbits169.Laddr_table_base0:170 .quad .Lfunc_begin0171 .section .debug_gnu_pubnames,"",@progbits172 .long .LpubNames_end0-.LpubNames_begin0 # Length of Public Names Info173.LpubNames_begin0:174 .short 2 # DWARF Version175 .long .Lcu_begin0 # Offset of Compilation Unit Info176 .long 48 # Compilation Unit Length177 .long 25 # DIE offset178 .byte 48 # Attributes: FUNCTION, EXTERNAL179 .asciz "hello" # External Name180 .long 0 # End Mark181.LpubNames_end0:182 .section .debug_gnu_pubtypes,"",@progbits183 .long .LpubTypes_end0-.LpubTypes_begin0 # Length of Public Types Info184.LpubTypes_begin0:185 .short 2 # DWARF Version186 .long .Lcu_begin0 # Offset of Compilation Unit Info187 .long 48 # Compilation Unit Length188 .long 0 # End Mark189.LpubTypes_end0:190 .ident "clang version 11.1.0 (https://github.com/llvm/llvm-project.git 173544ee3d09cdce8665f2097f677c31e1f1a9a1)"191 .section ".note.GNU-stack","",@progbits192 .addrsig193 .addrsig_sym printf194 .section .debug_line,"",@progbits195.Lline_table_start0: