diff options
Diffstat (limited to 'test/ELF/version-script.s')
| -rw-r--r-- | test/ELF/version-script.s | 89 |
1 files changed, 20 insertions, 69 deletions
diff --git a/test/ELF/version-script.s b/test/ELF/version-script.s index ba9c95a96fc3..7453981ab9cc 100644 --- a/test/ELF/version-script.s +++ b/test/ELF/version-script.s @@ -14,55 +14,36 @@ # RUN: ld.lld --version-script %t3.script -shared %t.o %t2.so -o %t3.so # RUN: llvm-readobj -dyn-symbols %t3.so | FileCheck --check-prefix=DSO2 %s -# --version-script filters --dynamic-list. -# RUN: echo "{ foo1; foo2; };" > %t.list -# RUN: ld.lld --version-script %t.script --dynamic-list %t.list %t.o %t2.so -o %t -# RUN: llvm-readobj -dyn-symbols %t | FileCheck --check-prefix=EXE %s - -# RUN: echo "VERSION_1.0{ \ -# RUN: global: foo1; \ -# RUN: local: *; }; \ -# RUN: VERSION_2.0{ \ -# RUN: global: foo3; \ -# RUN: local: *; }; " > %t4.script +# RUN: echo "VERSION_1.0 { global: foo1; local: *; };" > %t4.script +# RUN: echo "VERSION_2.0 { global: foo3; local: *; };" >> %t4.script # RUN: ld.lld --version-script %t4.script -shared %t.o %t2.so -o %t4.so # RUN: llvm-readobj -dyn-symbols %t4.so | FileCheck --check-prefix=VERDSO %s -# RUN: echo "VERSION_1.0{ \ -# RUN: global: foo1; \ -# RUN: local: *; }; \ -# RUN: { \ -# RUN: global: foo3; \ -# RUN: local: *; }; " > %t5.script +# RUN: echo "VERSION_1.0 { global: foo1; local: *; };" > %t5.script +# RUN: echo "{ global: foo3; local: *; };" >> %t5.script # RUN: not ld.lld --version-script %t5.script -shared %t.o %t2.so -o %t5.so 2>&1 | \ -# RUN: FileCheck -check-prefix=ERR %s -# ERR: anonymous version definition is used in combination with other version definitions +# RUN: FileCheck -check-prefix=ERR1 %s +# ERR1: anonymous version definition is used in combination with other version definitions -# RUN: echo "{ \ -# RUN: global: foo1; \ -# RUN: local: *; }; \ -# RUN: VERSION_2.0 { \ -# RUN: global: foo3; \ -# RUN: local: *; }; " > %t5.script +# RUN: echo "{ global: foo1; local: *; };" > %t5.script +# RUN: echo "VERSION_2.0 { global: foo3; local: *; };" >> %t5.script # RUN: not ld.lld --version-script %t5.script -shared %t.o %t2.so -o %t5.so 2>&1 | \ -# RUN: FileCheck -check-prefix=ERR %s +# RUN: FileCheck -check-prefix=ERR2 %s +# ERR2: EOF expected, but got VERSION_2.0 -# RUN: echo "VERSION_1.0{ \ -# RUN: global: foo1; \ -# RUN: local: *; }; \ -# RUN: VERSION_2.0 { \ -# RUN: global: foo1; \ -# RUN: local: *; }; " > %t6.script +# RUN: echo "VERSION_1.0 { global: foo1; local: *; };" > %t6.script +# RUN: echo "VERSION_2.0 { global: foo1; local: *; };" >> %t6.script # RUN: ld.lld --version-script %t6.script -shared %t.o %t2.so -o %t6.so 2>&1 | \ # RUN: FileCheck -check-prefix=WARN2 %s -# WARN2: duplicate symbol foo1 in version script +# WARN2: duplicate symbol 'foo1' in version script +# RUN: echo "{ foo1; foo2; };" > %t.list # RUN: ld.lld --version-script %t.script --dynamic-list %t.list %t.o %t2.so -o %t2 # RUN: llvm-readobj %t2 > /dev/null # DSO: DynamicSymbols [ # DSO-NEXT: Symbol { -# DSO-NEXT: Name: @ (0) +# DSO-NEXT: Name: @ # DSO-NEXT: Value: 0x0 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Local (0x0) @@ -71,7 +52,7 @@ # DSO-NEXT: Section: Undefined (0x0) # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: bar@ (1) +# DSO-NEXT: Name: bar@ # DSO-NEXT: Value: 0x0 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global (0x1) @@ -80,7 +61,7 @@ # DSO-NEXT: Section: Undefined (0x0) # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: foo1@ (5) +# DSO-NEXT: Name: foo1@ # DSO-NEXT: Value: 0x1000 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global (0x1) @@ -89,7 +70,7 @@ # DSO-NEXT: Section: .text # DSO-NEXT: } # DSO-NEXT: Symbol { -# DSO-NEXT: Name: foo3@ (10) +# DSO-NEXT: Name: foo3@ # DSO-NEXT: Value: 0x1007 # DSO-NEXT: Size: 0 # DSO-NEXT: Binding: Global (0x1) @@ -101,7 +82,7 @@ # DSO2: DynamicSymbols [ # DSO2-NEXT: Symbol { -# DSO2-NEXT: Name: @ (0) +# DSO2-NEXT: Name: @ # DSO2-NEXT: Value: 0x0 # DSO2-NEXT: Size: 0 # DSO2-NEXT: Binding: Local (0x0) @@ -110,7 +91,7 @@ # DSO2-NEXT: Section: Undefined (0x0) # DSO2-NEXT: } # DSO2-NEXT: Symbol { -# DSO2-NEXT: Name: bar@ (1) +# DSO2-NEXT: Name: bar@ # DSO2-NEXT: Value: 0x0 # DSO2-NEXT: Size: 0 # DSO2-NEXT: Binding: Global (0x1) @@ -120,36 +101,6 @@ # DSO2-NEXT: } # DSO2-NEXT: ] -# EXE: DynamicSymbols [ -# EXE-NEXT: Symbol { -# EXE-NEXT: Name: @ (0) -# EXE-NEXT: Value: 0x0 -# EXE-NEXT: Size: 0 -# EXE-NEXT: Binding: Local (0x0) -# EXE-NEXT: Type: None (0x0) -# EXE-NEXT: Other: 0 -# EXE-NEXT: Section: Undefined (0x0) -# EXE-NEXT: } -# EXE-NEXT: Symbol { -# EXE-NEXT: Name: bar@ (1) -# EXE-NEXT: Value: 0x0 -# EXE-NEXT: Size: 0 -# EXE-NEXT: Binding: Global (0x1) -# EXE-NEXT: Type: Function (0x2) -# EXE-NEXT: Other: 0 -# EXE-NEXT: Section: Undefined (0x0) -# EXE-NEXT: } -# EXE-NEXT: Symbol { -# EXE-NEXT: Name: foo1@ (5) -# EXE-NEXT: Value: 0x11000 -# EXE-NEXT: Size: 0 -# EXE-NEXT: Binding: Global (0x1) -# EXE-NEXT: Type: None (0x0) -# EXE-NEXT: Other: 0 -# EXE-NEXT: Section: .text -# EXE-NEXT: } -# EXE-NEXT: ] - # VERDSO: DynamicSymbols [ # VERDSO-NEXT: Symbol { # VERDSO-NEXT: Name: @ |
