PR binutils/4348
	* objcopy.c (copy_object): Don't stop when there are no
	sections to be copied.

testsuite/

2007-04-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/4348
	* binutils-all/empty.s: New file.
	* binutils-all/strip-3.d: Likewise.

	* binutils-all/objcopy.exp: Run strip-3 for ELF target.
This commit is contained in:
H.J. Lu
2007-04-12 19:20:46 +00:00
parent 1d25768e7c
commit 1aa9ef630c
6 changed files with 29 additions and 7 deletions

View File

@@ -0,0 +1 @@
# An empty file.

View File

@@ -737,5 +737,6 @@ if [is_elf_format] {
run_dump_test "localize-hidden-1"
run_dump_test "strip-1"
run_dump_test "strip-2"
run_dump_test "strip-3"
}
run_dump_test "localize-hidden-2"

View File

@@ -0,0 +1,11 @@
#PROG: strip
#source: empty.s
#strip: -R .text -R .data -R .bss
#readelf: -S --wide
#name: strip empty file
#target: *-*-linux*
#...
\[[ 0]+\][ \t]+NULL[ \t]+.*
\[[ 1]+\] \.shstrtab.*[ \t]+STRTAB[ \t]+.*
#pass