binutils/

2006-09-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/3182
	* objcopy.c (group_signature): Return proper group signature.

binutils/testsuite/

2006-09-14  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/3182
	* binutils-all/objcopy.exp: Run strip-1 and strip-2 for ELF
	targets.

	* binutils-all/strip-1.d: New file.
	* binutils-all/strip-2.d: Likewise.

	* lib/utils-lib.exp (run_dump_test): Support strip.
This commit is contained in:
H.J. Lu
2006-09-14 23:37:35 +00:00
parent 30288845d6
commit 748fc5e9b4
7 changed files with 56 additions and 5 deletions

View File

@@ -731,5 +731,7 @@ run_dump_test "copy-3"
if [is_elf_format] {
run_dump_test "localize-hidden-1"
run_dump_test "strip-1"
run_dump_test "strip-2"
}
run_dump_test "localize-hidden-2"

View File

@@ -0,0 +1,11 @@
#PROG: strip
#source: group.s
#readelf: -Sg --wide
#name: strip with section group 1
#...
\[[ 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.

View File

@@ -0,0 +1,18 @@
#PROG: strip
#source: group.s
#strip: --strip-unneeded
#readelf: -Sg --wide
#name: strip with section group 2
#...
\[[ 0-9]+\] foo_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]+\] `foo_group' \[foo_group\] contains 2 sections:
\[Index\] Name
\[[ 0-9]+\] .text.*
\[[ 0-9]+\] .data.*
#pass