ldso dl-hash.c line 187

Mike Frysinger vapier at gentoo.org
Thu Sep 22 22:16:17 UTC 2005


On Thursday 22 September 2005 06:08 pm, Joakim Tjernlund wrote:
> > From: Joakim Tjernlund [mailto:joakim.tjernlund at lumentis.se]
> >
> > >These tests are deduced from glibc and optimized. I think
> >
> > this is what
> >
> > >you
> >
> > end up
> >
> > >with if you eliminate all "impossible" combinations. I don't
> >
> > know this
> > stuff good
> >
> > >enough to be sure. Try looking at glibc.
> >
> > Like (from glibc 2.3.5+ cvs 20050627, libc/ChangeLog.5):
> > >> Sun Jun 2 14:56:49 1996 Roland McGrath elf/dl-lookup.c
> > >> (_dl_lookup_symbol) Arg NOSELF renamed to NOPLT elf/dl-lookup.c
> > >> Reject SHN_UNDEF defns iff NOPLT is nonzero
> >
> > That's over 9 years old, but I'm pretty sure that's where it
> > comes from...
> >
> > What it means (after decoding the double negative) is the
> > _dl_lookup_symbol will *normally* return a symtab entry for
> > an undefined symbol, but if the magic NOSELF/NOPLT is passed
> > in it won't.
>
> hmm, seem to remember something vaugly:
> extern weak fun();
> if (fun)
>   fun();
>
> I think the above MAY produce different values for fun in symbol lookup.
> Can't recall the details, but I think it is arch dependant and/or possibly
> toolchain related.

well the behavior here should always be the same right ?  so if the 
implementation gives back a non-zero value for fun even if fun doesnt exist, 
the implementation is wrong ?
-mike



More information about the uClibc mailing list