@@ -29,9 +29,15 @@ PinvokeOverride::monodroid_pinvoke_override (const char *library_name, const cha
29
29
log_debug (LOG_ASSEMBLY, " library_name == '%s'; entrypoint_name == '%s'" , library_name, entrypoint_name);
30
30
31
31
if (library_name == nullptr || entrypoint_name == nullptr ) [[unlikely]] {
32
- log_fatal (LOG_ASSEMBLY, " Both library name ('%s') and entry point name ('%s') must be specified" , library_name, entrypoint_name);
33
- Helpers::abort_application ();
34
- }
32
+ Helpers::abort_application (
33
+ LOG_ASSEMBLY,
34
+ Util::monodroid_strdup_printf (
35
+ " Both library name ('%s') and entry point name ('%s') must be specified" ,
36
+ library_name,
37
+ entrypoint_name
38
+ )
39
+ );
40
+ }
35
41
36
42
hash_t library_name_hash = xxhash::hash (library_name, strlen (library_name));
37
43
hash_t entrypoint_hash = xxhash::hash (entrypoint_name, strlen (entrypoint_name));
@@ -51,8 +57,14 @@ PinvokeOverride::monodroid_pinvoke_override (const char *library_name, const cha
51
57
// the find* functions didn't know its hash), but we cannot be sure of that so we'll try to load it.
52
58
pinvoke_ptr = dlsym (RTLD_DEFAULT, entrypoint_name);
53
59
if (pinvoke_ptr == nullptr ) {
54
- log_fatal (LOG_ASSEMBLY, " Unable to load p/invoke entry '%s/%s' from the unified runtime DSO" , library_name, entrypoint_name);
55
- Helpers::abort_application ();
60
+ Helpers::abort_application (
61
+ LOG_ASSEMBLY,
62
+ Util::monodroid_strdup_printf (
63
+ " Unable to load p/invoke entry '%s/%s' from the unified runtime DSO" ,
64
+ library_name,
65
+ entrypoint_name
66
+ )
67
+ );
56
68
}
57
69
58
70
return pinvoke_ptr;
0 commit comments