1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/alignof.s -o %t 3# RUN: ld.lld -o %t1 --script %s %t 4# RUN: llvm-objdump -t %t1 | FileCheck %s 5# CHECK: SYMBOL TABLE: 6# CHECK: 0000000000000008 *ABS* 00000000 _aaa 7# CHECK-NEXT: 0000000000000010 *ABS* 00000000 _bbb 8# CHECK-NEXT: 0000000000000020 *ABS* 00000000 _ccc 9 10SECTIONS { 11 .aaa : { *(.aaa) } 12 .bbb : { *(.bbb) } 13 .ccc : { *(.ccc) } 14 _aaa = ALIGNOF(.aaa); 15 _bbb = ALIGNOF(.bbb); 16 _ccc = ALIGNOF(.ccc); 17} 18 19## Check that we error out if trying to get alignment of 20## section that does not exist. 21# RUN: echo "SECTIONS { _aaa = ALIGNOF(.foo); }" > %t.script 22# RUN: not ld.lld -o %t1 --script %t.script %t 2>&1 \ 23# RUN: | FileCheck -check-prefix=ERR %s 24# ERR: {{.*}}.script:1: undefined section .foo 25