On Tue, 16 Jun 2026 13:28:43 GMT, Arno Zeller <[email protected]> wrote:

> When jlink --strip-debug (or --strip-native-debug-symbols 
> exclude-debuginfo-files) is used to link from a runtime image, pre-existing 
> native debug symbol sidecar files (.debuginfo, .diz) are incorrectly included 
> in the output image. On a JDK built with external debug symbols, this results 
> in large files such as lib/server/libjvm.debuginfo (often 1 GB) appearing in 
> the linked image despite the explicit request to strip debug information.
> 
> StripNativeDebugSymbolsPlugin.transform() only processes entries whose path 
> ends in .so (NATIVE_LIB) or whose type is NATIVE_CMD. Sidecar files have type 
> NATIVE_LIB or NATIVE_CMD but paths ending in .debuginfo or .diz (compressed 
> .debuginfo), so they fall through the filter unchanged.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I'm not sure why we are trying to fix this in the 
`StripNativeDebugSymbolsPlugin`. That plugin is useful to process a binary 
which includes debug symbols in the binary itself. In a way, you are 
re-implementing what the `--exclude-files` plugin already does.

I thought the consensus on the bug was to use `exclude-files` in `jpackage`. A 
CSR would need to be filed for an update to that filter.

-------------

Changes requested by sgehwolf (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31534#pullrequestreview-4533107989

Reply via email to