diff options
Diffstat (limited to 'ld/testsuite/ld-m68k')
-rw-r--r-- | ld/testsuite/ld-m68k/isaa-mac.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaa-mac.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaa-nodiv.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaa.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaa.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaaplus.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isaaplus.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isab-float.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isab-float.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isab-nousp.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isab.d | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/isab.s | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/m68k.exp | 47 | ||||
-rw-r--r-- | ld/testsuite/ld-m68k/merge.ld | 9 |
14 files changed, 112 insertions, 0 deletions
diff --git a/ld/testsuite/ld-m68k/isaa-mac.d b/ld/testsuite/ld-m68k/isaa-mac.d new file mode 100644 index 0000000..79b809a --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-mac.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 12: \[isa A\] \[mac\] + diff --git a/ld/testsuite/ld-m68k/isaa-mac.s b/ld/testsuite/ld-m68k/isaa-mac.s new file mode 100644 index 0000000..e3ec277 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-mac.s @@ -0,0 +1,3 @@ + .arch isaa,mac + + nop diff --git a/ld/testsuite/ld-m68k/isaa-nodiv.s b/ld/testsuite/ld-m68k/isaa-nodiv.s new file mode 100644 index 0000000..de327f1 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa-nodiv.s @@ -0,0 +1,3 @@ + .arch isaa,no-div + + nop diff --git a/ld/testsuite/ld-m68k/isaa.d b/ld/testsuite/ld-m68k/isaa.d new file mode 100644 index 0000000..48e4fa2 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 2: \[isa A\] + diff --git a/ld/testsuite/ld-m68k/isaa.s b/ld/testsuite/ld-m68k/isaa.s new file mode 100644 index 0000000..f4675c1 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaa.s @@ -0,0 +1,3 @@ + .arch isaa + + nop diff --git a/ld/testsuite/ld-m68k/isaaplus.d b/ld/testsuite/ld-m68k/isaaplus.d new file mode 100644 index 0000000..88623ce --- /dev/null +++ b/ld/testsuite/ld-m68k/isaaplus.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 3: \[isa A\+\] + diff --git a/ld/testsuite/ld-m68k/isaaplus.s b/ld/testsuite/ld-m68k/isaaplus.s new file mode 100644 index 0000000..5b0a0b8 --- /dev/null +++ b/ld/testsuite/ld-m68k/isaaplus.s @@ -0,0 +1,3 @@ + .arch isaaplus + + nop diff --git a/ld/testsuite/ld-m68k/isab-float.d b/ld/testsuite/ld-m68k/isab-float.d new file mode 100644 index 0000000..3547ea7 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-float.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 8045: \[cfv4e\] \[isa B\] \[float\] + diff --git a/ld/testsuite/ld-m68k/isab-float.s b/ld/testsuite/ld-m68k/isab-float.s new file mode 100644 index 0000000..3889d0d --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-float.s @@ -0,0 +1,3 @@ + .arch isab,float + + nop diff --git a/ld/testsuite/ld-m68k/isab-nousp.s b/ld/testsuite/ld-m68k/isab-nousp.s new file mode 100644 index 0000000..1e52357 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab-nousp.s @@ -0,0 +1,3 @@ + .arch isab,no-usp + + nop diff --git a/ld/testsuite/ld-m68k/isab.d b/ld/testsuite/ld-m68k/isab.d new file mode 100644 index 0000000..c5b0134 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab.d @@ -0,0 +1,7 @@ + +.*: file format elf32-m68k + +Program Header: +#... +private flags = 5: \[isa B\] + diff --git a/ld/testsuite/ld-m68k/isab.s b/ld/testsuite/ld-m68k/isab.s new file mode 100644 index 0000000..3f93db7 --- /dev/null +++ b/ld/testsuite/ld-m68k/isab.s @@ -0,0 +1,3 @@ + .arch isab + + nop diff --git a/ld/testsuite/ld-m68k/m68k.exp b/ld/testsuite/ld-m68k/m68k.exp new file mode 100644 index 0000000..5323317 --- /dev/null +++ b/ld/testsuite/ld-m68k/m68k.exp @@ -0,0 +1,47 @@ +# Expect script for run_dump_test based ld-m68k tests. +# Copyright 2006 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. +# +# Test m68k object merging + +if { ![is_elf_format] || ![istarget m68k-*-*] } { + return +} + +# List contains test-items with 3 items followed by 2 lists: +# 0:name 1:ld options 2:assembler options +# 3:filenames of assembler files 4: action and options. 5: name of output file + +# Actions: +# objdump: Apply objdump options on result. Compare with regex (last arg). +# nm: Apply nm options on result. Compare with regex (last arg). +# readelf: Apply readelf options on result. Compare with regex (last arg). + +set m68k_mergeok_tests { + {"merge isa-a isa-a:nodiv" "-T merge.ld" "" + {isaa.s isaa-nodiv.s} {{objdump -p isaa.d}} "isaa"} + {"merge isa-a isa-b" "-T merge.ld" "" + {isaa.s isab.s} {{objdump -p isab.d}} "isab"} + {"merge isa-a isa-aplus" "-T merge.ld" "" + {isaa.s isaaplus.s} {{objdump -p isaaplus.d}} "isaplus"} + {"merge isa-b isa-b:nousp" "-T merge.ld" "" + {isab.s isab-nousp.s} {{objdump -p isab.d}} "isab"} + {"merge isa-a isa-a:mac" "-T merge.ld" "" + {isaa.s isaa-mac.s} {{objdump -p isaa-mac.d}} "isaa-mac"} + {"merge isa-b isa-b:float" "-T merge.ld" "" + {isab.s isab-float.s} {{objdump -p isab-float.d}} "isab-float"}} + +run_ld_link_tests $m68k_mergeok_tests diff --git a/ld/testsuite/ld-m68k/merge.ld b/ld/testsuite/ld-m68k/merge.ld new file mode 100644 index 0000000..ed2acfe --- /dev/null +++ b/ld/testsuite/ld-m68k/merge.ld @@ -0,0 +1,9 @@ +OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", + "elf32-m68k") +OUTPUT_ARCH(m68k) +ENTRY(_start) + +SECTIONS { + + .text : {_start = .; *(.text)} +} |