[Alignment][NFC] Instructions::getLoadStoreAlignment
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / strip-all-and-remove.test
blob15a6f4f7ccaf7fba30d3ee59e2cd3338cdb80c93
1 # RUN: yaml2obj %s > %t
2 # RUN: cp %t %t1
4 # RUN: llvm-strip --remove-section=.text.bar %t
5 # RUN: llvm-readobj --file-headers --sections --symbols %t | FileCheck %s
7 # RUN: llvm-objcopy --strip-all --remove-section=.text.bar %t1 %t1
8 # RUN: cmp %t %t1
10 !ELF
11 FileHeader:
12   Class:           ELFCLASS64
13   Data:            ELFDATA2LSB
14   Type:            ET_REL
15   Machine:         EM_X86_64
16 Sections:
17   - Name:            .debug_foo
18     Type:            SHT_PROGBITS
19     Content:         "00000000"
20   - Name:            .text
21     Type:            SHT_PROGBITS
22     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
23     AddressAlign:    0x0000000000000010
24     Content:         "00000000"
25   - Name:            .text.bar
26     Type:            SHT_PROGBITS
27     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
28     AddressAlign:    0x0000000000000010
29     Content:         "00000000"
30 Symbols:
31   - Name:    debugfoo
32     Section: .debug_foo
33     Binding:  STB_GLOBAL
34   - Name:    foo
35     Section: .text
36     Binding:  STB_GLOBAL
37   - Name:    bar
38     Section: .text.bar
39     Binding:  STB_GLOBAL
41 # CHECK: SectionHeaderCount: 3
43 # CHECK:     Name: .text
44 # CHECK:     Name: .shstrtab
45 # CHECK-NOT: Name: .text.bar
46 # CHECK-NOT: Name: .debug_foo
47 # CHECK-NOT: Name: .symtab
49 # Check that *only* foo is copied and no debugfoo or textbar
50 # CHECK:      Symbols [
51 # CHECK-NEXT: ]