2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "SECTIONS { \
4 # RUN: .got : { *(.got) *(.got) } \
5 # RUN: .plt : { *(.plt) } \
6 # RUN: .text : { *(.text) } \
8 # RUN: ld.lld -shared -o %t.so --script %t.script %t.o
10 # RUN: llvm-readelf -S %t.so | FileCheck %s
16 # Test that the size of a removed unused synthetic input section is not added
17 # to the output section size. Adding a symbol assignment prevents removal of
18 # the output section, but does not cause the section size to be recomputed.
19 # RUN: echo "SECTIONS { \
20 # RUN: .got.plt : { a_sym = .; *(.got.plt) } \
21 # RUN: }" > %t2.script
22 # RUN: ld.lld -shared -o %t2.so --script %t2.script %t.o
23 # RUN: llvm-objdump --section-headers %t2.so | FileCheck %s --check-prefix=CHECK2
24 # CHECK2: .got.plt 00000000