[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
On Thu, Feb 14, 2013 at 02:59:25AM +0100, Emmanuel Dreyfus wrote:
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> wrote:
> > > If you specify RTLD_GLOBAL to dlopen(), then call via a PLT that
> > > has not yet been initialised (because RTLD_LAZY was in effect
> > > when the code making the call was loaded), then the function
> > > in the library might get executed.
> > Don't forget other shared objects that are opened later.
> I get the same result without dlopen. In the example I posted, if I link
> test with libtest (cc -o test -L. -R. -ltest test.c) I get the same
> result: mail_foo is always called, and never libtest_foo
> I thought __strong_alias() were used to override __weak_alias(). Either
> it is not the way it works, or I have a missing bit in this test case.
Your test case makes sure that foo() is resolved the first time it is
called. Effectively, you have disabled RTLD_LAZY that way.
Main Index |
Thread Index |