brintos

brintos / llvm-project-archived public Read only

0
0
Text · 884 B · 6a3d16d Raw
25 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/alignof.s -o %t.o3# RUN: ld.lld -o %t --script %s %t.o4# RUN: llvm-readelf -s %t | FileCheck %s5# CHECK:         Value         Size Type   Bind   Vis     Ndx Name6# CHECK:      0000000000000008    0 NOTYPE GLOBAL DEFAULT ABS _aaa7# CHECK-NEXT: 0000000000000010    0 NOTYPE GLOBAL DEFAULT ABS _bbb8# CHECK-NEXT: 0000000000000020    0 NOTYPE GLOBAL DEFAULT ABS _ccc9 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 of20## section that does not exist.21# RUN: echo "SECTIONS { _aaa = ALIGNOF(.foo); }" > %t.script22# RUN: not ld.lld -o /dev/null --script %t.script %t.o 2>&1 \23# RUN:  | FileCheck -check-prefix=ERR %s24# ERR: {{.*}}.script:1: undefined section .foo25