Follow up to d0858bffa11, add missing REQUIRES x86
[llvm-project.git] / llvm / test / tools / llvm-objcopy / ELF / remove-section-in-group.test
blob9e683b9f68c9397f6642bebb3994b13af9368612
1 ## This checks that the group section is shrunk when its member is removed.
3 # RUN: yaml2obj %s -o - \
4 # RUN:   | llvm-objcopy -R .foo - - \
5 # RUN:   | obj2yaml - \
6 # RUN:   | FileCheck %s
8 # CHECK:      - Name: .group
9 # CHECK:        Members:
10 # CHECK-NEXT:     - SectionOrType:  GRP_COMDAT
11 # CHECK-NEXT:     - SectionOrType:  .bar
12 # CHECK-NOT:      - SectionOrType:
14 --- !ELF
15 FileHeader:
16   Class:      ELFCLASS64
17   Data:       ELFDATA2LSB
18   Type:       ET_REL
19   Machine:    EM_X86_64
20 Sections:
21   - Name:     .group
22     Type:     SHT_GROUP
23     Info:     foo_bar_grp
24     Members:
25       - SectionOrType:  GRP_COMDAT
26       - SectionOrType:  .foo
27       - SectionOrType:  .bar
28   - Name:     .foo
29     Type:     SHT_PROGBITS
30     Flags:    [ SHF_ALLOC, SHF_GROUP ]
31   - Name:     .bar
32     Type:     SHT_PROGBITS
33     Flags:    [ SHF_ALLOC, SHF_GROUP ]
34 Symbols:
35   - Name:     foo_bar_grp
36     Section:  .group
37     Binding:  STB_GLOBAL