1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/align.s -o %t.o
3# RUN: ld.lld -o %t --script %s %t.o
4# RUN: llvm-objdump -t %t | FileCheck %s
5
6# CHECK-LABEL: SYMBOL TABLE:
7# CHECK-NEXT: 0000000000014008 g       .text  0000000000000000 _start
8# CHECK-NEXT: 0000000000010000 g       *ABS*  0000000000000000 __code_base__
9# CHECK-NEXT: 0000000000001000 g       *ABS*  0000000000000000 VAR
10# CHECK-NEXT: 0000000000011000 g       .bbb   0000000000000000 __start_bbb
11# CHECK-NEXT: 0000000000012000 g       .bbb   0000000000000000 __end_bbb
12
13VAR = 0x1000;
14__code_base__ = 0x10000;
15
16SECTIONS {
17  . = __code_base__;
18  .aaa : { *(.aaa) }
19  .bbb : ALIGN(VAR) { *(.bbb) }
20  . = ALIGN(., VAR * 4);
21  .ccc : { *(.ccc) }
22  __start_bbb = ADDR(.bbb);
23  __end_bbb = ALIGN(__start_bbb + SIZEOF(.bbb), VAR);
24}
25