* ld-sh/sh64/dlsection-1.s, ld-sh/sh64/dlsection.sd: New.
+2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
+
+ * ld-sh/sh64/sh64.exp: Add dlsection.
+ * ld-sh/sh64/dlsection-1.s, ld-sh/sh64/dlsection.sd: New.
+
2002-08-16 Alan Modra <amodra@bigpond.net.au>
* ld-discard/discard.exp: xfail targets using generic linker.
--- /dev/null
+! 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
--- /dev/null
+
+.*: file format elf.*-sh64
+
+Contents of section \.text:
+ 1000 00001004 .*
+Contents of section \.text2:
+ 1004 00000017 .*
+Contents of section \.data:
+Contents of section \.ctors:
+Contents of section \.dtors:
+Contents of section \.sbss:
+Contents of section \.bss:
+Contents of section \.stack:
{"SH64 inter-file datalabel references, 32-bit ABI" "-mshelf32"
"--abi=32" {shdl-1.s shdl-2.s}
{{objdump -sr shdl64.sd} {objdump -x shdl32.xd}}}
+ {"SH64 inter-file datalabel references and gc-sections, 32-bit ABI" "-mshelf32 --gc-sections"
+ "--abi=32" {dlsection-1.s }
+ {{objdump -sr dlsection.sd}}}
+ {"SH64 inter-file datalabel references and gc-sections, 64-bit ABI" "-mshelf64 --gc-sections"
+ "--abi=64" {dlsection-1.s }
+ {{objdump -sr dlsection.sd}}}
{"SH64 simple partial linking, 32-bit ABI" "-mshelf32 -r"
"--abi=32" {rel-1.s rel-2.s}
{{objdump -sx rel32.xd}}}