summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/linkonce1.d12
-rw-r--r--ld/testsuite/ld-elf/linkonce1a.s3
-rw-r--r--ld/testsuite/ld-elf/linkonce1b.s17
-rw-r--r--ld/testsuite/ld-elf/linkonce2.d12
4 files changed, 44 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/linkonce1.d b/ld/testsuite/ld-elf/linkonce1.d
new file mode 100644
index 00000000000..35e1787f181
--- /dev/null
+++ b/ld/testsuite/ld-elf/linkonce1.d
@@ -0,0 +1,12 @@
+#source: linkonce1a.s
+#source: linkonce1b.s
+#ld: -r
+#objdump: -r
+
+.*: file format .*
+
+RELOCATION RECORDS FOR \[.debug_frame\]:
+OFFSET[ ]+TYPE[ ]+VALUE[ ]*
+.*(NONE|unused).*\*ABS\*
+
+#pass
diff --git a/ld/testsuite/ld-elf/linkonce1a.s b/ld/testsuite/ld-elf/linkonce1a.s
new file mode 100644
index 00000000000..5c2d8c25a3a
--- /dev/null
+++ b/ld/testsuite/ld-elf/linkonce1a.s
@@ -0,0 +1,3 @@
+ .section .gnu.linkonce.d.dummy,"aw"
+bar:
+ .long 0
diff --git a/ld/testsuite/ld-elf/linkonce1b.s b/ld/testsuite/ld-elf/linkonce1b.s
new file mode 100644
index 00000000000..fd45cec5408
--- /dev/null
+++ b/ld/testsuite/ld-elf/linkonce1b.s
@@ -0,0 +1,17 @@
+ .globl main
+ .globl start
+ .globl _start
+ .globl __start
+ .text
+main:
+start:
+_start:
+__start:
+ .long 0
+
+ .section .gnu.linkonce.d.dummy,"aw"
+ .long 0
+foo:
+ .long 0
+ .section .debug_frame,"",%progbits
+ .long foo
diff --git a/ld/testsuite/ld-elf/linkonce2.d b/ld/testsuite/ld-elf/linkonce2.d
new file mode 100644
index 00000000000..33eb14fff0f
--- /dev/null
+++ b/ld/testsuite/ld-elf/linkonce2.d
@@ -0,0 +1,12 @@
+#source: linkonce1a.s
+#source: linkonce1b.s
+#ld: -emit-relocs
+#objdump: -r
+
+.*: file format .*
+
+RELOCATION RECORDS FOR \[.debug_frame\]:
+OFFSET[ ]+TYPE[ ]+VALUE[ ]*
+.*(NONE|unused).*\*ABS\*
+
+#pass