From 5afff2831b5c72b22c45216604d6291f453de210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandar=20Pejovi=C4=87?= Date: Thu, 12 Dec 2024 22:11:07 +0100 Subject: [PATCH] Avoid symbol versioning issues in shim libraries --- .../src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java index 0b453a03fad8..73d25cf2374b 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java @@ -303,7 +303,7 @@ private void makeShimLibrary(String shimName) { * with the expected name. So we just create an empty one ... */ linkerCommand = ImageSingletons.lookup(CCompilerInvoker.class) - .createCompilerCommand(List.of("-shared", "-x", "c"), shimLibrary, Path.of("/dev/null")); + .createCompilerCommand(List.of("-shared", "-x", "c", "-nostdlib"), shimLibrary, Path.of("/dev/null")); /* ... and add an explicit dependency on the native image if it is a shared library. */ if (!accessImpl.getImageKind().isExecutable) { linkerCommand.addAll(List.of("-Wl,-no-as-needed", "-L" + image.getParent(), "-l:" + image.getFileName(),