This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objcopy fails silently with an empty input file


On 4/15/05, Nick Clifton <nickc@redhat.com> 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.
> 
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]