Do not lookup symbols with STB_LOCAL binding
authorSimon Schubert <corecode@dragonflybsd.org>
Mon, 15 Jan 2007 14:38:22 +0000 (14:38 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Mon, 15 Jan 2007 14:38:22 +0000 (14:38 +0000)
commit0e588128ffab6d811c6e3750494c8164312b6cff
tree1f4f207cf28442f31964a38b7796fbe197c2c388
parent610fc4606f057bab9cf6f1c530e8d97f3966f0ae
Do not lookup symbols with STB_LOCAL binding

When a shared object with static TLS symbols gets linked, ld issues
a R_386_TLS_DTPMAP32 relocation on i386, referencing symbol 0, the
undefined symbol.  This is perfectly legal, as this is simply a
local symbol and nothing but the local module's TLS index is needed.

This fixes execution of binaries linked to gcc41's libstdc++.

Obtained-from: FreeBSD
libexec/rtld-elf/rtld.c