This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Binding to a specified symbol version


Hi,

In the ld manual, here:

http://sources.redhat.com/binutils/docs-2.12/ld.info/VERSION.html#VERSION

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
etc)

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

-- 
Mike Hearn <m.hearn@signal.qinetiq.com>
QinetiQ - Malvern Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]