Bug 23231 - support symbol version script / --version-script option

Hi Rui,

If you do not have active development on symbol versioning currently,

I think I can start working on this, after some more investigations.

What do you think ?

Right now I am pretty busy with other bugs, so it would be really
nice to have someone working on it.

I have upload a reproducible for the freebsd libc to pr23231, where
version scripts are the current blocker. The script there is pretty
simple. It just has multiple versions and "dependencies", but no globs
other than a "local: *".

Cheers,
Rafael

George,

If you have bandwidth to work on it, please go ahead. One think I’d note is to start with minimal implementation that is sufficient enough to read and create versioned symbols for minimal version script file. We do not need any wildcard pattern matching (except “local: *”, but even this can be implemented later). The initial implementation shouldn’t support version hierarchies as well.

As to algorithm, implement an algorithm that works O(n) where n is the number of symbols in a version script file. That means you want to iterate over symbols in a version script file instead of interating over symbols in the linker’s symbol table.

I would also skip matching version in names in the first version (@ver
and @@ver).

Cheers,
Rafael