1// REQUIRES: x86
2// RUN: mkdir -p %t.dir
3// RUN: cd %t.dir
4// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
5// RUN: ld.lld %t.o -o t.so -shared -version-script %p/Inputs/empty-ver.ver
6// RUN: llvm-readobj -S --section-data --version-info t.so | FileCheck %s
7
8// CHECK:      Name: .dynstr
9// CHECK-NEXT: Type: SHT_STRTAB
10// CHECK-NEXT: Flags [
11// CHECK-NEXT:   SHF_ALLOC
12// CHECK-NEXT: ]
13// CHECK-NEXT: Address:
14// CHECK-NEXT: Offset:
15// CHECK-NEXT: Size: 14
16// CHECK-NEXT: Link: 0
17// CHECK-NEXT: Info: 0
18// CHECK-NEXT: AddressAlignment: 1
19// CHECK-NEXT: EntrySize: 0
20// CHECK-NEXT: SectionData (
21// CHECK-NEXT:   0000: 00666F6F 00742E73 6F007665 7200      |.foo.t.so.ver.|
22// CHECK-NEXT: )
23
24// CHECK:      VersionSymbols [
25// CHECK-NEXT:  Symbol {
26// CHECK-NEXT:    Version: 0
27// CHECK-NEXT:    Name:
28// CHECK-NEXT:  }
29// CHECK-NEXT:  Symbol {
30// CHECK-NEXT:    Version: 2
31// CHECK-NEXT:    Name: foo@ver
32// CHECK-NEXT:  }
33// CHECK-NEXT: ]
34
35
36.global foo@ver
37foo@ver:
38