In Java 8 the build system supplied a mapfile which set the symbol
version for JAWT_GetAWT[1]. It is no longer the case for Java 11+ due
to JDK-8200178[2].
If the native library was linked against Java 8 (e.g. lwjgl 2.x) then
it would be linking against the versioned symbol.
The assertion in the loader only fires when the version section
(.gnu.version) is absent, otherwise the loader provides the default
version [3].
The workaround forces the creation of the .gnu.version section (due to
enforcing libc linking) and allows the lwjgl (or similar) library to
be initialized. A similar workaround would be putting a dummy function
with calloc() inside jawt library.

[1] 
https://github.com/openjdk/jdk8u/blob/master/jdk/make/mapfiles/libjawt/mapfile-vers
[2] https://bugs.openjdk.org/browse/JDK-8200178
[3] https://git.launchpad.net/ubuntu/+source/glibc/tree/elf/dl-lookup.c#n114

Reply via email to