diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt index 5722e32da02..38addde18b0 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt @@ -1225,8 +1225,8 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( val parameterToBase = irFunction.allParameters.zip(baseIrFunction.allParameters).toMap() val functionType = LlvmFunctionSignature(irFunction, codegen) - - val result = functionGenerator(functionType, "kotlin2objc").generate { + val functionName = "kotlin2objc_${baseIrFunction.computeSymbolName()}" + val result = functionGenerator(functionType, functionName).generate { var errorOutPtr: LLVMValueRef? = null val parameters = irFunction.allParameters.mapIndexed { index, parameterDescriptor -> @@ -1432,7 +1432,7 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge( ret(retVal) } - LLVMSetLinkage(result, LLVMLinkage.LLVMPrivateLinkage) + LLVMSetLinkage(result, LLVMLinkage.LLVMInternalLinkage) return constPointer(result) }