add machinery to remove unecessary dynamic symbols at link time #222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This attempts to address #202. It adds a cmake target for an
ld
version script that places all symbols not explicitly marked withPGDLL_EXPORT
in thelocal
section. It finds the functions that need to be marked as global automatically so it shouldn't require developers to mark their functions in a suppression script. I believe that--version-script
should behave the same way inlld
though there isn't any documentation so this may only work with gnu tools. I would have preferred to set all visibility to hidden then manually mark functions to be exported in source since this is more transparent to developers, however libstdc++ doesn't allow thisexample symbol exports with suppression script
EDIT: apparently Darwin uses its own linker so this isn't compatible with osx builds. Since this will be a relatively small percentage of deployments long term I think it's acceptable to just export more symbols on mac
EDIT2: sanitizer failure is unrelated to changes. It passed on the previous run, seems there's some minor non-determinism in the index that fails in that test