This is the mail archive of the binutils@sourceware.org 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]

gold patch committed: Report correct name in error message


The code which handles file descriptors carefully sets the name to NULL
when it closes a descriptor.  This is fine because when any part of gold
which needs the descriptor again will pass in the name.  Unfortunately,
if we fail to reopen the file, we report the NULL name, rather than the
one which was passed in.  I committed this patch to fix the error
message.

Ian


2010-07-14  Ian Lance Taylor  <iant@google.com>

	* descriptors.cc (Descriptors::open): Report correct name in error
	message.


Index: descriptors.cc
===================================================================
RCS file: /cvs/src/src/gold/descriptors.cc,v
retrieving revision 1.8
diff -p -u -r1.8 descriptors.cc
--- descriptors.cc	10 Oct 2009 04:56:43 -0000	1.8
+++ descriptors.cc	14 Jul 2010 10:38:16 -0000
@@ -113,8 +113,7 @@ Descriptors::open(int descriptor, const 
 	      {
 		Hold_lock hl(*this->lock_);
 
-		gold_error(_("file %s was removed during the link"),
-			   this->open_descriptors_[descriptor].name);
+		gold_error(_("file %s was removed during the link"), name);
 	      }
 
 	      errno = ENOENT;

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