1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3
4# RUN: echo "SECTIONS { \
5# RUN:   . = SIZEOF_HEADERS; \
6# RUN:   .text : { *(.text) } \
7# RUN:   .foo : {foo1 = .;  *(.foo.*) foo2 = .;  *(.bar) foo3 = .;} \
8# RUN: }" > %t.script
9# RUN: ld.lld -o %t1 --script %t.script %t -shared
10# RUN: llvm-readobj --symbols %t1 | FileCheck %s
11
12# CHECK:      Name: foo1
13# CHECK-NEXT: Value: 0x330
14
15# CHECK:      Name: foo2
16# CHECK-NEXT: Value: 0x338
17
18# CHECK:      Name: foo3
19# CHECK-NEXT: Value: 0x33C
20
21.section .foo.1,"a"
22 .long 1
23
24.section .foo.2,"aw"
25 .long 2
26
27 .section .bar,"aw"
28 .long 3
29