1 ## Show that llvm-sizes works correctly on a typical ELF input for Berkeley
2 ## format. It also shows that the formatting is correct (including using tabs as
5 # RUN: yaml2obj %s > %t.o
7 # RUN: llvm-size -B %t.o \
8 # RUN: | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
9 # RUN: llvm-size --format=berkeley %t.o \
10 # RUN: | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
12 ## Also show that the default output format is Berkeley.
13 # RUN: llvm-size %t.o \
14 # RUN: | FileCheck %s --match-full-lines --strict-whitespace -DFILE=%t.o --implicit-check-not={{.}}
16 ## text is .text, .eh_frame, .unusual_name_for_code: 2 + 4 + 64 = 70
17 ## data is .data, .init_array, .moar_stuff: 8 + 32 + 128 = 168
20 ## unaccounted for (not affecting total) is .debug_info, .text.but_not_really
21 # CHECK: text data bss dec hex filename
22 # CHECK-NEXT: 70 168 1 239 ef [[FILE]]
33 Flags: [ SHF_ALLOC, SHF_WRITE ]
37 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
39 - Name: .unusual_name_for_code
41 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
49 Flags: [ SHF_ALLOC, SHF_WRITE ]
53 Flags: [ SHF_ALLOC, SHF_WRITE ]
55 - Name: .text.but_not_really
65 Flags: [ SHF_ALLOC, SHF_WRITE ]