1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux /dev/null -o %t.o
3# RUN: ld.lld %t.o --script %s -o %t1
4# RUN: llvm-readobj --symbols %t1 | FileCheck %s
5
6## We had a bug when LLD increased the size of the output section even
7## if it was empty. That happened because of empty synthetic sections included.
8## Here we check that size of empty output section is zero.
9
10# CHECK:       Name: foo
11# CHECK-NEXT:  Value: 0x0
12
13SECTIONS {
14  . = 0x1000;
15  .bss : { *(.bss*) *(COMMON) }
16  foo = SIZEOF(.bss);
17}
18