aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/startstop-shared.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/startstop-shared.s')
-rw-r--r--test/ELF/startstop-shared.s20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/ELF/startstop-shared.s b/test/ELF/startstop-shared.s
index 108184648f97..77411f3f25c9 100644
--- a/test/ELF/startstop-shared.s
+++ b/test/ELF/startstop-shared.s
@@ -3,16 +3,24 @@
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-readobj -r -t %t.so | FileCheck %s
+ .data
.quad __start_foo
- .section foo,"a"
-// By default the symbol is visible and we need a dynamic reloc.
-// CHECK: R_X86_64_64 __start_foo 0x0
+ .section foo,"aw"
+// By default the symbol is hidden.
+// CHECK: R_X86_64_RELATIVE - 0x[[ADDR1:.*]]
.hidden __start_bar
.quad __start_bar
.section bar,"a"
-// Test that we are able to hide the symbol.
-// CHECK: R_X86_64_RELATIVE - 0x[[ADDR:.*]]
+// References do not affect the visibility.
+// CHECK: R_X86_64_RELATIVE - 0x[[ADDR2:.*]]
// CHECK: Name: __start_bar
-// CHECK-NEXT: Value: 0x[[ADDR]]
+// CHECK-NEXT: Value: 0x[[ADDR2]]
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Local
+
+// CHECK: Name: __start_foo
+// CHECK-NEXT: Value: 0x[[ADDR1]]
+// CHECK-NEXT: Size:
+// CHECK-NEXT: Binding: Local