You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
\f
#include "bfd.h"
#include "progress.h"
Do not copy symbol <name> unless needed by\n\
relocations\n\
--only-keep-debug Strip everything but the debug information\n\
- -K --keep-symbol <name> Only copy symbol <name>\n\
+ -K --keep-symbol <name> Do not strip symbol <name>\n\
-L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
--globalize-symbol <name> Force symbol <name> to be marked as a global\n\
-G --keep-global-symbol <name> Localize all symbols except <name>\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
--only-keep-debug Strip everything but the debug information\n\
-N --strip-symbol=<name> Do not copy symbol <name>\n\
- -K --keep-symbol=<name> Only copy symbol <name>\n\
+ -K --keep-symbol=<name> Do not strip symbol <name>\n\
-w --wildcard Permit wildcard in symbol comparison\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
l = xmalloc (sizeof (struct name_list));
l->name = output_name;
l->next = list;
+ l->obfd = NULL;
list = l;
if (output_bfd == NULL)
else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
{
bfd *obfd;
- bfd_boolean delete;
do_copy:
/* bfd_get_target does not return the correct value until
if (obfd == NULL)
RETURN_NONFATAL (output_filename);
- delete = ! copy_object (ibfd, obfd);
+ if (! copy_object (ibfd, obfd))
+ status = 1;
if (!bfd_close (obfd))
RETURN_NONFATAL (output_filename);
if (!bfd_close (ibfd))
RETURN_NONFATAL (input_filename);
- if (delete)
- {
- unlink_if_ordinary (output_filename);
- status = 1;
- }
}
else
{
if (status == 0 && preserve_dates)
set_times (output_filename, &statbuf);
+ else if (status != 0)
+ unlink_if_ordinary (output_filename);
}
if (change_warn)