1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3# RUN: echo "SECTIONS { \
4# RUN:  .foo : ONLY_IF_RO { *(.foo) } \
5# RUN:  .bar : {bar1 = .; *(.bar) } }" > %t1.script
6# RUN: ld.lld -o %t1 --script %t1.script %t
7# RUN: llvm-readobj --symbols %t1 | FileCheck %s
8
9# CHECK: Name: bar1
10
11.global _start
12_start:
13  nop
14
15.section .bar, "aw"
16bar:
17 .long 1
18
19.section .foo, "aw"
20 .long 0
21