Better formatting.

If a line is too long, its error message becomes hard to read.

llvm-svn: 287739
This commit is contained in:
Rui Ueyama 2016-11-23 05:14:01 +00:00
parent 97deade619
commit d14743e17f
5 changed files with 43 additions and 67 deletions

View File

@ -1,5 +1,5 @@
b@LIBSAMPLE_1.0 = b_1
b@@LIBSAMPLE_2.0 = b_2
b@V1 = b_1
b@@V2 = b_2
.globl a
.type a,@function

View File

@ -1,12 +1,8 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/verdef-defaultver.s -o %t1
# RUN: echo "LIBSAMPLE_1.0{ \
# RUN: global: a; \
# RUN: local: *; }; \
# RUN: LIBSAMPLE_2.0{ \
# RUN: global: b; c; \
# RUN: }LIBSAMPLE_1.0;" > %t.script
# RUN: echo "V1 { global: a; local: *; };" > %t.script
# RUN: echo "V2 { global: b; c; } V1;" >> %t.script
# RUN: ld.lld -shared -soname shared %t1 --version-script %t.script -o %t.so
# RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
@ -21,7 +17,7 @@
# DSO-NEXT: Section: Undefined
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Name: a@@LIBSAMPLE_1.0
# DSO-NEXT: Name: a@@V1
# DSO-NEXT: Value: 0x1000
# DSO-NEXT: Size: 0
# DSO-NEXT: Binding: Global
@ -30,7 +26,7 @@
# DSO-NEXT: Section: .text
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Name: b@@LIBSAMPLE_2.0
# DSO-NEXT: Name: b@@V2
# DSO-NEXT: Value: 0x1002
# DSO-NEXT: Size: 0
# DSO-NEXT: Binding: Global
@ -39,7 +35,7 @@
# DSO-NEXT: Section: .text
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Name: b@LIBSAMPLE_1.0
# DSO-NEXT: Name: b@V1
# DSO-NEXT: Value: 0x1001
# DSO-NEXT: Size: 0
# DSO-NEXT: Binding: Global
@ -48,7 +44,7 @@
# DSO-NEXT: Section: .text
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Name: c@@LIBSAMPLE_2.0
# DSO-NEXT: Name: c@@V2
# DSO-NEXT: Value: 0x1003
# DSO-NEXT: Size: 0
# DSO-NEXT: Binding: Global
@ -69,19 +65,19 @@
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Version: 2
# DSO-NEXT: Name: a@@LIBSAMPLE_1.0
# DSO-NEXT: Name: a@@V1
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Version: 3
# DSO-NEXT: Name: b@@LIBSAMPLE_2.0
# DSO-NEXT: Name: b@@V2
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Version: 2
# DSO-NEXT: Name: b@LIBSAMPLE_1.0
# DSO-NEXT: Name: b@V1
# DSO-NEXT: }
# DSO-NEXT: Symbol {
# DSO-NEXT: Version: 3
# DSO-NEXT: Name: c@@LIBSAMPLE_2.0
# DSO-NEXT: Name: c@@V2
# DSO-NEXT: }
# DSO-NEXT: ]
# DSO-NEXT: }
@ -97,15 +93,15 @@
# DSO-NEXT: Version: 1
# DSO-NEXT: Flags: 0x0
# DSO-NEXT: Index: 2
# DSO-NEXT: Hash: 98457184
# DSO-NEXT: Name: LIBSAMPLE_1.0
# DSO-NEXT: Hash: 1425
# DSO-NEXT: Name: V1
# DSO-NEXT: }
# DSO-NEXT: Definition {
# DSO-NEXT: Version: 1
# DSO-NEXT: Flags: 0x0
# DSO-NEXT: Index: 3
# DSO-NEXT: Hash: 98456416
# DSO-NEXT: Name: LIBSAMPLE_2.0
# DSO-NEXT: Hash: 1426
# DSO-NEXT: Name: V2
# DSO-NEXT: }
# DSO-NEXT: }
@ -125,7 +121,7 @@
# EXE-NEXT: Section: Undefined
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Name: a@LIBSAMPLE_1.0
# EXE-NEXT: Name: a@V1
# EXE-NEXT: Value: 0x11020
# EXE-NEXT: Size: 0
# EXE-NEXT: Binding: Global
@ -134,7 +130,7 @@
# EXE-NEXT: Section: Undefined
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Name: b@LIBSAMPLE_2.0
# EXE-NEXT: Name: b@V2
# EXE-NEXT: Value: 0x11030
# EXE-NEXT: Size: 0
# EXE-NEXT: Binding: Global
@ -143,7 +139,7 @@
# EXE-NEXT: Section: Undefined
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Name: c@LIBSAMPLE_2.0
# EXE-NEXT: Name: c@V2
# EXE-NEXT: Value: 0x11040
# EXE-NEXT: Size: 0
# EXE-NEXT: Binding: Global
@ -164,15 +160,15 @@
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Version: 2
# EXE-NEXT: Name: a@LIBSAMPLE_1.0
# EXE-NEXT: Name: a@V1
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Version: 3
# EXE-NEXT: Name: b@LIBSAMPLE_2.0
# EXE-NEXT: Name: b@V2
# EXE-NEXT: }
# EXE-NEXT: Symbol {
# EXE-NEXT: Version: 3
# EXE-NEXT: Name: c@LIBSAMPLE_2.0
# EXE-NEXT: Name: c@V2
# EXE-NEXT: }
# EXE-NEXT: ]
# EXE-NEXT: }
@ -184,16 +180,16 @@
# EXE-NEXT: Count: 2
# EXE-NEXT: FileName: shared
# EXE-NEXT: Entry {
# EXE-NEXT: Hash: 98457184
# EXE-NEXT: Hash: 1425
# EXE-NEXT: Flags: 0x0
# EXE-NEXT: Index: 2
# EXE-NEXT: Name: LIBSAMPLE_1.0
# EXE-NEXT: Name: V1
# EXE-NEXT: }
# EXE-NEXT: Entry {
# EXE-NEXT: Hash: 98456416
# EXE-NEXT: Hash: 1426
# EXE-NEXT: Flags: 0x0
# EXE-NEXT: Index: 3
# EXE-NEXT: Name: LIBSAMPLE_2.0
# EXE-NEXT: Name: V2
# EXE-NEXT: }
# EXE-NEXT: }
# EXE-NEXT: }

