[lld] r312779 - [ELF] - Simplify and improve symbols.s testcase.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 02:31:01 PDT 2017


Author: grimar
Date: Fri Sep  8 02:31:01 2017
New Revision: 312779

URL: http://llvm.org/viewvc/llvm-project?rev=312779&view=rev
Log:
[ELF] - Simplify and improve symbols.s testcase.

There is no need to check anything excepr that
symbol is not in output.
Previously additional iformation like symbol values
or flags were checked, that was not correct.
For example if we would provide symbol with different
value/visibility/type for case when should not provide 
symbol at all, testcase would not fail.

Modified:
    lld/trunk/test/ELF/linkerscript/symbols.s

Modified: lld/trunk/test/ELF/linkerscript/symbols.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/symbols.s?rev=312779&r1=312778&r2=312779&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/symbols.s (original)
+++ lld/trunk/test/ELF/linkerscript/symbols.s Fri Sep  8 02:31:01 2017
@@ -12,14 +12,13 @@
 # The symbol is not referenced. Don't provide it.
 # RUN: echo "SECTIONS { PROVIDE(newsym = 1);}" > %t.script
 # RUN: ld.lld -o %t1 --script %t.script %t
-# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE1 %s
-# PROVIDE1-NOT: 0000000000000001         *ABS*    00000000 newsym
+# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=DONTPROVIDE %s
+# DONTPROVIDE-NOT: newsym
 
 # The symbol is not referenced. Don't provide it.
 # RUN: echo "SECTIONS { PROVIDE_HIDDEN(newsym = 1);}" > %t.script
 # RUN: ld.lld -o %t1 --script %t.script %t
-# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN1 %s
-# HIDDEN1-NOT: 0000000000000001         *ABS*    00000000 .hidden newsym
+# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=DONTPROVIDE %s
 
 # Provide existing symbol. The value should be 0, even though we
 # have value of 1 in PROVIDE()
@@ -44,14 +43,12 @@
 # The symbol is not referenced. Don't provide it.
 # RUN: echo "PROVIDE(newsym = 1);" > %t.script
 # RUN: ld.lld -o %t1 --script %t.script %t
-# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE4 %s
-# PROVIDE4-NOT: 0000000000000001         *ABS*    00000000 newsym
+# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=DONTPROVIDE %s
 
 # The symbol is not referenced. Don't provide it.
 # RUN: echo "PROVIDE_HIDDEN(newsym = 1);" > %t.script
 # RUN: ld.lld -o %t1 --script %t.script %t
-# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN4 %s
-# HIDDEN4-NOT: 0000000000000001         *ABS*    00000000 .hidden newsym
+# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=DONTPROVIDE %s
 
 # Provide existing symbol. The value should be 0, even though we
 # have value of 1 in PROVIDE()




More information about the llvm-commits mailing list