Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[metadata] Skip symbol name mangling on non-Windows for netcore #33940

Merged
merged 1 commit into from
Mar 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/mono/mono/metadata/native-library.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,7 @@ pinvoke_probe_for_symbol (MonoDl *module, MonoMethodPInvoke *piinfo, const char
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_DLLIMPORT,
"Searching for '%s'.", import);

#if !defined(ENABLE_NETCORE) || defined(HOST_WIN32) // For netcore, name mangling is Windows-exclusive
if (piinfo->piflags & PINVOKE_ATTRIBUTE_NO_MANGLE)
error_msg = mono_dl_symbol (module, import, &addr);
else {
Expand Down Expand Up @@ -1380,6 +1381,9 @@ pinvoke_probe_for_symbol (MonoDl *module, MonoMethodPInvoke *piinfo, const char
}
}
}
#else
error_msg = mono_dl_symbol (module, import, &addr);
#endif

*error_msg_out = error_msg;
return addr;
Expand Down