Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protected visibility is available with the ELF object format #45

Merged
merged 1 commit into from
Feb 3, 2025
Merged

Conversation

VoxSciurorum
Copy link
Contributor

No description provided.

@VoxSciurorum VoxSciurorum requested a review from neboat January 24, 2025 16:44
@neboat
Copy link
Contributor

neboat commented Jan 25, 2025

Just a thought, should we add a CI test that only the expected symbols are exported from the runtime library? I think that should be easy to do.

@VoxSciurorum
Copy link
Contributor Author

Here is a script to check exports. I don't know how to add it to CI. The runtime fails the check as written because of the Cilk_ symbols.
We could also use a linker map on ELF systems to control exports.

#!/bin/sh
case `uname` in
    Darwin)
        cmd="nm -gU"
        prefix="_"
        ;;
    Linux|*BSD)
        cmd="nm --dynamic --defined-only"
        prefix=""
        ;;
    *)
        echo "Unsupported platform" 1>&2
        exit 1 ;;
esac
${cmd:?} "${1:?}" |
  awk '$3 ~ /^'"${prefix}"'__(cilk|pedigree)/ { next } \
       $3 ~ /^_(init|fini)/ { next } \
       { print "Unexpected exported symbol " $3; exit 1 }'

@neboat neboat merged commit b108982 into dev Feb 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants