1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: ld.lld %t.o -o %t.so -shared
4// RUN: llvm-readobj -S --section-data --symbols %t.so | FileCheck %s
5
6// CHECK:      Name: .bar
7// CHECK-NEXT: Type: SHT_PROGBITS
8// CHECK-NEXT: Flags [
9// CHECK-NEXT: ]
10// CHECK-NEXT: Address:
11// CHECK-NEXT: Offset:
12// CHECK-NEXT: Size: 16
13// CHECK-NEXT: Link:
14// CHECK-NEXT: Info:
15// CHECK-NEXT: AddressAlignment:
16// CHECK-NEXT: EntrySize:
17// CHECK-NEXT: SectionData (
18// CHECK-NEXT:   0000: 10020000 00000000 18020000 00000000  |
19// CHECK-NEXT: )
20
21// CHECK:      Name: foo
22// CHECK-NEXT: Value: 0x210
23
24        .section        .foo,"aM",@progbits,4
25        .align  4
26        .global foo
27        .hidden foo
28foo:
29        .long   0x42
30
31        .section .bar
32        .quad foo
33        .quad foo + 8
34