summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-sh/sh64/dlsection-1.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-sh/sh64/dlsection-1.s')
-rw-r--r--ld/testsuite/ld-sh/sh64/dlsection-1.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/testsuite/ld-sh/sh64/dlsection-1.s b/ld/testsuite/ld-sh/sh64/dlsection-1.s
new file mode 100644
index 000000000000..d83e6e1ebbd6
--- /dev/null
+++ b/ld/testsuite/ld-sh/sh64/dlsection-1.s
@@ -0,0 +1,17 @@
+! Test gc-sections and datalabel references.
+!
+! Datalabel reference to symbol in section .text2 should
+! prevent .text2 from being discarded.
+! Section .spurious can be discarded.
+ .mode SHmedia
+
+ .text
+ .global start
+ .global foo
+start: .long datalabel foo
+
+ .section .text2,"ax"
+foo: .long 23
+
+ .section .spurious,"ax"
+ .long 17