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]
Other format: [Raw text]

Re: Gas vs irregular files


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        +


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