[PATCH] D36966: [ELF] - Repair dynsym-pie.s testcase.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 08:27:40 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

It was implemented by me in https://reviews.llvm.org/D18183 and
looks broken from begining, because visibility attributes
were not applied properly to symbols before this patch.

I also removed one of symbols from testcase because
it looks was a silly copypaste, not sure what I wanted to test initially
with it.


https://reviews.llvm.org/D36966

Files:
  test/ELF/dynsym-pie.s


Index: test/ELF/dynsym-pie.s
===================================================================
--- test/ELF/dynsym-pie.s
+++ test/ELF/dynsym-pie.s
@@ -3,6 +3,51 @@
 # RUN: ld.lld -pie %t -o %t.out
 # RUN: llvm-readobj -t -dyn-symbols %t.out | FileCheck %s
 
+# CHECK:       Symbols [
+# CHECK:        Symbol {
+# CHECK:          Name: hidden
+# CHECK-NEXT:     Value: 0x1000
+# CHECK-NEXT:     Size: 0
+# CHECK-NEXT:     Binding: Local
+# CHECK-NEXT:     Type: None
+# CHECK-NEXT:     Other [
+# CHECK-NEXT:       STV_HIDDEN
+# CHECK-NEXT:     ]
+# CHECK-NEXT:     Section: .text
+# CHECK-NEXT:   }
+# CHECK:        Symbol {
+# CHECK:          Name: internal
+# CHECK-NEXT:     Value: 0x1000
+# CHECK-NEXT:     Size: 0
+# CHECK-NEXT:     Binding: Local
+# CHECK-NEXT:     Type: None
+# CHECK-NEXT:     Other [
+# CHECK-NEXT:       STV_INTERNAL
+# CHECK-NEXT:     ]
+# CHECK-NEXT:     Section: .text
+# CHECK-NEXT:   }
+# CHECK:        Symbol {
+# CHECK:          Name: default
+# CHECK-NEXT:     Value: 0x1000
+# CHECK-NEXT:     Size: 0
+# CHECK-NEXT:     Binding: Global
+# CHECK-NEXT:     Type: None
+# CHECK-NEXT:     Other: 0
+# CHECK-NEXT:     Section: .text
+# CHECK-NEXT:   }
+# CHECK:        Symbol {
+# CHECK:          Name: protected
+# CHECK-NEXT:     Value: 0x1000
+# CHECK-NEXT:     Size: 0
+# CHECK-NEXT:     Binding: Global
+# CHECK-NEXT:     Type: None
+# CHECK-NEXT:     Other [
+# CHECK-NEXT:       STV_PROTECTED
+# CHECK-NEXT:     ]
+# CHECK-NEXT:     Section: .text
+# CHECK-NEXT:   }
+# CHECK-NEXT: ]
+
 # CHECK:      DynamicSymbols [
 # CHECK-NEXT:  Symbol {
 # CHECK-NEXT:    Name: @
@@ -23,14 +68,13 @@
 default:
 
 .global protected
+.protected protected
 protected:
 
 .global hidden
+.hidden hidden
 hidden:
 
 .global internal
+.internal internal
 internal:
-
-.global protected_with_hidden
-.protected
-protected_with_hidden:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36966.111984.patch
Type: text/x-patch
Size: 1857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170821/9676b136/attachment.bin>


More information about the llvm-commits mailing list