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

core: Declare public symbol visibilities #630

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

aperezdc
Copy link
Member

Change the build options to use “hidden” visibility by default, and mark only the symbols that are part of the public API with the COG_API macro. This prevents library private symbols from leaking to the global symbol namespace even if they are not declared as “static”, and also makes the ELF PLT smaller which prevents accidental symbol overriding and improves load times.

Change the build options to use "hidden" visibility by default, and mark
only the symbols that are part of the public API with the COG_API macro.
This prevents library private symbols from leaking to the global symbol
namespace even if they are not declared as "static", and also makes the
ELF PLT smaller which prevents accidental symbol overriding and improves
load times.
@aperezdc aperezdc added the enhancement New feature or request label Oct 26, 2023
@aperezdc aperezdc self-assigned this Oct 26, 2023
core/cog-view.h Show resolved Hide resolved
core/cog-view.h Show resolved Hide resolved
@aperezdc aperezdc merged commit 3019268 into master Oct 27, 2023
5 checks passed
@aperezdc aperezdc deleted the aperezdc/visibility branch October 27, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants