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

Deliberate Symbol Visibility #165

Open
insertinterestingnamehere opened this issue Nov 1, 2023 · 2 comments
Open

Deliberate Symbol Visibility #165

insertinterestingnamehere opened this issue Nov 1, 2023 · 2 comments

Comments

@insertinterestingnamehere
Copy link
Collaborator

It's generally a good a idea to set the default symbol visibility to "hidden" while compiling a library so that internal functions don't get automatically included in the interface exposed to downstream projects. This will require tagging which functions are supposed to be exported and setting up some build flags and ifdefs to turn on symbol exports only when building the main qthreads shared object.

@olivier-snl
Copy link
Collaborator

Generally internal functions should already be prefaced with "INTERNAL", e.g.:

int INTERNAL qt_getmctxt(mctxt_t *);

It is possible that some functions are not properly marked though.

@insertinterestingnamehere
Copy link
Collaborator Author

Okay, just looked into the status of this a bit more. External API functions and some internal stuff is all marked. I think the only change needed here is setting -fvisibility=hidden to change the default behavior and then confirm that nothing breaks horribly.

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

No branches or pull requests

2 participants