diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp (renamed from ld/testsuite/ld-elf/sec64k.exp) | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/merge.d | 14 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/merge.ld | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/merge.s | 14 |
5 files changed, 55 insertions, 4 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 0fe80b00d7..09e1f12c18 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-11-21 Alan Modra <amodra@bigpond.net.au> + + * ld-elf/elf.exp: Renamed from sec64k.exp. Add test_list loop. + * ld-elf/merge.s: New file. + * ld-elf/merge.d: New file. + * ld-elf/merge.ld: New file. + 2002-11-18 Svein E. Seldal <Svein.Seldal@solidas.com> * ld-scripts/script.exp: Setup for tic4x testcase diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/elf.exp index bfc6d0fdcc..0914695e57 100644 --- a/ld/testsuite/ld-elf/sec64k.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -1,4 +1,4 @@ -# Expect script for tests for >64k sections +# Expect script for various ELF tests. # Copyright 2002 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify @@ -32,15 +32,24 @@ if { [istarget *-*-linux*aout*] \ return } +set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]] +foreach t $test_list { + # We need to strip the ".d", but can leave the dirname. + verbose [file rootname $t] + run_dump_test [file rootname $t] +} + + +# Test >64k sections, with and without -r. + # Per-port excludes, since this test takes an overwhelmingly long time # currently. if { ![istarget cris-*-*] } { return } -# Test >64k sections, with and without -r. First, create the assembly -# files. Have a relocation to another section and one within the local -# section. +# First, create the assembly files. Have a relocation to another +# section and one within the local section. set test1 "64ksec-r" set test2 "64ksec" diff --git a/ld/testsuite/ld-elf/merge.d b/ld/testsuite/ld-elf/merge.d new file mode 100644 index 0000000000..cbefcaf760 --- /dev/null +++ b/ld/testsuite/ld-elf/merge.d @@ -0,0 +1,14 @@ +#source: merge.s +#ld: -T merge.ld +#objdump: -s +#xfail: "arc-*-*" "avr-*-*" "cris-*-*" "dlx-*-*" "fr30-*-*" "frv-*-*" +#xfail: "hppa*-*-*" "h8300-*-*" "i960-*-*" "ip2k-*-*" "m32r-*-*" "mcore-*-*" +#xfail: "mn10*-*-*" "openrisc-*-*" "pj-*-*" "sparc*-*-*" + +.*: file format .*elf.* + +Contents of section .text: + 1000 (1010)?0000(1010)? (1210)?0000(1012)? (0c)?000000(0c)? (0e)?000000(0e)? .* +Contents of section .rodata: + 1010 61626300 .* +#pass diff --git a/ld/testsuite/ld-elf/merge.ld b/ld/testsuite/ld-elf/merge.ld new file mode 100644 index 0000000000..dce91bb40d --- /dev/null +++ b/ld/testsuite/ld-elf/merge.ld @@ -0,0 +1,7 @@ +SECTIONS +{ + . = 0x1000; + .text : { *(.text .text.* .gnu.linkonce.t.*) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .junk : { *(*) } +} diff --git a/ld/testsuite/ld-elf/merge.s b/ld/testsuite/ld-elf/merge.s new file mode 100644 index 0000000000..1e6e0e3494 --- /dev/null +++ b/ld/testsuite/ld-elf/merge.s @@ -0,0 +1,14 @@ + .section .rodata.str,"aMS","progbits",1 +.LC0: + .asciz "abc" +.LC1: + .asciz "c" + + .text + .global _start +_start: + .long .LC0 +.LT0: + .long .LC1 + .long .LC0-.LT0 + .long .LC1-.LT0 |