This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Symbol versioning problem? Different versions of same symbol being called.
- From: "H . J . Lu" <hjl at lucon dot org>
- To: Carlo Wood <carlo at alinoe dot com>
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>,binutils at sources dot redhat dot com
- Date: Thu, 24 Jan 2002 09:48:30 -0800
- Subject: Re: Symbol versioning problem? Different versions of same symbol being called.
- References: <20020124013408.A7683@alinoe.com> <20020124113641.GY16187@bubble.sa.bigpond.net.au> <20020124150030.A27421@alinoe.com> <20020124093649.A27786@lucon.org> <20020124184420.A4382@alinoe.com>
On Thu, Jan 24, 2002 at 06:44:20PM +0100, Carlo Wood wrote:
> On Thu, Jan 24, 2002 at 09:36:49AM -0800, H . J . Lu wrote:
> > Is your shared library built with
> >
> > # gcc/g++ -shared ....
>
> Yes. I use libtool, which calls the following
>
> Compiling an object file:
>
> g++-3.0.3 -DHAVE_CONFIG_H -I./include -I./include -DCWDEBUG -ggdb3
> -pipe -pthread -Wall -Woverloaded-virtual -Wundef -Wpointer-arith
> -Wwrite-strings -Werror -Winline -c elf32.cc -MT elf32.lo -MD
> -MP -MF .deps/elf32.TPlo -fPIC -DPIC -o elf32.o
> mv -f elf32.o elf32.lo
>
> Final linking:
>
> gcc-3.0.3 -shared threading.lo elf32.lo bfd.lo debug.lo debugmalloc.lo
> demangle.lo demangle3.lo strerrno.lo type_info.lo
> -Wl,--whole-archive utils/.libs/libutils.al -Wl,--no-whole-archive
> utils/.libs/libutils.al -ldl -Wl,-soname -Wl,libcwd.so.0
> -o .libs/libcwd.so.0.99.16
>
>
> I suppose using the -shared in the last command suffices?
> Nevertheless, it calls the wrong version.
I don't like libtool. Any particular version of libtool will have
different bugs. Anyway, please find out if -lc is used for building
shared library. When -lc is used, all symbols defined in libc should
have a version name. Please find out why that symbol doesn't have a
version name.
H.J.