RFE: add versioned symbol support#484
Conversation
8801806 to
1f821c4
Compare
|
Hi @gordonmessmer, thanks for the patch! Considering the patch, it would be helpful to provide a description of the work in the patch's description. We also generally expect a subject prefix, e.g. "build: add versioned symbol support" for patches so it is easier to filter through patches when looking at the output from |
| # FIXME: The test below returns a false positive for mingw | ||
| # cross-compiles, 'local:' statements does not reduce number of | ||
| # exported symbols in a DLL. Use --disable-ld-version-script to work | ||
| # around the problem. |
There was a problem hiding this comment.
Is there a fix for this, or is this a known problem that is expected to have a solution at some later date?
There was a problem hiding this comment.
That comment is 17 years old: https://github.com/coreutils/gnulib/blame/master/m4/ld-version-script.m4
I don't really work with mingw, so I don't know if that was a defect in its ld, or if it's a limitation imposed by the target format.
I can research the question further if it's important.
|
|
||
| # gl_LD_VERSION_SCRIPT | ||
| # -------------------- | ||
| # Check if LD supports linker scripts, and define automake conditional |
There was a problem hiding this comment.
Are there any (modern) versions of LD that don't support linker scripts?
There was a problem hiding this comment.
As far as I know, they are supported by GNU ld, LLVM's lld, mold, and wild.
There was a problem hiding this comment.
If we think all (modern) versions of LD support linker scripts, do we even need this *.m4 file? I work on another upstream project, libcgroup, and we've used linker scripts for years. We don't have any checks for versions of LD that don't support linker scripts. No one has complained yet :)
There was a problem hiding this comment.
I've removed those tests in the new patch. :)
89d0f66 to
fe49ffc
Compare
Versioned symbols add information to the ELF .gnu.version_r section which rtld can use to provide more descriptive information in the case of linking failures, and which dependency generators can use to avoid those failures. Signed-off-by: Gordon Messmer <gmessmer@redhat.com>
fe49ffc to
e1e09ee
Compare
|
Checking in: Please let me know if there are any remaining changes you'd like to see in this PR. |
In order to improve reliable dependency resolution, I would like to add versioned symbols to the libraries that do not include them today.
This change is intended to support Fedora's recommendation that shared libraries provide versioned symbols: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/#_versioned_symbols
Please double-check the symbol files. If any symbols have been added very recently, they might not be in the symbol maps I've generated.