• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## This checks that the group section is shrunk when its member is removed.
2
3# RUN: yaml2obj %s -o - \
4# RUN:   | llvm-objcopy -R .foo - - \
5# RUN:   | obj2yaml - \
6# RUN:   | FileCheck %s
7
8# CHECK:      - Name: .group
9# CHECK:        Members:
10# CHECK-NEXT:     - SectionOrType:  GRP_COMDAT
11# CHECK-NEXT:     - SectionOrType:  .bar
12# CHECK-NOT:      - SectionOrType:
13
14--- !ELF
15FileHeader:
16  Class:      ELFCLASS64
17  Data:       ELFDATA2LSB
18  Type:       ET_REL
19  Machine:    EM_X86_64
20Sections:
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 ]
34Symbols:
35  - Name:     foo_bar_grp
36    Section:  .group
37