Skip to content

symbol stripping #318

Open
Open
@ceeaspb

Description

@ceeaspb

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions