Skip to content

Reduce number of exported symbols in shred library #710

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mreineck
Copy link
Collaborator

At one of the last meetings @ahbarnett noted that the number of symbols exported from libfinufft.so increases by a lot when ducc is used for FFTs.
This can most likely be fixed by compiling the sources with "-fvisibility=hidden" under Linux and using the already existing FINUFFT_EXPORT macros to explicitly make functions visible under Linux, very similar to what happens under Windows.

The current state of the branch demonstrates this when compiling with the makefile; you can check the resulting shared library using nm -C -D -U lib/libfinufft.so to see the exported symbols.
I don't think there is much I can do about the exported weak symbols (w/W), but the overall number goes down from 1000+ to about 130 when using the ducc back end, which is at least some progress.

Still to do:

  • support this in cmake
  • see whether there are non-Windows compilers which don't understand the visiblity flags/attributes, and disable the mechanism for them.

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.

1 participant