ld: switching symbol versions
Nikos Mavrogiannopoulos
n.mavrogiannopoulos@gmail.com
Wed Sep 17 07:49:00 GMT 2014
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
More information about the Binutils
mailing list