This is the mail archive of the
mailing list for the glibc project.
Re: Should undefined symbols in sysv hash table be ignored in do_lookup_x?
On Wed, Feb 6, 2013 at 2:27 PM, Roland McGrath <firstname.lastname@example.org> wrote:
> Can you demonstrate any user-visible effect of this? I thought it implied
> that lookup could go awry if there were an object with only DT_HASH and no
> DT_GNU_HASH with a SHN_UNDEF symbol of a given name that's earlier in the
> search order than the object that actually defines that name. But I tried
> a simple test case and that does not seem to be so.
if (__builtin_expect ((sym->st_value == 0 /* No value. */
&& stt != STT_TLS)
|| (type_class & (sym->st_shndx == SHN_UNDEF)),
before that code. Since undefined symbol has st_value == 0, we
will only see it with TLS symbols. Since most of relocations against
TLS symbols are treated PLT relocations, we will return NULL for
undefined TLS symbols, except for SIZE relocations against TLS