2 # RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t1
3 # RUN: ld.lld --emit-relocs %t1 -o %t2
4 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s
6 ## Check lf we produce proper relocations when doing merging of SHF_MERGE sections.
8 ## Check addends of relocations are: 0x0, 0x8, 0x8, 0x4
12 # CHECK-NEXT: Type: SHT_PROGBITS
14 # CHECK-NEXT: SHF_ALLOC
15 # CHECK-NEXT: SHF_EXECINSTR
17 # CHECK-NEXT: Address:
22 # CHECK-NEXT: AddressAlignment:
23 # CHECK-NEXT: EntrySize:
24 # CHECK-NEXT: SectionData (
25 # CHECK-NEXT: 0000: 00000000 08000000 08000000 04000000
29 ## Check that offsets for AAA is 0x0, for BBB is 0x8 and CCC has offset 0x4.
32 # CHECK: Name: .strings
33 # CHECK-NEXT: Type: SHT_PROGBITS
35 # CHECK-NEXT: SHF_MERGE
36 # CHECK-NEXT: SHF_STRINGS
38 # CHECK-NEXT: Address:
43 # CHECK-NEXT: AddressAlignment:
44 # CHECK-NEXT: EntrySize:
45 # CHECK-NEXT: SectionData (
46 # CHECK-NEXT: |AAA.CCC.BBB.|
50 .section .strings,"MS",@progbits,1,unique,10
56 .section .strings,"MS",@progbits,1,unique,20
62 .section .foo,"ax",@progbits