This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Gas vs irregular files
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."