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/14/05, Nick Clifton <nickc@redhat.com> wrote:
> Hi Shaun,
> 
> > Thanks, Nick. The patch works, although it doesn't allow for this use case:
> > $ 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 [...]
> 
> Strange - I do not get that behaviour:
> 
>    % 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
> 
> Are you sure that you applied the patch I sent correctly ?
> 
> 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


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