-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[mono] Linking statically ICU shim on mono #35790
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
Changes from all commits
c996d5e
fc6ec08
da6f766
6f0bb5c
806ab54
d1cd362
63b31b3
9dbce14
e582815
a17b189
b570c23
2571f55
efa2cb5
2459b39
c233c3f
2d41932
13bd64d
5626e11
5b6820a
55f7fc9
78886b3
1e66f98
b07315c
a9ed865
3d5d97b
31200b3
2d25950
fbd44f2
d641726
2657cb6
1bebc32
2bf4f50
b483e41
376764a
8327179
5c06e56
1af719d
06460ff
1a884ad
dc17ef9
3bbdf1e
2e45cbe
d83a61c
11c7a3d
2737b96
d990080
d7eefa3
03bdce3
8da62b1
676b58e
e974e46
464656a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -758,7 +758,7 @@ netcore_lookup_native_library (MonoAssemblyLoadContext *alc, MonoImage *image, c | |
| // We allow a special name to dlopen from the running process namespace, which is not present in CoreCLR | ||
| if (strcmp (scope, "__Internal") == 0) { | ||
| if (!internal_module) | ||
| internal_module = mono_dl_open (NULL, MONO_DL_LAZY, &error_msg); | ||
| internal_module = mono_dl_open_self (&error_msg); | ||
| module = internal_module; | ||
|
|
||
| if (!module) { | ||
|
|
@@ -1240,6 +1240,9 @@ lookup_pinvoke_call_impl (MonoMethod *method, MonoLookupPInvokeStatus *status_ou | |
| #endif | ||
|
|
||
thaystg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #ifdef ENABLE_NETCORE | ||
| #ifndef HOST_WIN32 | ||
CoffeeFlux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| retry_with_libcoreclr: | ||
| #endif | ||
| // FIXME: these flags are not getting passed correctly | ||
| module = netcore_lookup_native_library (alc, image, new_scope, 0); | ||
| #else | ||
|
|
@@ -1262,6 +1265,21 @@ lookup_pinvoke_call_impl (MonoMethod *method, MonoLookupPInvokeStatus *status_ou | |
| addr = pinvoke_probe_for_symbol (module, piinfo, new_import, &error_msg); | ||
|
|
||
| if (!addr) { | ||
| #if defined(ENABLE_NETCORE) && !defined(HOST_WIN32) | ||
| if (strcmp (new_scope, "__Internal") == 0) { | ||
CoffeeFlux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| g_free ((char *)new_scope); | ||
| #if defined(TARGET_OSX) | ||
| new_scope = g_strdup ("libcoreclr.dylib"); | ||
| #else | ||
| #if defined(TARGET_ANDROID) | ||
| new_scope = g_strdup ("libmonosgen-2.0.so"); | ||
| #else | ||
| new_scope = g_strdup ("libcoreclr.so"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have a tracking item somewhere about revisiting this since we won't be using the libmono->libcoreclr rename hack forever. |
||
| #endif | ||
| #endif | ||
| goto retry_with_libcoreclr; | ||
| } | ||
| #endif | ||
| status_out->err_code = LOOKUP_PINVOKE_ERR_NO_SYM; | ||
| status_out->err_arg = g_strdup (new_import); | ||
| goto exit; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,10 +136,10 @@ mono_dl_convert_flags (int flags) | |
|
|
||
| #ifdef ENABLE_NETCORE | ||
| // Specifying both will default to LOCAL | ||
| if (flags & MONO_DL_LOCAL) | ||
| lflags |= RTLD_LOCAL; | ||
| else if (flags & MONO_DL_GLOBAL) | ||
| if (flags & MONO_DL_GLOBAL && !(flags & MONO_DL_LOCAL)) | ||
| lflags |= RTLD_GLOBAL; | ||
| else | ||
| lflags |= RTLD_LOCAL; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Commenting just to note that this is a significant behavioral change to ensure we default to RTLD_LOCAL on both OSX and Linux. This was the intention from the start and was discussed beforehand, but is worth bringing attention to. |
||
| #else | ||
| lflags = flags & MONO_DL_LOCAL ? RTLD_LOCAL : RTLD_GLOBAL; | ||
| #endif | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.