summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJake Ehrlich <jakehehrlich@google.com>2018-01-02 23:01:24 +0000
committerJake Ehrlich <jakehehrlich@google.com>2018-01-02 23:01:24 +0000
commit21028856626186a2caee8fb76b58ab8aa0f449ac (patch)
treec46ac2865cb5e6524d262e97f205e46e9c8e1415 /test
parent6ebc5abea99ad62ea9bc47368fc10a6c39aae3d9 (diff)
[llvm-objcopy] Add support for visibility
I have no clue how this was missed when symbol table support was added. This change ensures that the visibility of symbols is preserved by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/tools/llvm-objcopy/symbol-copy.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/test/tools/llvm-objcopy/symbol-copy.test b/test/tools/llvm-objcopy/symbol-copy.test
index 83e2c0ea70a..3e346701fb9 100644
--- a/test/tools/llvm-objcopy/symbol-copy.test
+++ b/test/tools/llvm-objcopy/symbol-copy.test
@@ -28,11 +28,22 @@ Symbols:
Section: .text
Value: 0x1000
Size: 4
- - Name: foo
+ - Name: bam
Type: STT_FUNC
Section: .text
+ Value: 0x1001
+ Size: 4
+ Visibility: STV_HIDDEN
+ - Name: foo
+ Type: STT_FUNC
Section: .text
Value: 0x1004
+ - Name: faz
+ Type: STT_OBJECT
+ Section: .data
+ Value: 0x2002
+ Size: 2
+ Visibility: STV_INTERNAL
- Name: bar
Type: STT_OBJECT
Section: .data
@@ -64,6 +75,17 @@ Symbols:
#CHECK-NEXT: Section: .text
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
+#CHECK-NEXT: Name: bam
+#CHECK-NEXT: Value: 0x1001
+#CHECK-NEXT: Size: 4
+#CHECK-NEXT: Binding: Global
+#CHECK-NEXT: Type: Function
+#CHECK-NEXT: Other [
+#CHECK-NEXT: STV_HIDDEN
+#CHECK-NEXT: ]
+#CHECK-NEXT: Section: .text
+#CHECK-NEXT: }
+#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: foo
#CHECK-NEXT: Value: 0x1004
#CHECK-NEXT: Size: 0
@@ -73,6 +95,17 @@ Symbols:
#CHECK-NEXT: Section: .text
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
+#CHECK-NEXT: Name: faz
+#CHECK-NEXT: Value: 0x2002
+#CHECK-NEXT: Size: 2
+#CHECK-NEXT: Binding: Global
+#CHECK-NEXT: Type: Object
+#CHECK-NEXT: Other [
+#CHECK-NEXT: STV_INTERNAL
+#CHECK-NEXT: ]
+#CHECK-NEXT: Section: .data
+#CHECK-NEXT: }
+#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: bar
#CHECK-NEXT: Value: 0x2000
#CHECK-NEXT: Size: 4