summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/synthetic-relsec-layout.s
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/ELF/linkerscript/synthetic-relsec-layout.s')
-rw-r--r--lld/test/ELF/linkerscript/synthetic-relsec-layout.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/lld/test/ELF/linkerscript/synthetic-relsec-layout.s b/lld/test/ELF/linkerscript/synthetic-relsec-layout.s
new file mode 100644
index 00000000000..efaa946cbaa
--- /dev/null
+++ b/lld/test/ELF/linkerscript/synthetic-relsec-layout.s
@@ -0,0 +1,16 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: echo "SECTIONS { .foo : { *(.rela.dyn) } }" > %t.script
+# RUN: ld.lld -T %t.script %t.o -o %t.so -shared
+# RUN: llvm-readobj -r %t.so | FileCheck %s
+
+# Check we are able to do custom layout for synthetic sections.
+# (here we check we can place synthetic .rela.dyn into .foo).
+
+# CHECK: Relocations [
+# CHECK: Section ({{.*}}) .foo {
+# CHECK: R_X86_64_64 .foo 0x0
+# CHECK: }
+
+.data
+.quad .foo
OpenPOWER on IntegriCloud