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

symbol stripping #318

Open
ceeaspb opened this issue Apr 7, 2020 · 1 comment · May be fixed by #537
Open

symbol stripping #318

ceeaspb opened this issue Apr 7, 2020 · 1 comment · May be fixed by #537

Comments

@ceeaspb
Copy link

ceeaspb commented Apr 7, 2020

This proposes a review of symbol stripping. Symbols aid diagnostics but take up space.

I had a brief look at adoptopenjdk/openjdk11:x86_64-alpine-jdk-11.0.6_10 and adoptopenjdk/openjdk11:x86_64-alpine-jdk-11.0.6_10-slim.

https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/slim-java.sh#L247
libjvm.so stripped is around 18MB, full is 22MB. A 20% difference. But when compared with other file sizes - largest /opt/java/openjdk/lib/modules at 135MB, the increase is not so significant.

&& strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \

&& strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \

As the files a stripped in both full and slim and I haven't built from source I don't know how much space the symbols are taking.
In the context here the troubleshooting value may be more than the space saving on these 2 files.
Resolving #317 may provide some space for symbols to be retained.

I don't have the full numbers, the image sizes etc, but it appears that it may be possible to retain symbols without significantly bloating the slim image size.

@karianna karianna added the bug label Apr 7, 2020
@karianna karianna added enhancement and removed bug labels Apr 7, 2020
@sxa sxa linked a pull request Apr 1, 2021 that will close this issue
@karianna
Copy link
Member

karianna commented Apr 1, 2021

@ceeaspb What's your use case for wanting symbols in the slim builds?

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.

2 participants