Skip to content

Commit 6f95898

Browse files
committed
[GR-62014] Avoid symbol versioning issues in shim libraries.
PullRequest: graal/20001
2 parents 2247a6d + 5afff28 commit 6f95898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/jdk/JNIRegistrationSupport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private void makeShimLibrary(String shimName) {
303303
* with the expected name. So we just create an empty one ...
304304
*/
305305
linkerCommand = ImageSingletons.lookup(CCompilerInvoker.class)
306-
.createCompilerCommand(List.of("-shared", "-x", "c"), shimLibrary, Path.of("/dev/null"));
306+
.createCompilerCommand(List.of("-shared", "-x", "c", "-nostdlib"), shimLibrary, Path.of("/dev/null"));
307307
/* ... and add an explicit dependency on the native image if it is a shared library. */
308308
if (!accessImpl.getImageKind().isExecutable) {
309309
linkerCommand.addAll(List.of("-Wl,-no-as-needed", "-L" + image.getParent(), "-l:" + image.getFileName(),

0 commit comments

Comments
 (0)