This is the mail archive of the binutils@sourceware.org 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]

ld: switching symbol versions


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


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