Skip to content

RFE: add versioned symbol support#484

Open
gordonmessmer wants to merge 1 commit into
seccomp:mainfrom
gordonmessmer:versioned-symbols
Open

RFE: add versioned symbol support#484
gordonmessmer wants to merge 1 commit into
seccomp:mainfrom
gordonmessmer:versioned-symbols

Conversation

@gordonmessmer
Copy link
Copy Markdown

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.

@pcmoore pcmoore changed the title Add versioned symbol support RFE: add versioned symbol support Apr 8, 2026
@pcmoore
Copy link
Copy Markdown
Member

pcmoore commented Apr 8, 2026

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 git log.

Comment thread m4/ld-version-script.m4 Outdated
Comment thread m4/ld-version-script.m4 Outdated
@gordonmessmer gordonmessmer force-pushed the versioned-symbols branch 2 times, most recently from 89d0f66 to fe49ffc Compare April 18, 2026 18:14
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>
@gordonmessmer
Copy link
Copy Markdown
Author

Checking in: Please let me know if there are any remaining changes you'd like to see in this PR.

Copy link
Copy Markdown
Member

@drakenclimber drakenclimber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch looks good to me. I have a couple small change requests, and then I think it's good to go from my end.

Also, I tested this patch against make distcheck and make dist-gzip and unzipped the tar file. Everything worked as expected.

Thanks, @gordonmessmer

Comment thread src/libseccomp.map
/* Avoid modifying a symbol set after it has been released
When adding features in a new release, add a new set
Removing features is a breaking change */
LIBSECCOMP_1.0 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would vote to make this LIBSECCOMP_2.7 since this patchset would be part of that release.

Then the symbol versions would be the same as the library versions. Seems like that would be easier to track

Comment thread src/libseccomp.map
seccomp_init;
seccomp_load;
seccomp_merge;
seccomp_notify_alloc;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we missed seccomp_notify_addfd()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants