[lit] Remove LitTestCase
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / remove-section-with-symbol.test
blob949d34cd5e848dd39d31425cff496b0d41615079
1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy -R .test %t %t2
3 # RUN: llvm-readobj --file-headers --symbols %t2 | FileCheck %s
5 !ELF
6 FileHeader:
7   Class:           ELFCLASS64
8   Data:            ELFDATA2LSB
9   Type:            ET_REL
10   Machine:         EM_X86_64
11 Sections:
12   - Name:            .test
13     Type:            SHT_PROGBITS
14     Flags:           [ SHF_ALLOC ]
15   - Name:            .test2
16     Type:            SHT_PROGBITS
17     Flags:           [ SHF_ALLOC ]
18 Symbols:
19   Global:
20     - Name:     test
21       Type:     STT_FUNC
22       Section:  .test
23       Value:    0x1000
24       Size:     4
25     - Name:     test2
26       Type:     STT_FUNC
27       Section:  .test2
28       Value:    0x1000
29       Size:     4
31 # The sections counted here should be .test, .symtab, .strtab, and .shstrtab.
32 # The 5th section is the null section.
33 #CHECK: SectionHeaderCount: 5
35 #CHECK: Symbols [
36 #CHECK-NEXT:  Symbol {
37 #CHECK-NEXT:    Name:
38 #CHECK-NEXT:    Value: 0x0
39 #CHECK-NEXT:    Size: 0
40 #CHECK-NEXT:    Binding: Local
41 #CHECK-NEXT:    Type: None
42 #CHECK-NEXT:    Other: 0
43 #CHECK-NEXT:    Section: Undefined
44 #CHECK-NEXT:  }
45 #CHECK-NEXT:  Symbol {
46 #CHECK-NEXT:    Name: test2
47 #CHECK-NEXT:    Value: 0x1000
48 #CHECK-NEXT:    Size: 4
49 #CHECK-NEXT:    Binding: Global
50 #CHECK-NEXT:    Type: Function
51 #CHECK-NEXT:    Other: 0
52 #CHECK-NEXT:    Section: .test2
53 #CHECK-NEXT:  }
54 #CHECK-NEXT:]