diff options
author | Alan Modra <amodra@gmail.com> | 2010-02-18 00:13:30 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-02-18 00:13:30 +0000 |
commit | b2fc24d469b6025b1a7729acb6032e74a875a734 (patch) | |
tree | b4580dfeee31095a2122eeeee77268dd092d1482 /binutils/testsuite | |
parent | 415f38a6d04c239b62ef3b384eb8376e5838e8df (diff) | |
download | gdb-b2fc24d469b6025b1a7729acb6032e74a875a734.zip gdb-b2fc24d469b6025b1a7729acb6032e74a875a734.tar.gz gdb-b2fc24d469b6025b1a7729acb6032e74a875a734.tar.bz2 |
* binutils-all/group-5.s, * binutils-all/group-5.d: New test.
* binutils-all/objcopy.exp: Run it.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/group-5.d | 19 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/group-5.s | 12 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 1 |
4 files changed, 37 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index e9c6bc0..641bd36 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-02-18 Alan Modra <amodra@gmail.com> + + * binutils-all/group-5.s, * binutils-all/group-5.d: New test. + * binutils-all/objcopy.exp: Run it. + 2010-02-01 Nathan Sidwell <nathan@codesourcery.com> * binutils-all/note-1.d: New. diff --git a/binutils/testsuite/binutils-all/group-5.d b/binutils/testsuite/binutils-all/group-5.d new file mode 100644 index 0000000..d40fffe --- /dev/null +++ b/binutils/testsuite/binutils-all/group-5.d @@ -0,0 +1,19 @@ +#PROG: objcopy +#readelf: -Sg --wide +#objcopy: --remove-section .dropme +#name: copy removing group member + +#readelf: -Sg --wide + +#... + \[[ 0-9]+\] foo_group[ \t]+GROUP[ \t]+.* +#... + \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t0-9a-f]+AXG.* +#... + \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t0-9a-f]+WAG.* +#... +COMDAT group section \[[ 0-9]+\] `foo_group' \[foo_group\] contains 2 sections: + \[Index\] Name + \[[ 0-9]+\] .text.* + \[[ 0-9]+\] .data.* +#pass diff --git a/binutils/testsuite/binutils-all/group-5.s b/binutils/testsuite/binutils-all/group-5.s new file mode 100644 index 0000000..b2e100a --- /dev/null +++ b/binutils/testsuite/binutils-all/group-5.s @@ -0,0 +1,12 @@ + .section .text.foo,"axG",%progbits,foo_group,comdat + .global foo +foo: + .word 0 + + .section .data.foo,"awG",%progbits,foo_group,comdat + .global bar +bar: + .word 1 + + .section .dropme,"G",%progbits,foo_group,comdat + .word 2 diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index f734e14..9761a06 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -834,6 +834,7 @@ if [is_elf_format] { objcopy_test_readelf "ELF group" group-2.s objcopy_test_readelf "ELF group" group-3.s objcopy_test_readelf "ELF group" group-4.s + run_dump_test "group-5" run_dump_test "copy-1" run_dump_test "note-1" } |