RFR: 8347755: Support static library in jmod [v6]

Jiangli Zhou jiangli at openjdk.org
Fri Mar 14 23:12:05 UTC 2025


On Fri, 14 Mar 2025 21:57:23 GMT, Henry Jen <henryjen at openjdk.org> wrote:

> I would prefer that thin wrapper is to be provided by the end tools(like jlink) which use the jmod to link an executable.

@slowhog Can you provide details on that? Do you suggest there would be a separate executable that provides the C/C++ `main` entry point as a thin wrapper?  The binary that statically linked with the `libjvm.a`, `libjli.a` and etc would contain no C/C++ `main`? Is that binary linked as a shred library? Or, your proposal is to generate some C/C++ code with the `main()` function using jlink, then compile the C/C++ code and use that to link the executable?

The issue that we want to solve here is to provide the C/C++ `main()` entry point for the executable for the final image.

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

PR Review Comment: https://git.openjdk.org/leyden/pull/46#discussion_r1996411727


More information about the leyden-dev mailing list