2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4 # RUN: ld.lld %t.o -o %t
5 # RUN: llvm-readelf -S %t | FileCheck --check-prefix=SEC %s
6 # RUN: llvm-readelf -x .cst8 %t | FileCheck %s
8 # RUN: ld.lld -O0 -r %t.o -o %t1.o
9 # RUN: llvm-readelf -S %t1.o | FileCheck --check-prefix=SEC %s
10 # RUN: llvm-readelf -x .cst8 %t1.o | FileCheck %s
12 ## Check that if we have SHF_MERGE sections with the same name, flags and
13 ## entsize, but different alignments, we combine them with the maximum input
14 ## alignment as the output alignment.
16 # SEC: Name Type {{.*}} Size ES Flg Lk Inf Al
17 # SEC: .cst8 PROGBITS {{.*}} 000018 08 AM 0 0 8
19 # CHECK: [[#%x,]] 01000000 00000000 02000000 00000000
20 # CHECK-NEXT: [[#%x,]] 03000000 00000000
22 .section .cst8,"aM",@progbits,8,unique,0
27 .section .cst8,"aM",@progbits,8,unique,1
32 .section .cst8,"aM",@progbits,8,unique,2