This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: Symbol versioning question
Ulrich Drepper <drepper@cygnus.com> writes:
> Steve Dunham <dunham@cse.msu.edu> writes:
>
> > A typical example is that it claims it can't find the symbol
> > "_popen@GLIBC_2.0" referenced by libgpm.so, where libc contains both
> > GLIBC_2.1 and GLIBC_2.0 versions of the symbol.
> There never was a symbol _popen. If you want answers you have to be
> accurate.
Sorry, I had replaced the libraries on the machine in question. I've
reproduced in on another machine, details are below. (The
architecture is sparc.)
foo.c contains:
main(){}
I compile with:
gcc foo.c -lgpm
and get:
/usr/lib/libgpm.so: undefined reference to `popen@@GLIBC_2.0'
/usr/lib/libgpm.so: undefined reference to `pclose@@GLIBC_2.0'
This happened after moving from glibc-2.0.100 to glibc-2.0.105.
I'm using binutils 2.9.1.0.15.
"objdump -T /lib/libc-2.0.105.so |grep popen " gives:
0000000000057dc4 g DF .text 000000000000008c GLIBC_2.1 _IO_popen
000000000005a154 g DF .text 000000000000008c (GLIBC_2.0) popen
0000000000057dc4 g DF .text 000000000000008c GLIBC_2.1 popen
000000000005a154 g DF .text 000000000000008c (GLIBC_2.0) _IO_popen
"objdump -T libgpm.so |grep popen" gives:
0000000000000000 DF *UND* 000000000000008c GLIBC_2.0 popen
I get similar problems with:
gcc foo.c -L/usr/X11R6/lib -lXpm -lX11
/usr/X11R6/lib/libXpm.so: undefined reference to `popen@@GLIBC_2.0'
/usr/X11R6/lib/libXpm.so: undefined reference to `pclose@@GLIBC_2.0'
and with "gcc foo.c -lstdc++":
/usr/lib/libstdc++.so: undefined reference to `_IO_proc_open@@GLIBC_2.0'
/usr/lib/libstdc++.so: undefined reference to `_IO_proc_close@@GLIBC_2.0'
Here, we have:
# objdump -T /lib/libc.so.6 |grep _IO_proc_
0000000000057e50 g DF .text 00000000000000d0 GLIBC_2.1 _IO_proc_close
0000000000057ba8 g DF .text 000000000000021c GLIBC_2.1 _IO_proc_open
0000000000059f38 g DF .text 000000000000021c (GLIBC_2.0) _IO_proc_open
000000000005a1e0 g DF .text 00000000000000d0 (GLIBC_2.0) _IO_proc_close
and
# objdump -T /usr/lib/libstdc++.so |grep _IO_proc_
0000000000000000 DF *UND* 000000000000021c GLIBC_2.0 _IO_proc_open
0000000000000000 DF *UND* 00000000000000d0 GLIBC_2.0 _IO_proc_close
Let me know if you need any other info.
Steve
dunham@cse.msu.edu