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]

Re: a patch to set ELF header flags for empty linker output files


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

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