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

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

@ -1521,13 +1521,8 @@ copy_object (bfd *ibfd, bfd *obfd)
}
}
if (bfd_count_sections (obfd) == 0)
{
non_fatal (_("there are no sections to be copied!"));
return FALSE;
}
if (gap_fill_set || pad_to_set)
if (bfd_count_sections (obfd) != 0
&& (gap_fill_set || pad_to_set))
{
asection **set;
unsigned int c, i;