2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "SECTIONS { \
4 # RUN: .aaa 0x2000 : { *(.aaa) } \
5 # RUN: .bbb 0x1 ? 0x3000 : 0x4000 : { *(.bbb) } \
6 # RUN: .ccc ALIGN(CONSTANT(MAXPAGESIZE)) + (. & (CONSTANT(MAXPAGESIZE) - 1)) : { *(.ccc) } \
7 # RUN: .ddd 0x5001 : { *(.ddd) } \
9 # RUN: ld.lld %t --script %t.script -o %tout
10 # RUN: llvm-readobj -S %tout | FileCheck %s
13 ## 1) Simple constant as address.
14 ## 2) That something that contains ":" character, like ternary
15 ## operator works as expression.
16 ## 3) That complex expressions work.
17 ## 4) That section alignment still applied to explicitly specified address.
23 #CHECK: Type: SHT_NULL
31 #CHECK: AddressAlignment: 0
37 #CHECK: Type: SHT_PROGBITS
41 #CHECK: Address: 0x2000
42 #CHECK: Offset: 0x1000
46 #CHECK: AddressAlignment: 1
52 #CHECK: Type: SHT_PROGBITS
56 #CHECK: Address: 0x3000
57 #CHECK: Offset: 0x2000
61 #CHECK: AddressAlignment: 1
67 #CHECK: Type: SHT_PROGBITS
71 #CHECK: Address: 0x4008
72 #CHECK: Offset: 0x3008
76 #CHECK: AddressAlignment: 1
82 #CHECK: Type: SHT_PROGBITS
86 #CHECK: Address: 0x5001
87 #CHECK: Offset: 0x4001
91 #CHECK: AddressAlignment: 16