Linking to older symbol version

Fredrik Tolf fredrik@dolda2000.com
Mon Jun 28 18:35:00 GMT 2004


Hi!

I recently upgraded to the latest version of glibc, which apparently
includes a new version of the regexec() call. It also has the old
version. To give the full info, here's "objdump -T /lib/libc-2.3.3.so |
grep regexec":

00095ba0 g    DF .text  0000009b  GLIBC_2.3.4 regexec
000e74b0 g    DF .text  00000043 (GLIBC_2.0)  regexec

Now this gave me some troubles, since I have a program using regexec,
which I use on several computers (it's in my homedir which is shared
over NFS), and the other computers do not have this version of regexec.
So when I compile this program on my primary workstation, it links
against this newest regexec version, which essentially means it can't be
dynamically linked to glibc on the other computers.

So, my basic question is, can I somehow instruct GNU ld to link against
GLIBC_2.0 version of regexec, in order to avoid this problem?

Oh, and btw., I'm not subscribed, so please be as kind as to make sure
I'm in the Cc list.

Fredrik Tolf




More information about the Binutils mailing list