-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 12
-
b21
-
generic
-
linux
This issue originally surfaced in our packaged OpenJDK 11 builds for
Fedora. If a user created a custom image from the packaged JDK, the
resulting custom image would be huge in size because of non-stripped
debug symbols in the packaged binaries (~500MB vs. ~50MB).
Native libraries and executables in the packaged JDK image would be
properly stripped of debug symbols, but copies of those files in the
jmod files would not be. That has to do with a) How we build for the
Fedora distribution: --with-native-debug-symbols=internal configure
switch. b) When the stripping happens. In the Fedora case, b) happens
external to the OpenJDK build by the RPM build system *after* the
OpenJDK build actually completes. This means copies of native libraries
and executables with full debug symbols would already be "zipped up" in
jmod files when the distribution build's stripping process starts.
Hence, the distribution build system doesn't "see" DSO/EXE copies in
jmod files in the JDK images directory. They are archived in jmod
files. Because of this we end up with properly stripped libraries and
executables in the default, extracted JDK image, but DSOs/EXEs in the
'jmods' directory would still have full debug symbols internal to the
binaries. Yet, when jlink is being run, jmod files in directory 'jmods'
are being used for creating custom modular JDK images.
A similar problem may arise for custom native libraries of external modules which may have debug symbols internal in DSOs/EXEs.
Originally the discussion started here:
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-December/014037.html
It would be nice to have a jlink plugin which would be able to strip debug symbols from native libraries.
Fedora. If a user created a custom image from the packaged JDK, the
resulting custom image would be huge in size because of non-stripped
debug symbols in the packaged binaries (~500MB vs. ~50MB).
Native libraries and executables in the packaged JDK image would be
properly stripped of debug symbols, but copies of those files in the
jmod files would not be. That has to do with a) How we build for the
Fedora distribution: --with-native-debug-symbols=internal configure
switch. b) When the stripping happens. In the Fedora case, b) happens
external to the OpenJDK build by the RPM build system *after* the
OpenJDK build actually completes. This means copies of native libraries
and executables with full debug symbols would already be "zipped up" in
jmod files when the distribution build's stripping process starts.
Hence, the distribution build system doesn't "see" DSO/EXE copies in
jmod files in the JDK images directory. They are archived in jmod
files. Because of this we end up with properly stripped libraries and
executables in the default, extracted JDK image, but DSOs/EXEs in the
'jmods' directory would still have full debug symbols internal to the
binaries. Yet, when jlink is being run, jmod files in directory 'jmods'
are being used for creating custom modular JDK images.
A similar problem may arise for custom native libraries of external modules which may have debug symbols internal in DSOs/EXEs.
Originally the discussion started here:
http://mail.openjdk.java.net/pipermail/jigsaw-dev/2018-December/014037.html
It would be nice to have a jlink plugin which would be able to strip debug symbols from native libraries.
- csr for
-
JDK-8219257 Add --strip-native-debug-symbols jlink plugin
- Closed
- is blocked by
-
JDK-8218913 Rename --strip-debug jlink plugin
- Resolved
- relates to
-
JDK-8241462 StripNativeDebugSymbols jlink plugin allocates huge arrays
- Resolved