From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6379 invoked by alias); 13 Apr 2005 16:08:58 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 5836 invoked from network); 13 Apr 2005 16:08:48 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 13 Apr 2005 16:08:48 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j3DG8m2g008816 for ; Wed, 13 Apr 2005 12:08:48 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j3DG8lO06177; Wed, 13 Apr 2005 12:08:47 -0400 Received: from [172.31.0.98] (vpnuser3.surrey.redhat.com [172.16.9.3]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j3DG8kbB003035; Wed, 13 Apr 2005 17:08:46 +0100 Message-ID: <425D43A3.3090706@redhat.com> Date: Wed, 13 Apr 2005 16:08:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) MIME-Version: 1.0 To: Shaun Jackman CC: binutils@sources.redhat.com Subject: Re: objcopy fails silently with an empty input file References: <7f45d939050412163547d2cfe9@mail.gmail.com> In-Reply-To: <7f45d939050412163547d2cfe9@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00321.txt.bz2 Hi Shaun, > objcopy silently fails when the input file is empty. I'd rather it > didn't fail -- this used to work in previous versions -- but it > definitely shouldn't fail silently. Please could you try the attached patch and let me know if you have any problems with it ? Cheers Nick binutils/ChangeLog 2005-04-13 Nick Clifton * objcopy.c (copy_file): Emit a message when skipping an empty input file. Index: binutils/objcopy.c =================================================================== RCS file: /cvs/src/src/binutils/objcopy.c,v retrieving revision 1.77 diff -c -3 -p -r1.77 objcopy.c *** binutils/objcopy.c 15 Mar 2005 17:45:18 -0000 1.77 --- binutils/objcopy.c 13 Apr 2005 16:06:23 -0000 *************** copy_file (const char *input_filename, c *** 1701,1706 **** --- 1701,1707 ---- if (get_file_size (input_filename) < 1) { + non_fatal (_("%s: empty input file"), input_filename); status = 1; return; }