+2004-07-13 Nitin Yewale <nitiny@kpitcummins.com>
+
+ * ld-h8300/h8300.exp: Addition of gcsection test case.
+ * ld-h8300/gcsection.s: New test source file.
+ * ld-h8300/gcsection.d: New test expected disassembly file.
+
2004-07-08 Maciej W. Rozycki <macro@linux-mips.org>
* ld-mips-elf/reloc-merge-lo16.{s,d,ld}: New test.
--- /dev/null
+# name: H8300 GCC section test case
+# ld: --gc-sections -m h8300helf
+# objdump: -d --no-show-raw-insn
+.*: file format .*-h8300
+
+Disassembly of section .text:
+
+00000100 <_functionWeUse>:
+ 100: 01 00 6d f6 mov.l er6,@-er7
+ 104: 0f f6 mov.l er7,er6
+ 106: 1b 97 subs #4,er7
+ 108: 6f e0 ff fe mov.w r0,@\(0xfffe:16,er6\)
+ 10c: 6f 62 ff fe mov.w @\(0xfffe:16,er6\),r2
+ 110: 0d 20 mov.w r2,r0
+ 112: 0b 97 adds #4,er7
+ 114: 01 00 6d 76 mov.l @er7\+,er6
+ 118: 54 70 rts
+
+0000011a <_start>:
+ 11a: 01 00 6d f6 mov.l er6,@-er7
+ 11e: 0f f6 mov.l er7,er6
+ 120: 79 00 00 4b mov.w #0x4b,r0
+ 124: 5e 00 01 00 jsr @0x100:24
+ 128: 0d 02 mov.w r0,r2
+ 12a: 0d 20 mov.w r2,r0
+ 12c: 01 00 6d 76 mov.l @er7\+,er6
+ 130: 54 70 rts
--- /dev/null
+ .h8300h
+ .section .text.functionWeUse,"ax",@progbits
+ .align 1
+ .global _functionWeUse
+_functionWeUse:
+ mov.l er6,@-er7
+ mov.l er7,er6
+ subs #4,er7
+ mov.w r0,@(-2,er6)
+ mov.w @(-2,er6),r2
+ mov.w r2,r0
+ adds #4,er7
+ mov.l @er7+,er6
+ rts
+ .size _functionWeUse, .-_functionWeUse
+ .section .text.functionWeDontUse,"ax",@progbits
+ .align 1
+ .global _functionWeDontUse
+_functionWeDontUse:
+ mov.l er6,@-er7
+ mov.l er7,er6
+ subs #4,er7
+ mov.w r0,@(-2,er6)
+ mov.w @(-2,er6),r2
+ mov.w r2,r0
+ adds #4,er7
+ mov.l @er7+,er6
+ rts
+ .size _functionWeDontUse, .-_functionWeDontUse
+ .section .text.start,"ax",@progbits
+ .align 1
+ .global _start
+_start:
+ mov.l er6,@-er7
+ mov.l er7,er6
+ mov.w #75,r0
+ jsr @_functionWeUse
+ mov.w r0,r2
+ mov.w r2,r0
+ mov.l @er7+,er6
+ rts
+ .size _start, .-_start
+ .end