1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
3
4# RUN: echo "SECTIONS { .aaa : { *(.aaa.*) } }" > %t1.script
5# RUN: ld.lld -o %t1 --script %t1.script %t1.o
6# RUN: llvm-objdump -s %t1 | FileCheck -check-prefix=NOALIGN %s
7# NOALIGN:      Contents of section .aaa:
8# NOALIGN-NEXT:   01000000 00000000 00000000 00000000
9# NOALIGN-NEXT:   00000000 00000000 00000000 00000000
10# NOALIGN-NEXT:   02000000 00000000 00000000 00000000
11# NOALIGN-NEXT:   00000000 00000000 00000000 00000000
12# NOALIGN-NEXT:   03000000 00000000 00000000 00000000
13# NOALIGN-NEXT:   00000000 00000000 00000000 00000000
14# NOALIGN-NEXT:   00000000 00000000 00000000 00000000
15# NOALIGN-NEXT:   00000000 00000000 00000000 00000000
16# NOALIGN-NEXT:   04000000 00000000
17
18# RUN: echo "SECTIONS { .aaa : SUBALIGN(1) { *(.aaa.*) } }" > %t2.script
19# RUN: ld.lld -o %t2 --script %t2.script %t1.o
20# RUN: llvm-objdump -s %t2 | FileCheck -check-prefix=SUBALIGN %s
21# SUBALIGN: Contents of section .aaa:
22# SUBALIGN:   01000000 00000000 02000000 00000000
23# SUBALIGN:   03000000 00000000 04000000 00000000
24
25.global _start
26_start:
27 nop
28
29.section .aaa.1, "a"
30.align 16
31.quad 1
32
33.section .aaa.2, "a"
34.align 32
35.quad 2
36
37.section .aaa.3, "a"
38.align 64
39.quad 3
40
41.section .aaa.4, "a"
42.align 128
43.quad 4
44