Updated ARM NPTL patch

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu Feb 15 14:05:23 UTC 2007


On Thu, 2007-02-15 at 14:26 +0100, Carmelo Amoroso wrote:
> On 2/15/07, Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> > > -----Original Message-----
> > > From: uclibc-bounces at uclibc.org
> > > [mailto:uclibc-bounces at uclibc.org] On Behalf Of Carmelo Amoroso
> > > Sent: 14 February 2007 14:34
> > > To: Paul Brook
> > > Cc: uclibc at uclibc.org
> > > Subject: Re: Updated ARM NPTL patch
> > >
> > > On 12/7/06, Paul Brook <paul at codesourcery.com> wrote:
> > > > .... snippet.....
> > > > KNOWN LIMITATIONS
> > > >
> > > > This release has some known limitations:
> > > >
> > > > - The merge with public uClibc trunk revision r16105 introduced
> > > >   some test suite regressions, as described above.
> > > >
> > > > - When linking statically against uClibc, the dlopen
> > > function does not
> > > >   work properly.  The unmodified uClibc trunk has this problem as
> > > >   well, so CodeSourcery does not believe that our NPTL patches are
> > > >   responsible; in fact, we believe dlopen works better with our
> > > >   patches than without.
> > > >
> > > >   However, many uClibc tests depend on dlopen, so this
> > > issue makes it
> > > >   difficult to test static linking.  It would be a good idea to
> > > >   re-test if statically-linked dlopen is fixed in the future.
> > > >
> > > Well, I posted some days ago a proposal for a patch to fix this issue
> > > (see post
> > > http://www.uclibc.org/lists/uclibc/2007-February/017324.html).
> > >  Did you have a look at it? I'd like to have a feedback, so
> > > if the patch
> > > is ok also for you, it may be proposed to be included in svn.
> >
> >
> > That will work, but I can't help thinking that this is better
> > fixed in libdl.c by initialize _dl_symbol_tables at startup
> > somehow. I haven't looked if this is easy/possible.
> >
> >  Jocke
> >
> Hi Jocke,
> thanks for your reply!
> 
> I tried this solution firstly (to avoid the check every time
> _dl_load_shared_library is invoked, even if only in the static build),
> but it doesn't work because passing a valid rpnt
> pointer to _dl_load_shared_library, it will be used to attach a newly
> created dyn_elf struct.
> So you will have two dyn_elf struct with one tpnt struct.
> In the shared case, the ld.so initializes the _dl_symbol_tables for
> the main application (using the app_tpnt), and then each other DSO (as
> dependencies or "dlopened") will be attached to the _dl_symbol_tables
> linked list.
> Do you agree?

Agreed, however I wonder if there are cases where you can search for
symbols in static application as well? I can't remeber and have no time
to research this now, but if this is possible you should try to stick
the main app into _dl_symbol_tables as its first entry.

If not your patch is fine and can be applied as is.

  Jocke



More information about the uClibc mailing list