From 98ee5b9926f253be0454b4f543f0da7f28f8c4da Mon Sep 17 00:00:00 2001 From: dannybackx Date: Mon, 19 Oct 2009 18:07:32 +0000 Subject: [PATCH] More missing files git-svn-id: svn://svn.code.sf.net/p/cegcc/code/trunk@1394 d7810a3d-100a-0410-8641-c3624a9c11f1 --- .../testsuite/binutils-all/bfin/CVS/Entries | 3 ++ .../testsuite/binutils-all/bfin/CVS/Repository | 1 + .../binutils/testsuite/binutils-all/bfin/CVS/Root | 1 + .../testsuite/binutils-all/bfin/objdump.exp | 53 +++++++++++++++++++ .../testsuite/binutils-all/bfin/unknown-mode.s | 8 +++ .../binutils/testsuite/binutils-all/copy-4.d | 9 ++++ .../binutils/testsuite/binutils-all/strip-10.d | 8 +++ .../testsuite/binutils-all/testranges-ia64.d | 15 ++++++ .../testsuite/binutils-all/testranges-ia64.s | 57 ++++++++++++++++++++ .../binutils/testsuite/binutils-all/testranges.d | 15 ++++++ .../binutils/testsuite/binutils-all/testranges.s | 61 ++++++++++++++++++++++ .../binutils/testsuite/binutils-all/unique.s | 4 ++ 12 files changed, 235 insertions(+) create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Entries create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Repository create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Root create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/objdump.exp create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/unknown-mode.s create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/copy-4.d create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/strip-10.d create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.d create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.s create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.d create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.s create mode 100644 cegcc/src/binutils/binutils/testsuite/binutils-all/unique.s diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Entries b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Entries new file mode 100644 index 000000000..bc9cdac38 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Entries @@ -0,0 +1,3 @@ +/objdump.exp/1.1/Wed Sep 2 09:35:12 2009// +/unknown-mode.s/1.1/Wed Sep 2 09:35:12 2009// +D diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Repository b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Repository new file mode 100644 index 000000000..7d548a410 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Repository @@ -0,0 +1 @@ +src/binutils/testsuite/binutils-all/bfin diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Root b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Root new file mode 100644 index 000000000..9b8bceadb --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/CVS/Root @@ -0,0 +1 @@ +:pserver:anoncvs@sourceware.org:/cvs/src diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/objdump.exp b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/objdump.exp new file mode 100644 index 000000000..df7d4da8b --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/objdump.exp @@ -0,0 +1,53 @@ +# Copyright 2009 +# Free Software Foundation, Inc. + +# This program 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 3 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. + +if {![istarget "bfin-*-*"]} then { + return +} + +if {[which $OBJDUMP] == 0} then { + perror "$OBJDUMP does not exist" + return +} + +send_user "Version [binutil_version $OBJDUMP]" + +################################### +# Set up the test of unknown-mode.s +################################### + +if {![binutils_assemble $srcdir/$subdir/unknown-mode.s tmpdir/unknown-mode.o]} then { + return +} + +if [is_remote host] { + set objfile [remote_download host tmpdir/unknown-mode.o] +} else { + set objfile tmpdir/unknown-mode.o +} + +# Make sure that the unknown mode does not cause abort. + +set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -D $objfile"] + +set want "e1 c1\[ \t\]*ILLEGAL.*34 98 .*\[\r\n\]" + +if [regexp $want $got] then { + pass "unknown mode test" +} else { + fail "unknown mode test" +} diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/unknown-mode.s b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/unknown-mode.s new file mode 100644 index 000000000..3c477f27c --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/bfin/unknown-mode.s @@ -0,0 +1,8 @@ + .text + + // Below 4 bytes are "A1 += R6.H * R4.L (IS);" + // with a invalid mode "0xf". + .byte 0xe1 + .byte 0xc1 + .byte 0x34 + .byte 0x98 diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/copy-4.d b/cegcc/src/binutils/binutils/testsuite/binutils-all/copy-4.d new file mode 100644 index 000000000..41fccf004 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/copy-4.d @@ -0,0 +1,9 @@ +#PROG: strip +#source: bintest.s +#strip: --strip-unneeded +#nm: -n +#name: strip --strip-unneeded on common symbol + +#... +0+04 C common_symbol +#pass diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/strip-10.d b/cegcc/src/binutils/binutils/testsuite/binutils-all/strip-10.d new file mode 100644 index 000000000..588c7d125 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/strip-10.d @@ -0,0 +1,8 @@ +#PROG: strip +#source: unique.s +#strip: -g +#readelf: -s +#name: strip on STB_GNU_UNIQUE + +#... + +[0-9]+: +[0-9a-f]+ +[0-9]+ +OBJECT +(UNIQUE|: 10) +DEFAULT +[1-9] foo diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.d b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.d new file mode 100644 index 000000000..9713236b3 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.d @@ -0,0 +1,15 @@ +#PROG: objcopy +#source: testranges-ia64.s +#readelf: -wR --wide +#name: unordered .debug_info references to .debug_ranges +#target: ia64-*-* + +Contents of the .debug_ranges section: + + Offset Begin End + 00000000 00000001 00000002 + 00000000 + 00000010 00000000 00000002 + 00000010 + +#pass diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.s b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.s new file mode 100644 index 000000000..9af6b634c --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges-ia64.s @@ -0,0 +1,57 @@ +# Test .debug_info can reference .debug_ranges entries without ordering the +# offsets strictly as increasing. + + .text +start: + .byte 1 +sub: + .byte 2 +end: + + .section .debug_ranges,"",@progbits +range: + +range_sub: + data4.ua @secrel(sub), @secrel(end) + data4.ua 0, 0 /* range terminator */ + +range_cu: + data4.ua @secrel(start), @secrel(end) + data4.ua 0, 0 /* range terminator */ + + .section .debug_info,"",@progbits + data4.ua debugE - debugS /* Length of Compilation Unit Info */ +debugS: + .short 0x2 /* DWARF version number */ + data4.ua @secrel(abbrev0) /* Offset Into Abbrev. Section */ + .byte 0x4 /* Pointer Size (in bytes) */ + + .uleb128 0x1 /* (DIE (0xb) DW_TAG_compile_unit) */ + data4.ua range_cu - range /* DW_AT_ranges */ + + .uleb128 0x2 /* (DIE (0x6d) DW_TAG_subprogram) */ + .ascii "A\0" /* DW_AT_name */ + data4.ua range_sub - range /* DW_AT_ranges */ +debugE: + + .section .debug_abbrev,"",@progbits +abbrev0: + .uleb128 0x1 /* (abbrev code) */ + .uleb128 0x11 /* (TAG: DW_TAG_compile_unit) */ + .byte 0x0 /* DW_children_no */ + .uleb128 0x55 /* (DW_AT_ranges) */ + .uleb128 0x6 /* (DW_FORM_data4) */ + .byte 0x0 + .byte 0x0 + + .uleb128 0x2 /* (abbrev code) */ + .uleb128 0x2e /* (TAG: DW_TAG_subprogram) */ + .byte 0x0 /* DW_children_no */ + .uleb128 0x3 /* (DW_AT_name) */ + .uleb128 0x8 /* (DW_FORM_string) */ + .uleb128 0x55 /* (DW_AT_ranges) */ + .uleb128 0x6 /* (DW_FORM_data4) */ + .byte 0x0 + .byte 0x0 + + .byte 0x0 /* abbrevs terminator */ diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.d b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.d new file mode 100644 index 000000000..c074a35fc --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.d @@ -0,0 +1,15 @@ +#PROG: objcopy +#source: testranges.s +#readelf: -wR --wide +#name: unordered .debug_info references to .debug_ranges +#not-target: ia64-*-* + +Contents of the .debug_ranges section: + + Offset Begin End + 00000000 00000001 00000002 + 00000000 + 00000010 00000000 00000002 + 00000010 + +#pass diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.s b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.s new file mode 100644 index 000000000..e1f9931b9 --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/testranges.s @@ -0,0 +1,61 @@ +# Test .debug_info can reference .debug_ranges entries without ordering the +# offsets strictly as increasing. + + .text +start: + .byte 1 +sub: + .byte 2 +end: + + .section .debug_ranges,"",%progbits +range: + +range_sub: + .4byte sub, end + .4byte 0, 0 ;# range terminator + +range_cu: + .4byte start, end + .4byte 0, 0 ;# range terminator + + .section .debug_info,"",%progbits + .4byte debugE - debugS ;# Length of Compilation Unit Info +debugS: + .short 0x2 ;# DWARF version number + .4byte abbrev0 ;# Offset Into Abbrev. Section + .byte 0x4 ;# Pointer Size (in bytes) + + .uleb128 0x1 ;# (DIE (0xb) DW_TAG_compile_unit) + .4byte range_cu - range ;# DW_AT_ranges + + .uleb128 0x2 ;# (DIE (0x6d) DW_TAG_subprogram) + .ascii "A\0" ;# DW_AT_name + .4byte range_sub - range ;# DW_AT_ranges + + ;# minimal section alignment on alpha-* is 2, ensure no new invalid CU + ;# will be started. + .balign 2 +debugE: + + .section .debug_abbrev,"",%progbits +abbrev0: + .uleb128 0x1 ;# (abbrev code) + .uleb128 0x11 ;# (TAG: DW_TAG_compile_unit) + .byte 0x0 ;# DW_children_no + .uleb128 0x55 ;# (DW_AT_ranges) + .uleb128 0x6 ;# (DW_FORM_data4) + .byte 0x0 + .byte 0x0 + + .uleb128 0x2 ;# (abbrev code) + .uleb128 0x2e ;# (TAG: DW_TAG_subprogram) + .byte 0x0 ;# DW_children_no + .uleb128 0x3 ;# (DW_AT_name) + .uleb128 0x8 ;# (DW_FORM_string) + .uleb128 0x55 ;# (DW_AT_ranges) + .uleb128 0x6 ;# (DW_FORM_data4) + .byte 0x0 + .byte 0x0 + + .byte 0x0 ;# abbrevs terminator diff --git a/cegcc/src/binutils/binutils/testsuite/binutils-all/unique.s b/cegcc/src/binutils/binutils/testsuite/binutils-all/unique.s new file mode 100644 index 000000000..44fb7a09f --- /dev/null +++ b/cegcc/src/binutils/binutils/testsuite/binutils-all/unique.s @@ -0,0 +1,4 @@ + .data + .type foo,%gnu_unique_object +foo: + .byte 0 -- 2.11.4.GIT