This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [Fwd: Overriding glibc functions]
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jeremy Fitzhardinge <jeremy at goop dot org>
- Cc: Valgrind Developers <valgrind-developers at lists dot sourceforge dot net>,Robert Walsh <rjwalsh at durables dot org>,Nicholas Nethercote <njn25 at cam dot ac dot uk>,Julian Seward <jseward at acm dot org>,GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Fri, 18 Oct 2002 17:52:30 -0700
- Subject: Re: [Fwd: Overriding glibc functions]
- References: <1034983974.17684.31.camel@ezr> <20021018165810.A13953@lucon.org> <1034987181.17416.46.camel@ezr>
On Fri, Oct 18, 2002 at 05:26:21PM -0700, Jeremy Fitzhardinge wrote:
> On Fri, 2002-10-18 at 16:58, H. J. Lu wrote:
> > 1. There are supposed to be no differences between weak and strong
> > symbols in DSOs. I submitted a patch to glibc:
> >
> > http://sources.redhat.com/ml/libc-alpha/2001-09/msg00109.html
>
> It looks from that thread that the patch wasn't applied to 2.2. Does
> that mean it still needs to be applied, or has it been applied since. I
> really don't understand the issues here; can or explain, or is there a
I am pushing for it again.
> reference? In particular, what's DT_FILTER? Is it a mechanism for
> interposing symbols, or is it something else?
>
See
http://docs.sun.com/db/doc/806-0641
As I understand and I could be wrong, there may be still some problems
with DT_FILTER and DT_AUXILIARY in glibc.
> > 2. Glibc will make sure libpthread.so will override libc.so, weak
> > or strong. Please file a bug if it doesn't do so. But please make
> > sure your libpthread has:
> >
> > # readelf -d /lib/libpthread.so.0
> > ...
> > 0x6ffffffb (FLAGS_1) Flags: NODELETE INITFIRST
> > ...
> >
> > by passing "-z nodelete -z initfirst" to ld.
>
> OK, but valgrind.so is already being linked with "-z initfirst"; what
> happens if there are two .so files with initfirst? (It does seem to
> work).
Which ever comes first wins
H.J.