This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: a patch to set ELF header flags for empty linker output files
- To: hjl at valinux dot com
- Subject: Re: a patch to set ELF header flags for empty linker output files
- From: Nick Clifton <nickc at redhat dot com>
- Date: Tue, 16 Jan 2001 10:01:33 -0800
- CC: wilson at cygnus dot com, binutils at sources dot redhat dot com
Hi H.J.
: I think "ld -r" is the only way to generate an empty file. However,
: I'd like to see to ignore empty input files for all platforms, not
: just ia64. Something like
:
: bool bfd_has_contents (bfd *abfd)
:
: should work. We can default it to 1.
Detecting empty files might be a problem. Object files which only
contain sections which are going to be discarded are 'empty' as are
object files whose sections are thrown away due to garbage collection.
: If we believe it is ok to ignore an empty input file, why a
: meaningless warning? We should either silently ignore it or
: generate an error.
My thought was that it might help a confused programmer track down a
bug in their build. I wouldn't mind if the message was only enabled
with --verbose or some other command line switch though.
Cheers
Nick