From f206e905b33c5966ce7ff6ce4e94985af62e7b40 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 1 Oct 2008 23:10:48 +0000 Subject: 2008-10-01 H.J. Lu * binutils-all/group-3.s: New. * binutils-all/strip-6.d: Likewise. * binutils-all/strip-7.d: Likewise. * binutils-all/objcopy.exp: Test objcopy on group-3.s. Run strip-6 and strip-7. --- binutils/testsuite/ChangeLog | 9 +++++++++ binutils/testsuite/binutils-all/group-3.s | 8 ++++++++ binutils/testsuite/binutils-all/objcopy.exp | 3 +++ binutils/testsuite/binutils-all/strip-6.d | 11 +++++++++++ binutils/testsuite/binutils-all/strip-7.d | 18 ++++++++++++++++++ 5 files changed, 49 insertions(+) create mode 100644 binutils/testsuite/binutils-all/group-3.s create mode 100644 binutils/testsuite/binutils-all/strip-6.d create mode 100644 binutils/testsuite/binutils-all/strip-7.d (limited to 'binutils') diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index cd1181f..3dbf480 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2008-10-01 H.J. Lu + * binutils-all/group-3.s: New. + * binutils-all/strip-6.d: Likewise. + * binutils-all/strip-7.d: Likewise. + + * binutils-all/objcopy.exp: Test objcopy on group-3.s. Run + strip-6 and strip-7. + +2008-10-01 H.J. Lu + * binutils-all/group-2.s: New. * binutils-all/strip-4.d: Likewise. * binutils-all/strip-5.d: Likewise. diff --git a/binutils/testsuite/binutils-all/group-3.s b/binutils/testsuite/binutils-all/group-3.s new file mode 100644 index 0000000..7cf76a1 --- /dev/null +++ b/binutils/testsuite/binutils-all/group-3.s @@ -0,0 +1,8 @@ + .section .text,"axG",%progbits,foo,comdat + .global foo +foo: + .word 0 + .section .data,"awG",%progbits,foo,comdat + .global bar +bar: + .word 0 diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index c911289..848fb50 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -828,6 +828,7 @@ if [is_elf_format] { objcopy_test "ELF unknown section type" unknown.s objcopy_test_readelf "ELF group" group.s objcopy_test_readelf "ELF group" group-2.s + objcopy_test_readelf "ELF group" group-3.s run_dump_test "copy-1" } @@ -840,6 +841,8 @@ if [is_elf_format] { run_dump_test "strip-3" run_dump_test "strip-4" run_dump_test "strip-5" + run_dump_test "strip-6" + run_dump_test "strip-7" if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } { # Check to make sure we don't strip a symbol named in relocations. diff --git a/binutils/testsuite/binutils-all/strip-6.d b/binutils/testsuite/binutils-all/strip-6.d new file mode 100644 index 0000000..c5d4288 --- /dev/null +++ b/binutils/testsuite/binutils-all/strip-6.d @@ -0,0 +1,11 @@ +#PROG: strip +#source: group-3.s +#readelf: -Sg --wide +#name: strip with section group 6 + +#... + \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AX[ \t]+.* +#... + \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t0-9a-f]+WA[ \t]+.* +#... +There are no section groups in this file. diff --git a/binutils/testsuite/binutils-all/strip-7.d b/binutils/testsuite/binutils-all/strip-7.d new file mode 100644 index 0000000..11ce8bc --- /dev/null +++ b/binutils/testsuite/binutils-all/strip-7.d @@ -0,0 +1,18 @@ +#PROG: strip +#source: group-3.s +#strip: --strip-unneeded +#readelf: -Sg --wide +#name: strip with section group 7 + +#... + \[[ 0-9]+\] .group[ \t]+GROUP[ \t]+.* +#... + \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AXG[ \t]+.* +#... + \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t0-9a-f]+WAG[ \t]+.* +#... +COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections: + \[Index\] Name + \[[ 0-9]+\] .text.* + \[[ 0-9]+\] .data.* +#pass -- cgit v1.1