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

plugin_utils lib size seems too large #263

Open
allejo opened this issue Sep 15, 2020 · 1 comment · May be fixed by #264
Open

plugin_utils lib size seems too large #263

allejo opened this issue Sep 15, 2020 · 1 comment · May be fixed by #264

Comments

@allejo
Copy link
Member

allejo commented Sep 15, 2020

For some reason, our libplugin_utils.a is coming out to be about 2M? Is that right? If so, where is the extra size coming from?

For example with SAMPLE_PLUGIN, when I link to plugin_utils I get a .so that's ~911K when it's not being linked, it comes out to ~35K. Shouldn't the compiler be optimizing out a lot more of that code?

@jwmelto
Copy link
Member

jwmelto commented Sep 15, 2020

.so is fundamentally different from .a. It's generally not a good idea to link .a libraries into .so libraries. Shared objects need to have position-indepdent code (-fPIC or -kPIC or some variant, depending on the compiler); .a objects don't routinely have this enabled.

Now, if the size of libplugin_utils.a is a concern, we might consider changing it to a .so so that one instance in memory can service all plugins (smaller runtime footprint)

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

Successfully merging a pull request may close this issue.

3 participants