From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7448 invoked by alias); 15 Apr 2005 16:01:01 -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 7404 invoked from network); 15 Apr 2005 16:00:53 -0000 Received: from unknown (HELO rproxy.gmail.com) (64.233.170.205) by sourceware.org with SMTP; 15 Apr 2005 16:00:53 -0000 Received: by rproxy.gmail.com with SMTP id c51so646274rne for ; Fri, 15 Apr 2005 09:00:53 -0700 (PDT) Received: by 10.11.118.68 with SMTP id q68mr80641cwc; Fri, 15 Apr 2005 09:00:53 -0700 (PDT) Received: by 10.11.99.14 with HTTP; Fri, 15 Apr 2005 09:00:53 -0700 (PDT) Message-ID: <7f45d93905041509004cdad56a@mail.gmail.com> Date: Fri, 15 Apr 2005 16:01: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: <425F8537.1070202@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> <7f45d93905041408251402df05@mail.gmail.com> <425F8537.1070202@redhat.com> X-SW-Source: 2005-04/txt/msg00423.txt.bz2 On 4/15/05, Nick Clifton wrote: > Ah - unfortunately I do not think that this is a good idea. The input > file could be empty for a variety of reasons - it could be a device, a > pipe, or some other kind of system file, instead of just an ordinary, > zero-sized file. >=20 > Besides - what is the value in creating an output file from an empty > input file ? What possible use can this output file have ? Fair enough. The empty file is of limited use. I have an application that writes a payload binary to flash. To make sure the build succeeds, if a payload binary wasn't provided make simply touched 'payload.bin'. This had the slight benefit that if this app was mistakenly run it wouldn't bork the flash, since the payload is zero bytes. I'll replace 'touch payload.bin' with 'echo empty > payload.bin', but this inherent benefit is lost. Instead, the app will just have to check for a signature byte. Cheers, Shaun