Gas vs irregular files

Andreas Schwab schwab@suse.de
Thu Dec 18 23:18:00 GMT 2003
Nick Clifton <nickc@redhat.com> writes:

> 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):
>
>   Error: can't open <name-of-directory> for reading
>   <name-of-directory>: No error

But only because the handling of errno is flawed.  as_bad makes
library calls that may alter errno, so the original value is lost when
as_perror is called.  This continues to be a problem even with your
patch, because as_perror is also broken in this regard.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list