output renaming in objcopy & strip

Nathan Sidwell nathan@codesourcery.com
Thu May 17 17:08:00 GMT 2007


I had reason to backport objcopy's behaviour of deleting the output file in the 
face of error.  I noticed some inconsistencies between strip_main and 
objcopy_main, and this patch fixes them up.

1) objcopy detects when the output and input filenames are the same.  strip did 
not.  Added the checking to strip

2) strip factors out the tempname generation, and uses the same code for the 
actual stripping call.  objcopy did not.  Refactored the objcopy code.

tested on m68k-elf, ok?

nathan
-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: all.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20070517/a11306c1/attachment.ksh>


More information about the Binutils mailing list