This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
No Subject
Date: Mon, 30 Nov 1998 05:02:11 -0500 (EST)
From: baccala@FreeSoft.org
I've got a question.
If an LD_PRELOAD shared library defines a symbol for
__open(), but not open(), should the weak alias for open()
in libc resolve to point to libc's __open(), or the preload
library's __open()?
The System V ABI documentation suggests that if an application wants
to override a symbol for which a global alias exists (such as
open()/__open() in your example), it must define both symbols to point at
the same object. So your case appears to be "undefined". However it
makes sense that the weak alias for open() in libc would still point
at libc's __open(), which IMHO is the only sensible thing.
Mark