[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / relocation-group.test
blobb0016c64a6734d7fc71099bfdb61be8666c4bf98
1 # RUN: yaml2obj %s -o %t.o
2 # RUN: ld.lld %t.o %t.o -o %t -r
3 # RUN: llvm-readobj -S %t | FileCheck %s
5 # CHECK:     Name: .text.foo
6 # CHECK:     Name: .rela.text.foo
8 ## YAML below corresponds to following asm code:
9 ## .section .text,"axG",@progbits,foo,comdat
10 ## .quad bar
11 ## gas 2.27 does not include .rela.text to group in that case:
12 ## COMDAT group section [    1] `.group' [foo] contains 1 sections:
13 ##   [Index]    Name
14 ##   [    5]   .text
15 --- !ELF
16 FileHeader:
17   Class:           ELFCLASS64
18   Data:            ELFDATA2LSB
19   Type:            ET_REL
20   Machine:         EM_X86_64
21 Sections:
22   - Name:            .group
23     Type:            SHT_GROUP
24     Link:            .symtab
25     Info:            foo
26     Members:
27       - SectionOrType:    GRP_COMDAT
28       - SectionOrType:    .text.foo
29   - Name:            .text.foo
30     Type:            SHT_PROGBITS
31     Flags:           [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]
32   - Name:            .rela.text.foo
33     Type:            SHT_RELA
34     Flags:           [ SHF_INFO_LINK ]
35     Link:            .symtab
36     Info:            .text.foo
37     Relocations:
38       - Symbol:          foo
39         Type:            R_X86_64_64
40 Symbols:
41   - Name:    foo
42     Binding: STB_GLOBAL