This is the mail archive of the
mailing list for the binutils project
Binding to a specified symbol version
- From: Mike Hearn <m dot hearn at signal dot qinetiq dot com>
- To: binutils at sources dot redhat dot com
- Date: 30 Jun 2003 11:17:16 +0100
- Subject: Binding to a specified symbol version
- Organization: QinetiQ - Malvern Technology Center
In the ld manual, here:
it says at the bottom that you can use the .symver directive to bind to
a specific version (ie not the default version) of a symbol, but it
doesn't give any examples or explain further. Could somebody please
explain how I would for instance choose an old glibc symbol version for
my application to bind to when compiling my app?
Also, is there a way to externally "graft" these selections onto an
application automatically, ie without altering the source too much.
The reason I'm asking is that I'd like to be able to compile binaries to
work with older versions of Linux than the one on our developer
machines, but the only ways I've found to do this so far are:
a) Install an older version of a distro and compile using that (but
that's a lot of hassle and you run into problems with compiler versions
b) Compile using stub libraries. The LSB provides some, but
unfortunately if you also try to link against other libraries on the
system ld seems to try and resolve the entire symbol set, not just the
ones for the program it's linking. The only solution to *that* I've
found is to make ALL the libraries being linked against temporary stub
libraries, which is awfully ugly, not to mention slow and confusing.
So, I'd really like to be simply able to tell ld which glibc versions to
use, but the manual doesn't make it clear to me how.
many thanks to anybody that can help
Mike Hearn <email@example.com>
QinetiQ - Malvern Technology Center