summaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/lazy-symbols.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/linkerscript/lazy-symbols.s')
-rw-r--r--test/ELF/linkerscript/lazy-symbols.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/lazy-symbols.s b/test/ELF/linkerscript/lazy-symbols.s
new file mode 100644
index 000000000000..22dffeef979b
--- /dev/null
+++ b/test/ELF/linkerscript/lazy-symbols.s
@@ -0,0 +1,13 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/lazy-symbols.s -o %t1
+# RUN: llvm-ar rcs %tar %t1
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2
+# RUN: echo "foo = 1;" > %t.script
+# RUN: ld.lld %t2 %tar --script %t.script -o %tout
+# RUN: llvm-readobj -symbols %tout | FileCheck %s
+
+# This test is to ensure a linker script can define a symbol which have the same
+# name as a lazy symbol.
+
+# CHECK: Name: foo
+# CHECK-NEXT: Value: 0x1