[lld] r336443 - [ELF] - Add test for empty version in a symbol name.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 6 08:03:54 PDT 2018
Author: grimar
Date: Fri Jul 6 08:03:53 2018
New Revision: 336443
URL: http://llvm.org/viewvc/llvm-project?rev=336443&view=rev
Log:
[ELF] - Add test for empty version in a symbol name.
This covers the following line which was untested:
https://github.com/llvm-mirror/lld/blob/master/ELF/Symbols.cpp#L170
Added:
lld/trunk/test/ELF/empty-ver2.s
Added: lld/trunk/test/ELF/empty-ver2.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/empty-ver2.s?rev=336443&view=auto
==============================================================================
--- lld/trunk/test/ELF/empty-ver2.s (added)
+++ lld/trunk/test/ELF/empty-ver2.s Fri Jul 6 08:03:53 2018
@@ -0,0 +1,20 @@
+# REQUIRES: x86
+# RUN: mkdir -p %t.dir
+# RUN: cd %t.dir
+# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+# 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-NEXT: Symbol {
+# CHECK-NEXT: Version: 0
+# CHECK-NEXT: Name: @
+# CHECK-NEXT: }
+# CHECK-NEXT: Symbol {
+# CHECK-NEXT: Version: 1
+# CHECK-NEXT: Name: bar@@
+# CHECK-NEXT: }
+# CHECK-NEXT: ]
+
+.global bar@
+bar@:
More information about the llvm-commits
mailing list