This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gold patch committed: Report correct name in error message
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Wed, 14 Jul 2010 03:40:41 -0700
- Subject: 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;