ldso dl-hash.c line 187
Joakim Tjernlund
joakim.tjernlund at transmode.se
Thu Sep 22 22:08:05 UTC 2005
> 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.
Maybe the st_value test should be:
if (!(~1 & type_class) & ((sym->st_value == 0))
Just for fun, I removed the type_class(if (sym->st_shndx == SHN_UNDEF)) and
deleted the st_value test and that booted too.
Jocke
More information about the uClibc
mailing list