56 lines · plain
1## Check how llvm-dwarfdump calculates section sizes2## with --show-section-sizes for ELF objects.3 4# RUN: yaml2obj %s | llvm-dwarfdump - --show-section-sizes \5# RUN: | FileCheck %s --match-full-lines --strict-whitespace6 7# CHECK:----------------------------------------------------8# CHECK-NEXT:file: {{.*}}9# CHECK-NEXT:----------------------------------------------------10# CHECK-NEXT:SECTION SIZE (b)11# CHECK-NEXT:--------------- --------12# CHECK-NEXT:.debug_info 17 (1.62%)13# CHECK-NEXT:.debug_line 19 (1.81%)14# CHECK-NEXT:.debug_loc 1 (0.10%)15# CHECK-NEXT:.debug_type 26 (2.48%)16# CHECK-NEXT:.debug_foo 100 (9.54%)17# CHECK-NEXT:.debug_info.dwo 9 (0.86%)18# CHECK-EMPTY:19# CHECK-NEXT: Total Size: 172 (16.41%)20# CHECK-NEXT: Total File Size: 104821# CHECK-NEXT:----------------------------------------------------22 23--- !ELF24FileHeader:25 Class: ELFCLASS6426 Data: ELFDATA2LSB27 Type: ET_REL28 Machine: EM_X86_6429Sections:30 - Name: .debug_info31 Type: SHT_PROGBITS32 Size: 1733 - Name: .debug_line34 Type: SHT_PROGBITS35 Size: 1936 - Name: .debug_loc37 Type: SHT_PROGBITS38 Size: 139 - Name: .debug_type40 Type: SHT_PROGBITS41 Size: 1342 - Name: .debug_type (1)43 Type: SHT_PROGBITS44 Size: 1345 - Name: .debug_foo46 Type: SHT_PROGBITS47 Size: 10048 - Name: .debug_info.dwo49 Type: SHT_PROGBITS50 Size: 951## This is a debug section following the Mach-O naming style, and is used52## to show that such sections are not included in the report.53 - Name: __debug_bar54 Type: SHT_PROGBITS55 Size: 156