From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12329 invoked by alias); 14 Apr 2005 15:25:56 -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 12214 invoked from network); 14 Apr 2005 15:25:48 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.203) by sourceware.org with SMTP; 14 Apr 2005 15:25:48 -0000 Received: by rproxy.gmail.com with SMTP id j1so394267rnf for ; Thu, 14 Apr 2005 08:25:48 -0700 (PDT) Received: by 10.11.94.33 with SMTP id r33mr52862cwb; Thu, 14 Apr 2005 08:25:48 -0700 (PDT) Received: by 10.11.99.14 with HTTP; Thu, 14 Apr 2005 08:25:48 -0700 (PDT) Message-ID: <7f45d93905041408251402df05@mail.gmail.com> Date: Thu, 14 Apr 2005 15:25:00 -0000 From: Shaun Jackman Reply-To: Shaun Jackman To: binutils@sources.redhat.com Subject: Re: objcopy fails silently with an empty input file In-Reply-To: <425E3D63.5080104@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7f45d939050412163547d2cfe9@mail.gmail.com> <425D43A3.3090706@redhat.com> <7f45d93905041310211a32f090@mail.gmail.com> <425E3D63.5080104@redhat.com> X-SW-Source: 2005-04/txt/msg00375.txt.bz2 On 4/14/05, Nick Clifton wrote: > Hi Shaun, >=20 > > Thanks, Nick. The patch works, although it doesn't allow for this use c= ase: > > $ echo -n > empty > > $ arm-elf-objcopy -I binary -O elf32-little empty empty.o; echo $? > > arm-elf-objcopy: empty: empty input file > > 0 > > $ nm empty.o > > 00000000 D _binary_empty_end [...] >=20 > Strange - I do not get that behaviour: >=20 > % echo -n > empty > % objcopy -I binary -O elf32-little empty empty.o ; echo $? > objcopy: empty: empty input file > 1 > % nm empty.o > nm: 'empty.o': No such file >=20 > Are you sure that you applied the patch I sent correctly ? >=20 > Cheers > Nick Sorry, Nick . I wasn't clear. The use case I posted was the behaviour that I desired, which I get with the patch I posted. With your patch, I see the same behaviour as you do. To clear things up, I would like "empty input file" to be a warning, not an error, particularly when the input BFD is 'binary'. Cheers, Shaun