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.

: > Right, but you could still have the case where a (non-archive) input
: > bfd is not empty, but will not contribute anything to the output
: > because all of its sections will be discarded.  In such a case you do
: > not really want this bfd to contribute to the ELF header flags
: > either.
: 
: That may be true. But it is much harder to do it right :-(.

Agreed :-)

: > : A patch like the one below.
: > 
: > This looks OK, although I would suggest that you can move the no
: > sections test to the surrounding else statement, and so avoid the
: > whole save and restore of the error handler.
: > 
: 
: Ok. Here is a new one.

This looks good, but can you add a comment as well, just saying that
since the input bfd is empty, it is not allowed to set the private
data of the output bfd, or some words to that effect.

Otherwise please consider this patch approved.

Cheers
	Nick

: H.J. Lu (hjl@valinux.com)
: ---
: 2001-01-16  H.J. Lu  <hjl@gnu.org>
: 
: 	* ldlang.c (lang_check): Merge the private data only if the
: 	input file has contents.

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