From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15849 invoked by alias); 15 Apr 2005 16:27:38 -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 15746 invoked from network); 15 Apr 2005 16:27:35 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 15 Apr 2005 16:27:35 -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 j3FGRZZR015400 for ; Fri, 15 Apr 2005 12:27:35 -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 j3FGRYO00777; Fri, 15 Apr 2005 12:27:34 -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 j3FGRXkk023882; Fri, 15 Apr 2005 17:27:33 +0100 Message-ID: <425FEB14.20601@redhat.com> Date: Fri, 15 Apr 2005 16:27: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> <425D43A3.3090706@redhat.com> <7f45d93905041310211a32f090@mail.gmail.com> <425E3D63.5080104@redhat.com> <7f45d93905041408251402df05@mail.gmail.com> <425F8537.1070202@redhat.com> <7f45d93905041509004cdad56a@mail.gmail.com> In-Reply-To: <7f45d93905041509004cdad56a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00425.txt.bz2 Hi Shaun, > 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'. If no payload was provided then shouldn't the build fail ? [Of course it is your system so it can behave as you wish]. > 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. You could easily create an dummy empty.o (eg using the objcopy patched in the way you suggested) and then just copy this file into place if the build process failed to create a non-zero length output file. Cheers Nick