2 # RUN: split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
5 ## /DISCARD/ specified by OVERWRITE_SECTIONS can discard sections as well.
7 # RUN: ld.lld %t/overwrite.lds -T %t/main.lds %t/a.o -o %t1 2>&1 | count 0
8 # RUN: llvm-readelf -S -l %t1 | FileCheck %s
9 # RUN: ld.lld %t/overwrite.lds %t/overwrite.lds -T %t/main.lds %t/a.o -o %t1 2>&1 | count 0
10 # RUN: llvm-readelf -S -l %t1 | FileCheck %s
19 .section .data.1,"aw"; .byte 1
20 .section .data.2,"aw"; .byte 2
24 /DISCARD/ : { *(.data.1) }
29 /DISCARD/ : { *(.data.2) }