runtime linker on 9.x/i386: clang vs. gcc

2013-10-14 Thread Mikhail T.
Hello! I'm seeing a strange problem with clang-compiled binaries on 9.x/i386 system. Here it is: if a shared library A needs a symbol provided by a shared library B, libA will fail to load into a process even if the executable is linked with libB. The only fix (work-around?) is to relink

Re: runtime linker on 9.x/i386: clang vs. gcc

2013-10-14 Thread Dimitry Andric
On Oct 14, 2013, at 18:22, Mikhail T. mi+t...@aldan.algebra.com wrote: I'm seeing a strange problem with clang-compiled binaries on 9.x/i386 system. Here it is: if a shared library A needs a symbol provided by a shared library B, libA will fail to load into a process even if the executable is

Re: runtime linker on 9.x/i386: clang vs. gcc

2013-10-14 Thread Mikhail T.
10/14/13 4:31 PM, Dimitry Andric ???(??): There is a problem when clang does tail-call optimization on i386 with PIC in effect, and it emits GOT relocations for the tail-called functions, instead of PLT relocations. In some scenarios, such as with the way X.org does lazy dynamic linking,

Re: runtime linker on 9.x/i386: clang vs. gcc

2013-10-14 Thread Dimitry Andric
On Oct 14, 2013, at 22:42, Mikhail T. mi+t...@aldan.algebra.com wrote: 10/14/13 4:31 PM, Dimitry Andric написав(ла): There is a problem when clang does tail-call optimization on i386 with PIC in effect, and it emits GOT relocations for the tail-called functions, instead of PLT relocations. In