Date: Tue, 12 Oct 1999 00:41:35 +0200
From: "Martin v. Loewis" <[EMAIL PROTECTED]>
> The symbol _xstat is an internal symbol for private use by glibc. You
> shouldn't have used that symbol in your program. Use stat instead,
> and recompile the offending program. And please use the glibc-bug
> script to report problems with glibc. This mailing list isn't
> reguarly read by glibc developers.
Although I lost the original message, I think I remember the concern
was with some application that the user had no source to, and so was
uncapable of recompiling. In that context, I have to questions:
- How did it come about that the application uses _xstat? That
function is not documented, and I can't see why anybody
intentionally invokes that in application code. Saying "you should
not have used it" seems like the wrong response, since it seems that
it was not actively used.
I still can't understand how the symbol got into the exectuble, but
I have a theory: Some (static) library was compiled for libc5, and
the C source used stat. As a result, this expanded to _xstat in the
object code of the library. The library continues to work with glibc
2, so the application developer continues to use it. While this is
still a mistake on part of whoever provided the library, this is not
as bad as "you fool shouldn't have used _xstat in the first
place". Please comment.
Another possibility is that the libc5 header was used instead of the
glibc one, because glibc was incorrectly installed. This has actually
happened before (but quite a long time ago).
- Now that the symbol is used, is there a mechanism to run
applications relying on it? I would think that a proper LD_PRELOAD
object could help, delegating from _xstat to __xstat. If such a
library is provided, it would help people using glibc. People could
then wrap the applications with a shell script setting LD_PRELOAD.
Should be possible but I don't think any of the glibc developers is
going to spend time on implementing it.
In retrospect my message was a bit harsh. Guess that's what happens
if you see too many messages from people complaining about glibc who
are not reading the documentation and do not make very much effort in
filing bug reports :-(.
Mark