diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-04-12 19:20:46 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-04-12 19:20:46 +0000 |
commit | 1aa9ef630cd7777c24e5d1592c54fbeffad22fd8 (patch) | |
tree | 2cbf28a66892f65cc5b5900367250cfc718698c5 /binutils/objcopy.c | |
parent | 1d25768e7cf6e25e42dda41b370d477f37338756 (diff) | |
download | gdb-1aa9ef630cd7777c24e5d1592c54fbeffad22fd8.zip gdb-1aa9ef630cd7777c24e5d1592c54fbeffad22fd8.tar.gz gdb-1aa9ef630cd7777c24e5d1592c54fbeffad22fd8.tar.bz2 |
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.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index c955e37..d02b3e0 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -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; |