https://reviews.llvm.org/D68704 changed the output format.
llvm-svn: 374542
// CHECK-NEXT: 0000: 00666F6F 00742E73 6F007665 7200 |.foo.t.so.ver.|
// CHECK-NEXT: )
-// CHECK: Version symbols {
-// CHECK-NEXT: Section Name:
-// CHECK-NEXT: Address:
-// CHECK-NEXT: Offset:
-// CHECK-NEXT: Link:
-// CHECK-NEXT: Symbols [
-// CHECK-NEXT: Symbol {
-// CHECK-NEXT: Version: 0
-// CHECK-NEXT: Name:
-// CHECK-NEXT: }
-// CHECK-NEXT: Symbol {
-// CHECK-NEXT: Version: 2
-// CHECK-NEXT: Name: foo@ver
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: }
+// CHECK: Version symbols [
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Version: 0
+// CHECK-NEXT: Name:
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Version: 2
+// CHECK-NEXT: Name: foo@ver
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
.global foo@ver
# RUN: ld.lld %t.o -o t.so -shared -version-script %p/Inputs/empty-ver.ver
# RUN: llvm-readobj --version-info t.so | FileCheck %s
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name:
# RUN: llvm-readobj -V %t.so | FileCheck %s
## Check that we are able to version symbols defined in script.
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name:
# RUN: echo "und = 0x1; VERSION { V { global: und; local: *; }; }" > %t.script
# RUN: ld.lld -T %t.script -shared --no-undefined-version %t.o -o %t.so
# RUN: llvm-readobj -V %t.so | FileCheck %s --check-prefix=UNDEF
-# UNDEF: Symbols [
+# UNDEF: Version symbols [
# UNDEF-NEXT: Symbol {
# UNDEF-NEXT: Version: 0
# UNDEF-NEXT: Name:
# DSO-NEXT: Section: .text
# DSO-NEXT: }
# DSO-NEXT: ]
-# DSO-NEXT: Version symbols {
-# DSO-NEXT: Section Name: .gnu.version
-# DSO-NEXT: Address: 0x240
-# DSO-NEXT: Offset: 0x240
-# DSO-NEXT: Link: 1
-# DSO-NEXT: Symbols [
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 0
-# DSO-NEXT: Name:
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: a@@V1
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 3
-# DSO-NEXT: Name: b@@V2
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: b@V1
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 3
-# DSO-NEXT: Name: c@@V2
-# DSO-NEXT: }
-# DSO-NEXT: ]
-# DSO-NEXT: }
+# DSO-NEXT: Version symbols [
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 0
+# DSO-NEXT: Name:
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: a@@V1
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 3
+# DSO-NEXT: Name: b@@V2
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: b@V1
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 3
+# DSO-NEXT: Name: c@@V2
+# DSO-NEXT: }
+# DSO-NEXT: ]
# DSO-NEXT: SHT_GNU_verdef {
# DSO-NEXT: Definition {
# DSO-NEXT: Version: 1
# EXE-NEXT: Section: Undefined
# EXE-NEXT: }
# EXE-NEXT: ]
-# EXE-NEXT: Version symbols {
-# EXE-NEXT: Section Name: .gnu.version
-# EXE-NEXT: Address: 0x200260
-# EXE-NEXT: Offset: 0x260
-# EXE-NEXT: Link: 1
-# EXE-NEXT: Symbols [
-# EXE-NEXT: Symbol {
-# EXE-NEXT: Version: 0
-# EXE-NEXT: Name:
-# EXE-NEXT: }
-# EXE-NEXT: Symbol {
-# EXE-NEXT: Version: 2
-# EXE-NEXT: Name: a@V1
-# EXE-NEXT: }
-# EXE-NEXT: Symbol {
-# EXE-NEXT: Version: 3
-# EXE-NEXT: Name: b@V2
-# EXE-NEXT: }
-# EXE-NEXT: Symbol {
-# EXE-NEXT: Version: 3
-# EXE-NEXT: Name: c@V2
-# EXE-NEXT: }
-# EXE-NEXT: ]
-# EXE-NEXT: }
+# EXE-NEXT: Version symbols [
+# EXE-NEXT: Symbol {
+# EXE-NEXT: Version: 0
+# EXE-NEXT: Name:
+# EXE-NEXT: }
+# EXE-NEXT: Symbol {
+# EXE-NEXT: Version: 2
+# EXE-NEXT: Name: a@V1
+# EXE-NEXT: }
+# EXE-NEXT: Symbol {
+# EXE-NEXT: Version: 3
+# EXE-NEXT: Name: b@V2
+# EXE-NEXT: }
+# EXE-NEXT: Symbol {
+# EXE-NEXT: Version: 3
+# EXE-NEXT: Name: c@V2
+# EXE-NEXT: }
+# EXE-NEXT: ]
# EXE-NEXT: SHT_GNU_verdef {
# EXE-NEXT: }
# EXE-NEXT: SHT_GNU_verneed {
# RUN: ld.lld --hash-style=sysv --version-script %t.script -shared -soname shared %t.o -o %t.so
# RUN: llvm-readobj -V --dyn-syms %t.so | FileCheck --check-prefix=DSO %s
-# DSO: Version symbols {
-# DSO-NEXT: Section Name: .gnu.version
-# DSO-NEXT: Address: 0x228
-# DSO-NEXT: Offset: 0x228
-# DSO-NEXT: Link: 1
-# DSO-NEXT: Symbols [
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 0
-# DSO-NEXT: Name:
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: a@@LIBSAMPLE_1.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 3
-# DSO-NEXT: Name: b@@LIBSAMPLE_2.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 4
-# DSO-NEXT: Name: c@@LIBSAMPLE_3.0
-# DSO-NEXT: }
-# DSO-NEXT: ]
-# DSO-NEXT: }
+# DSO: Version symbols [
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 0
+# DSO-NEXT: Name:
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: a@@LIBSAMPLE_1.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 3
+# DSO-NEXT: Name: b@@LIBSAMPLE_2.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 4
+# DSO-NEXT: Name: c@@LIBSAMPLE_3.0
+# DSO-NEXT: }
+# DSO-NEXT: ]
# DSO-NEXT: SHT_GNU_verdef {
# DSO-NEXT: Definition {
# DSO-NEXT: Version: 1
# RUN: ld.lld --hash-style=sysv %tmain.o %t.so -o %tout
# RUN: llvm-readobj -V %tout | FileCheck --check-prefix=MAIN %s
-# MAIN: Version symbols {
-# MAIN-NEXT: Section Name: .gnu.version
-# MAIN-NEXT: Address: 0x200260
-# MAIN-NEXT: Offset: 0x260
-# MAIN-NEXT: Link: 1
-# MAIN-NEXT: Symbols [
-# MAIN-NEXT: Symbol {
-# MAIN-NEXT: Version: 0
-# MAIN-NEXT: Name:
-# MAIN-NEXT: }
-# MAIN-NEXT: Symbol {
-# MAIN-NEXT: Version: 2
-# MAIN-NEXT: Name: a@LIBSAMPLE_1.0
-# MAIN-NEXT: }
-# MAIN-NEXT: Symbol {
-# MAIN-NEXT: Version: 3
-# MAIN-NEXT: Name: b@LIBSAMPLE_2.0
-# MAIN-NEXT: }
-# MAIN-NEXT: Symbol {
-# MAIN-NEXT: Version: 4
-# MAIN-NEXT: Name: c@LIBSAMPLE_3.0
-# MAIN-NEXT: }
-# MAIN-NEXT: ]
-# MAIN-NEXT: }
+# MAIN: Version symbols [
+# MAIN-NEXT: Symbol {
+# MAIN-NEXT: Version: 0
+# MAIN-NEXT: Name:
+# MAIN-NEXT: }
+# MAIN-NEXT: Symbol {
+# MAIN-NEXT: Version: 2
+# MAIN-NEXT: Name: a@LIBSAMPLE_1.0
+# MAIN-NEXT: }
+# MAIN-NEXT: Symbol {
+# MAIN-NEXT: Version: 3
+# MAIN-NEXT: Name: b@LIBSAMPLE_2.0
+# MAIN-NEXT: }
+# MAIN-NEXT: Symbol {
+# MAIN-NEXT: Version: 4
+# MAIN-NEXT: Name: c@LIBSAMPLE_3.0
+# MAIN-NEXT: }
+# MAIN-NEXT: ]
# MAIN-NEXT: SHT_GNU_verdef {
# MAIN-NEXT: }
# CHECK-NEXT: 0x000000006FFFFFFE VERNEED [[VERNEED]]
# CHECK-NEXT: 0x000000006FFFFFFF VERNEEDNUM 2
-# CHECK: Version symbols {
-# CHECK-NEXT: Section Name: .gnu.version
-# CHECK-NEXT: Address: [[VERSYM]]
-# CHECK-NEXT: Offset: [[VERSYM_OFFSET]]
-# CHECK-NEXT: Link: 1
-# CHECK-NEXT: Symbols [
-# CHECK-NEXT: Symbol {
-# CHECK-NEXT: Version: 0
-# CHECK-NEXT: Name:
-# CHECK-NEXT: }
-# CHECK-NEXT: Symbol {
-# CHECK-NEXT: Version: 2
-# CHECK-NEXT: Name: f1@v3
-# CHECK-NEXT: }
-# CHECK-NEXT: Symbol {
-# CHECK-NEXT: Version: 3
-# CHECK-NEXT: Name: f2@v2
-# CHECK-NEXT: }
-# CHECK-NEXT: Symbol {
-# CHECK-NEXT: Version: 4
-# CHECK-NEXT: Name: g1@v1
-# CHECK-NEXT: }
-# CHECK-NEXT: ]
-# CHECK-NEXT: }
+# CHECK: Version symbols [
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Version: 0
+# CHECK-NEXT: Name:
+# CHECK-NEXT: }
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Version: 2
+# CHECK-NEXT: Name: f1@v3
+# CHECK-NEXT: }
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Version: 3
+# CHECK-NEXT: Name: f2@v2
+# CHECK-NEXT: }
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Version: 4
+# CHECK-NEXT: Name: g1@v1
+# CHECK-NEXT: }
+# CHECK-NEXT: ]
# CHECK-NEXT: SHT_GNU_verdef {
# CHECK-NEXT: }
# CHECK-NEXT: SHT_GNU_verneed {
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V %t.so | FileCheck %s
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name:
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V --dyn-syms %t.so | FileCheck %s
-# CHECK: Version symbols {
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK: Name: _Z3bari
# CHECK: Name: _Z3fooi@@FOO
# CHECK: Name: _Z3zedi@@BAR
# DSO-NEXT: Section: .text (0x6)
# DSO-NEXT: }
# DSO-NEXT: ]
-# DSO-NEXT: Version symbols {
-# DSO-NEXT: Section Name: .gnu.version
-# DSO-NEXT: Address:
-# DSO-NEXT: Offset:
-# DSO-NEXT: Link: 1
-# DSO-NEXT: Symbols [
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 0
-# DSO-NEXT: Name:
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 3
-# DSO-NEXT: Name: _Z3bari@@LIBSAMPLE_2.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: _Z3fooi@@LIBSAMPLE_1.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: _Z3zedi@@LIBSAMPLE_1.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: _ZN3abcC1Ev@@LIBSAMPLE_1.0
-# DSO-NEXT: }
-# DSO-NEXT: Symbol {
-# DSO-NEXT: Version: 2
-# DSO-NEXT: Name: _ZN3abcC2Ev@@LIBSAMPLE_1.0
-# DSO-NEXT: }
-# DSO-NEXT: ]
-# DSO-NEXT: }
+# DSO-NEXT: Version symbols [
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 0
+# DSO-NEXT: Name:
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 3
+# DSO-NEXT: Name: _Z3bari@@LIBSAMPLE_2.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: _Z3fooi@@LIBSAMPLE_1.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: _Z3zedi@@LIBSAMPLE_1.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: _ZN3abcC1Ev@@LIBSAMPLE_1.0
+# DSO-NEXT: }
+# DSO-NEXT: Symbol {
+# DSO-NEXT: Version: 2
+# DSO-NEXT: Name: _ZN3abcC2Ev@@LIBSAMPLE_1.0
+# DSO-NEXT: }
+# DSO-NEXT: ]
.text
.globl _Z3fooi
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V %t.so | FileCheck %s
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name:
# RUN: echo "FOO { local: extern \"C++\" { \"abb(int)\"; }; };" > %t.script
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V %t.so | FileCheck %s --check-prefix=ABB
-# ABB: Symbols [
+# ABB: Version symbols [
# ABB-NEXT: Symbol {
# ABB-NEXT: Version: 0
# ABB-NEXT: Name:
# RUN: echo "FOO { local: extern \"C++\" { abc*; }; };" > %t.script
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V %t.so | FileCheck %s --check-prefix=ABC
-# ABC: Symbols [
+# ABC: Version symbols [
# ABC-NEXT: Symbol {
# ABC-NEXT: Version: 0
# ABC-NEXT: Name:
# RUN: ld.lld -shared %t.o --version-script %t.map -o %t.so --fatal-warnings
# RUN: llvm-readobj -V %t.so | FileCheck %s
-# CHECK: Symbols [
+# CHECK: Version symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Version: 0
# CHECK-NEXT: Name: