I have done a little research and have asked around regarding my original
inquiry...
GLIBC 2.1 introduced symbol versioning for backwards compatibility. So,
in /lib/libc.so.6 the "fopen" API has "[EMAIL PROTECTED]" and
"fopen@@GLIBC_2.1" entries. The entry with the single "@" is the default
"fopen" that is resolved to. We can determine which APIs have symbolic
versioning by examining the shared library:
/usr/bin/nm /lib/libc.so.6
We can determine which symbolic version of an API is used by an application
by examining the binary application. The binary utilities "objdump" and
"nm -D" will examine stripped binaries and give us the information that we
need to know.
/usr/bin/objdump --dynamic-syms /opt/bin/foo
I have written a simple Perl script that will take one or more binary
programs as arguments then produce the following output:
application0:crc0:rpm0:version0:release0:api0:symversion0:library0:crc0:rpm0:version0:release0
application1:crc1:rpm1:version1:release1:api1:symversion1:library1:crc1:rpm1:version1:release1
application2:crc2:rpm2:version2:release2:api2:symversion2:library2:crc2:rpm2:version2:release2
application3:crc3:rpm3:version3:release3:api3:symversion3:library3:crc3:rpm3:version3:release3
Cheers,
George Kraft IV
[EMAIL PROTECTED]
512-838-2688; t/l 678-2688
Linux Technology Center
IBM, Austin Texas
Stuart Anderson <[EMAIL PROTECTED]> on 11/08/99 04:09:05 PM
To: George Kraft/Austin/[EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject: Re: @@GLIBC_2.1
Appearantly, the fdopen implementation (and several other things) changed
between glibc 2.0 and 2.1. The @@GLIBC_X.X indicates which behavior you
get.
I think there may be some global variable that lives in the application
that
says which version it was linked against, but I'm not sure of the details
(but
need to learn & document it).
The mangle section of the specification is for this type of thing. The
source
signature
FILE * fdopen(int fildes, const char *mode)
is mangled to
FOO * fdopen@@GLIBC_2.0(..????..)
Again, I haven't figured out all of the details, but need to before our
next meeting.
On Mon, 8 Nov 1999 [EMAIL PROTECTED] wrote:
>
>
> While trying to inventory the APIs and libraries used by applications
such
> as StarOffice51 and WordPerfect8 I have stumbled across some redundant
APIs
> with @GLIBC_2.0 and @@GLIBC_2.1 suffixes on RedHat 6.0. So, for
example,
> if I look at Netscape Communicator 4.7 I see that "fdopen" is undefined
and
> needs to be resolved.
>
> [EMAIL PROTECTED] gk4]$ nm -D -g /usr/local/netscape/netscape | grep fdopen
> U fdopen
>
> Looking at what libraries are dynamically linked, I see libc.so.6 is
linked
> to netscape to resolve "fdopen".
>
> [EMAIL PROTECTED] gk4]$ ldd /usr/local/netscape/netscape
> libBrokenLocale.so.1 => /lib/libBrokenLocale.so.1 (0x40018000)
> libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x4001a000)
> libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40064000)
> libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4006e000)
> libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x40083000)
> libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40095000)
> libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x400a2000)
> libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x400ad000)
> libdl.so.2 => /lib/libdl.so.2 (0x4014a000)
> libstdc++-libc6.1-1.so.2 => /usr/lib/libstdc++-libc6.1-1.so.2
> (0x4014d000)
> libm.so.6 => /lib/libm.so.6 (0x40190000)
> libc.so.6 => /lib/libc.so.6 (0x401ac000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> However, when I look in libc.so.6 I see two "fdopen" definitions with
> either a @GLIBC_2.0 or @@GLIBC_2.1 suffix!
>
> [EMAIL PROTECTED] gk4]$ nm -g /lib/libc.so.6 | grep fdopen
> 00050ae0 T _IO_fdopen@@GLIBC_2.1
> 00053410 T [EMAIL PROTECTED]
> 00050ae0 T fdopen@@GLIBC_2.1
> 00053410 T [EMAIL PROTECTED]
>
> How is "fdopen" being resolved? What is the purpose of the @GLIBC_2.0 or
> @@GLIBC_2.1 suffixes?
>
> George Kraft IV
> [EMAIL PROTECTED]
> 512-838-2688; t/l 678-2688
> Linux Technology Center
> IBM, Austin Texas
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with subject of "unsubscribe". Trouble? Email
[EMAIL PROTECTED]
>
Stuart
Stuart R. Anderson [EMAIL PROTECTED]
Metro Link Incorporated South Carolina Office
4711 North Powerline Road 129 Secret Cove Drive
Fort Lauderdale, Florida 33309 Lexington, SC 29072
voice: 954.938.0283 voice: 803.951.3630
fax: 954.938.1982 SkyTel: 800.405.3401
http://www.metrolink.com/
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with subject of "unsubscribe". Trouble? Email
[EMAIL PROTECTED]