2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
3 # RUN: ld.lld --emit-relocs %t1 -o %t2
4 # RUN: llvm-readobj --sections --section-data -r %t2 | FileCheck %s
6 ## Check if we produce proper relocations when doing merging of SHF_MERGE sections.
10 # CHECK: Name: .strings
11 # CHECK-NEXT: Type: SHT_PROGBITS
13 # CHECK-NEXT: SHF_MERGE
14 # CHECK-NEXT: SHF_STRINGS
16 # CHECK-NEXT: Address:
18 # CHECK-NEXT: Size: 12
21 # CHECK-NEXT: AddressAlignment:
22 # CHECK-NEXT: EntrySize:
23 # CHECK-NEXT: SectionData (
24 # CHECK-NEXT: 0000: 41414100 43434300 42424200 |AAA.CCC.BBB.|
28 # CHECK: Relocations [
29 # CHECK-NEXT: Section {{.*}} .rela.foo {
30 # CHECK-NEXT: 0x201120 R_X86_64_64 .strings 0x0
31 # CHECK-NEXT: 0x201128 R_X86_64_64 .strings 0x8
32 # CHECK-NEXT: 0x201130 R_X86_64_64 .strings 0x8
33 # CHECK-NEXT: 0x201138 R_X86_64_64 .strings 0x4
37 .section .strings,"MS",@progbits,1,unique,10
43 .section .strings,"MS",@progbits,1,unique,20
49 .section .foo,"ax",@progbits