Gas vs irregular files

Maciej W. Rozycki macro@ds2.pg.gda.pl
Thu Dec 18 14:54:00 GMT 2003
On Thu, 18 Dec 2003, Nick Clifton wrote:

> Ok then, how about this patch ?  It removes the call to stat() and adds
> a code to detect an for an attempt to read a directory, but only if
> the read of the first character in the file fails.  I think that this
> extra check is helpful, since otherwise an attempt to assemble a
> directory would produce these error messages (on a RH9 box anyway):

 This is a very good change -- I can see now that in case an error happens
when getting the first character, gas would happily assume the file is
empty and produce a valid output for that.  But the file might not be
empty, yet reading could fail for whatever reason, e.g. -EIO due to a
medium error.  That's one reason gas would successfully assemble an
unreadable directory before your first attempt to address the problem.  
If any error happens upon a read, the invoker certainly wants to know
about it.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



More information about the Binutils mailing list