diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-09-16 04:23:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-09-16 04:23:16 +0000 |
commit | 4881b5a74d060579acc960014a1cedab713e6591 (patch) | |
tree | 29a1d223877b4c089d6bbb799c14abf9716fc938 /binutils/testsuite/binutils-all | |
parent | 3475fe928892df696f6ea9b2c912e1379591e736 (diff) | |
download | binutils-redhat-4881b5a74d060579acc960014a1cedab713e6591.tar.gz |
Remove the group section if all members are removed.
binutils/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13180
* objcopy.c (is_strip_section_1): New.
(is_strip_section): Use it. Remove the group section if all
members are removed.
binutils/testsuite/
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13180
* binutils-all/group-6.d: New.
* binutils-all/group-6.s: Likewise.
* binutils-all/objcopy.exp: Run group-6 for ELF targrts.
Diffstat (limited to 'binutils/testsuite/binutils-all')
-rw-r--r-- | binutils/testsuite/binutils-all/group-6.d | 9 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/group-6.s | 4 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/group-6.d b/binutils/testsuite/binutils-all/group-6.d new file mode 100644 index 0000000000..3319745685 --- /dev/null +++ b/binutils/testsuite/binutils-all/group-6.d @@ -0,0 +1,9 @@ +#PROG: objcopy +#objcopy: --remove-section .text.foo +#name: copy removing all group member +#objdump: -fw + +#... +.*: +file format .* +architecture: .* +#pass diff --git a/binutils/testsuite/binutils-all/group-6.s b/binutils/testsuite/binutils-all/group-6.s new file mode 100644 index 0000000000..e4c2bdac14 --- /dev/null +++ b/binutils/testsuite/binutils-all/group-6.s @@ -0,0 +1,4 @@ + .text + .byte 0 + .section .text.foo,"axG",%progbits,foo,comdat + .byte 0 diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 7ad8497128..a22e98c90b 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -937,6 +937,7 @@ if [is_elf_format] { objcopy_test_readelf "ELF group" group-3.s objcopy_test_readelf "ELF group" group-4.s run_dump_test "group-5" + run_dump_test "group-6" run_dump_test "copy-1" run_dump_test "note-1" } |