This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld: switching symbol versions
- From: Nikos Mavrogiannopoulos <n dot mavrogiannopoulos at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 17 Sep 2014 09:49:14 +0200
- Subject: ld: switching symbol versions
- Authentication-results: sourceware.org; auth=none
Hello,
I'm using in a library versioned symbols, and for reasons outside my
control I'd like to phase out the old versioned symbols (e.g., with
tag XXX) and move to a new version (e.g., tag NEW). During that phase
out period I'd like to keep the old symbols available. That is, I'd
like some symbols to be under the NEW and the XXX tag, and I'd like
any new compiled programs to use the NEW tag instead of XXX.
I've read [0], but it is not mentioned whether a single symbol can
belong to multiple tags. I've tried the following script:
NEW {
my symbol;
}
XXX {
my_symbol;
}
And it seems to achieve what I need. Old programs that use the XXX ABI
work seamlessly and new programs link against the NEW ABI. My question
is, whether this behavior is random, or is the intended one and I can
rely on it.
regards,
Nikos
[0]. https://sourceware.org/binutils/docs/ld/VERSION.html#VERSION