summaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/provide-shared.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:21 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:12:21 +0000
commiteb1ff93d02b5f17b6b409e83c6d9be585f4a04b3 (patch)
tree7490b4a8943293f251ad733465936e6ec302b3e9 /test/ELF/linkerscript/provide-shared.s
parentbafea25f368c63f0b39789906adfed6e39219e64 (diff)
Notes
Diffstat (limited to 'test/ELF/linkerscript/provide-shared.s')
-rw-r--r--test/ELF/linkerscript/provide-shared.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/provide-shared.s b/test/ELF/linkerscript/provide-shared.s
new file mode 100644
index 000000000000..e3f1bdb2ea3d
--- /dev/null
+++ b/test/ELF/linkerscript/provide-shared.s
@@ -0,0 +1,13 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/provide-shared.s -o %t2.o
+# RUN: ld.lld %t2.o -o %t2.so -shared
+# RUN: echo "SECTIONS { . = . + SIZEOF_HEADERS; PROVIDE(foo = 42);}" > %t.script
+# RUN: ld.lld -o %t --script %t.script %t.o %t2.so
+# RUN: llvm-objdump -t %t | FileCheck %s
+
+# CHECK: 000000000000002a *ABS* 00000000 foo
+
+.global _start
+_start:
+.quad foo