1 # RUN: cp %p/Inputs/groups.o %t
2 # RUN: llvm-objcopy --strip-dwo %t
3 # RUN: llvm-readobj --elf-section-groups %t | FileCheck %s
5 // Source code of groups.o:
9 // static constexpr T X = T(1);
10 // T getX() { return X; }
19 // clang -g -gsplit-dwarf -std=c++11 -c groups.cpp -o groups.o
21 // `llvm-objcopy --strip-dwo` strips out dwo sections, as a result, the index of
22 // the symbol table, the indices of the symbols and the indices of the sections
23 // which go after the removed ones will change. Consequently, the fields
24 // Link, Info and the content of .group need to be updated. In the past
25 // `llvm-objcopy --strip-dwo` used to produce invalid binaries with
26 // broken .group section, this test verifies the correctness of
27 // Link, Info and the content of this section.
29 CHECK: Name: .group (179)
30 CHECK-NEXT: Index: 1{{$}}
33 CHECK: .text._ZN1SIiE4getXEv
35 CHECK: Name: .group (179)
36 CHECK-NEXT: Index: 2{{$}}
39 CHECK: .text._ZN1SIdE4getXEv
40 CHECK-NEXT: .rela.text._ZN1SIdE4getXEv