View File

@ -1,14 +1,8 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "LIBSAMPLE_1.0{ \
# RUN: global: a; \
# RUN: local: *; }; \
# RUN: LIBSAMPLE_2.0{ \
# RUN: global: b; \
# RUN: local: *; }LIBSAMPLE_1.0; \
# RUN: LIBSAMPLE_3.0{ \
# RUN: global: c; \
# RUN: }LIBSAMPLE_2.0;" > %t.script
# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; } LIBSAMPLE_1.0;" >> %t.script
# RUN: echo "LIBSAMPLE_3.0 { global: c; } LIBSAMPLE_2.0;" >> %t.script
# RUN: ld.lld --version-script %t.script -shared -soname shared %t.o -o %t.so
# RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s

View File

@ -1,14 +1,8 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "LIBSAMPLE_1.0{ \
# RUN: global: a; \
# RUN: local: *; }; \
# RUN: LIBSAMPLE_2.0{ \
# RUN: global: b; \
# RUN: local: *; }; \
# RUN: LIBSAMPLE_3.0{ \
# RUN: global: c; \
# RUN: local: *; };" > %t.script
# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" > %t.script
# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; };" >> %t.script
# RUN: echo "LIBSAMPLE_3.0 { global: c; local: *; };" >> %t.script
# RUN: ld.lld --version-script %t.script -shared -soname shared %t.o -o %t.so
# RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s
@ -101,11 +95,11 @@
# MAIN-NEXT: SHT_GNU_verdef {
# MAIN-NEXT: }
# RUN: echo "VERSION { \
# RUN: LIBSAMPLE_1.0 { global: a; local: *; }; \
# RUN: LIBSAMPLE_2.0 { global: b; local: *; }; \
# RUN: LIBSAMPLE_3.0 { global: c; local: *; }; \
# RUN: }" > %t.script
# RUN: echo "VERSION {" > %t.script
# RUN: echo "LIBSAMPLE_1.0 { global: a; local: *; };" >> %t.script
# RUN: echo "LIBSAMPLE_2.0 { global: b; local: *; };" >> %t.script
# RUN: echo "LIBSAMPLE_3.0 { global: c; local: *; };" >> %t.script
# RUN: echo "}" >> %t.script
# RUN: ld.lld --script %t.script -shared -soname shared %t.o -o %t2.so
# RUN: llvm-readobj -V -dyn-symbols %t2.so | FileCheck --check-prefix=DSO %s

View File

@ -1,20 +1,12 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "LIBSAMPLE_1.0 { \
# RUN: global: \
# RUN: extern \"C++\" { \
# RUN: \"foo(int)\"; \
# RUN: \"zed(int)\"; \
# RUN: \"abc::abc()\"; \
# RUN: }; \
# RUN: }; \
# RUN: LIBSAMPLE_2.0 { \
# RUN: global: \
# RUN: extern \"C++\" { \
# RUN: \"bar(int)\"; \
# RUN: }; \
# RUN: }; " > %t.script
# RUN: echo "LIBSAMPLE_1.0 { global:" > %t.script
# RUN: echo ' extern "C++" { "foo(int)"; "zed(int)"; "abc::abc()"; };' >> %t.script
# RUN: echo "};" >> %t.script
# RUN: echo "LIBSAMPLE_2.0 { global:" >> %t.script
# RUN: echo ' extern "C++" { "bar(int)"; };' >> %t.script
# RUN: echo "};" >> %t.script
# RUN: ld.lld --version-script %t.script -shared %t.o -o %t.so
# RUN: llvm-readobj -V -dyn-symbols %t.so | FileCheck --check-prefix=DSO %s