aboutsummaryrefslogtreecommitdiff
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/pr17550-1.s9
-rw-r--r--ld/testsuite/ld-elf/pr17550-2.s6
-rw-r--r--ld/testsuite/ld-elf/pr17550-3.s14
-rw-r--r--ld/testsuite/ld-elf/pr17550-4.s15
-rw-r--r--ld/testsuite/ld-elf/pr17550a.d14
-rw-r--r--ld/testsuite/ld-elf/pr17550b.d14
-rw-r--r--ld/testsuite/ld-elf/pr17550c.d9
-rw-r--r--ld/testsuite/ld-elf/pr17550d.d13
8 files changed, 94 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr17550-1.s b/ld/testsuite/ld-elf/pr17550-1.s
new file mode 100644
index 0000000..3da73dc
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550-1.s
@@ -0,0 +1,9 @@
+ .section .data,"awG",%progbits,foo_group,comdat
+ .dc.a x_alias
+ .type x, %object
+ .p2align 2
+ .size x, 4
+x:
+ .zero 4
+ .globl x_alias
+ .set x_alias,x
diff --git a/ld/testsuite/ld-elf/pr17550-2.s b/ld/testsuite/ld-elf/pr17550-2.s
new file mode 100644
index 0000000..eb4120f
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550-2.s
@@ -0,0 +1,6 @@
+ .section .data,"awG",%progbits,foo_group,comdat
+ .type x, %object
+ .p2align 2
+ .size x, 4
+x:
+ .zero 4
diff --git a/ld/testsuite/ld-elf/pr17550-3.s b/ld/testsuite/ld-elf/pr17550-3.s
new file mode 100644
index 0000000..3d7c252
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550-3.s
@@ -0,0 +1,14 @@
+ .data
+ .dc.a y
+ .section .data,"awG",%progbits,foo_group,comdat
+ .type y, %object
+ .size y, 4
+y:
+ .zero 4
+ .globl x
+ .type x, %object
+ .size x, 4
+x:
+ .zero 4
+ .globl x_alias
+ .set x_alias,x
diff --git a/ld/testsuite/ld-elf/pr17550-4.s b/ld/testsuite/ld-elf/pr17550-4.s
new file mode 100644
index 0000000..d0442fd
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550-4.s
@@ -0,0 +1,15 @@
+ .data
+ .dc.a y
+ .section .data,"awG",%progbits,foo_group,comdat
+ .globl y
+ .type y, %object
+ .size y, 4
+y:
+ .zero 4
+ .globl x
+ .type x, %object
+ .size x, 4
+x:
+ .zero 4
+ .globl x_alias
+ .set x_alias,x
diff --git a/ld/testsuite/ld-elf/pr17550a.d b/ld/testsuite/ld-elf/pr17550a.d
new file mode 100644
index 0000000..c8f0424
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550a.d
@@ -0,0 +1,14 @@
+#source: pr17550-1.s
+#source: pr17550-2.s
+#ld: -r
+#readelf: -s --wide
+#notarget: alpha-*-* cr16-*-* crx-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+# Disabled on alpha because alpha has a different .set directive.
+# cr16 and crx use non-standard scripts with memory regions, which don't
+# play well with comdat group sections under ld -r. Generic linker
+# targets don't support comdat group sections.
+
+#failif
+#...
+ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +UND x_alias
+#...
diff --git a/ld/testsuite/ld-elf/pr17550b.d b/ld/testsuite/ld-elf/pr17550b.d
new file mode 100644
index 0000000..d189747
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550b.d
@@ -0,0 +1,14 @@
+#source: pr17550-2.s
+#source: pr17550-1.s
+#ld: -r
+#readelf: -s --wide
+#notarget: alpha-*-* cr16-*-* crx-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+# Disabled on alpha because alpha has a different .set directive.
+# cr16 and crx use non-standard scripts with memory regions, which don't
+# play well with comdat group sections under ld -r. Generic linker
+# targets don't support comdat group sections.
+
+#failif
+#...
+ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +UND x_alias
+#...
diff --git a/ld/testsuite/ld-elf/pr17550c.d b/ld/testsuite/ld-elf/pr17550c.d
new file mode 100644
index 0000000..23a83f1
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550c.d
@@ -0,0 +1,9 @@
+#source: pr17550-2.s
+#source: pr17550-3.s
+#ld: -r
+#error: .*: defined in discarded section `\.data\[foo_group\]'
+#notarget: alpha-*-* cr16-*-* crx-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+# Disabled on alpha because alpha has a different .set directive.
+# cr16 and crx use non-standard scripts with memory regions, which don't
+# play well with comdat group sections under ld -r. Generic linker
+# targets don't support comdat group sections.
diff --git a/ld/testsuite/ld-elf/pr17550d.d b/ld/testsuite/ld-elf/pr17550d.d
new file mode 100644
index 0000000..e8fad96
--- /dev/null
+++ b/ld/testsuite/ld-elf/pr17550d.d
@@ -0,0 +1,13 @@
+#source: pr17550-2.s
+#source: pr17550-4.s
+#ld: -r
+#readelf: -s --wide
+#notarget: alpha-*-* cr16-*-* crx-*-* d30v-*-* dlx-*-* i960-*-* pj*-*-*
+# Disabled on alpha because alpha has a different .set directive.
+# cr16 and crx use non-standard scripts with memory regions, which don't
+# play well with comdat group sections under ld -r. Generic linker
+# targets don't support comdat group sections.
+
+#...
+ +[0-9]+: +[0-9a-f]+ +0 +OBJECT +GLOBAL +DEFAULT +UND y
+#pass