43 lines · plain
1# RUN: yaml2obj %s -o %t.o2# RUN: ld.lld %t.o %t.o -o %t -r3# RUN: llvm-readobj -S %t | FileCheck %s4 5# CHECK: Name: .text.foo6# CHECK: Name: .rela.text.foo7 8## YAML below corresponds to following asm code:9## .section .text,"axG",@progbits,foo,comdat10## .quad bar11## 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] Name14## [ 5] .text15--- !ELF16FileHeader:17 Class: ELFCLASS6418 Data: ELFDATA2LSB19 Type: ET_REL20 Machine: EM_X86_6421Sections:22 - Name: .group23 Type: SHT_GROUP24 Link: .symtab25 Info: foo26 Members:27 - SectionOrType: GRP_COMDAT28 - SectionOrType: .text.foo29 - Name: .text.foo30 Type: SHT_PROGBITS31 Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]32 - Name: .rela.text.foo33 Type: SHT_RELA34 Flags: [ SHF_INFO_LINK ]35 Link: .symtab36 Info: .text.foo37 Relocations:38 - Symbol: foo39 Type: R_X86_64_6440Symbols:41 - Name: foo42 Binding: STB_GLOBAL43