diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs index 6f095c30cb2..3d32bc38f9f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs @@ -35,8 +35,6 @@ public class GeneratePackageManagerJava : AndroidTask public ITaskItem[] SatelliteAssemblies { get; set; } - public bool UseAssemblyStore { get; set; } - [Required] public string OutputDirectory { get; set; } @@ -204,21 +202,7 @@ void AddEnvironment () throw new InvalidOperationException ($"Unsupported BoundExceptionType value '{BoundExceptionType}'"); } - int assemblyNameWidth = 0; Encoding assemblyNameEncoding = Encoding.UTF8; - - Action updateNameWidth = (ITaskItem assembly) => { - if (UseAssemblyStore) { - return; - } - - string assemblyName = Path.GetFileName (assembly.ItemSpec); - int nameBytes = assemblyNameEncoding.GetBytes (assemblyName).Length; - if (nameBytes > assemblyNameWidth) { - assemblyNameWidth = nameBytes; - } - }; - int assemblyCount = 0; bool enableMarshalMethods = EnableMarshalMethods; HashSet archAssemblyNames = null; @@ -249,7 +233,6 @@ void AddEnvironment () if (SatelliteAssemblies != null) { foreach (ITaskItem assembly in SatelliteAssemblies) { - updateNameWidth (assembly); updateAssemblyCount (assembly); } } @@ -258,7 +241,6 @@ void AddEnvironment () int jnienv_initialize_method_token = -1; int jnienv_registerjninatives_method_token = -1; foreach (var assembly in ResolvedAssemblies) { - updateNameWidth (assembly); updateAssemblyCount (assembly); if (android_runtime_jnienv_class_token != -1) { @@ -272,17 +254,6 @@ void AddEnvironment () GetRequiredTokens (assembly.ItemSpec, out android_runtime_jnienv_class_token, out jnienv_initialize_method_token, out jnienv_registerjninatives_method_token); } - if (!UseAssemblyStore) { - int abiNameLength = 0; - foreach (string abi in SupportedAbis) { - if (abi.Length <= abiNameLength) { - continue; - } - abiNameLength = abi.Length; - } - assemblyNameWidth += abiNameLength + 2; // room for '/' and the terminating NUL - } - MonoComponent monoComponents = MonoComponent.None; if (MonoComponents != null && MonoComponents.Length > 0) { foreach (ITaskItem item in MonoComponents) { @@ -334,10 +305,8 @@ void AddEnvironment () JniAddNativeMethodRegistrationAttributePresent = NativeCodeGenState.Template != null ? NativeCodeGenState.Template.JniAddNativeMethodRegistrationAttributePresent : false, HaveRuntimeConfigBlob = haveRuntimeConfigBlob, NumberOfAssembliesInApk = assemblyCount, - BundledAssemblyNameWidth = assemblyNameWidth, MonoComponents = (MonoComponent)monoComponents, NativeLibraries = uniqueNativeLibraries, - HaveAssemblyStore = UseAssemblyStore, AndroidRuntimeJNIEnvToken = android_runtime_jnienv_class_token, JNIEnvInitializeToken = jnienv_initialize_method_token, JNIEnvRegisterJniNativesToken = jnienv_registerjninatives_method_token, diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs index 075f0154f98..77af45f9e6f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/EnvironmentHelper.cs @@ -46,7 +46,6 @@ public sealed class ApplicationConfig public bool broken_exception_transitions; public bool jni_add_native_method_registration_attribute_present; public bool have_runtime_config_blob; - public bool have_assemblies_blob; public bool marshal_methods_enabled; public bool ignore_split_configs; public byte bound_stream_io_exception_type; @@ -54,7 +53,6 @@ public sealed class ApplicationConfig public uint environment_variable_count; public uint system_property_count; public uint number_of_assemblies_in_apk; - public uint bundled_assembly_name_width; public uint number_of_assembly_store_files; public uint number_of_dso_cache_entries; public uint number_of_aot_cache_entries; @@ -67,7 +65,7 @@ public sealed class ApplicationConfig public string android_package_name = String.Empty; } - const uint ApplicationConfigFieldCount = 26; + const uint ApplicationConfigFieldCount = 24; const string ApplicationConfigSymbolName = "application_config"; const string AppEnvironmentVariablesSymbolName = "app_environment_variables"; @@ -241,97 +239,87 @@ static ApplicationConfig ReadApplicationConfig (EnvironmentFile envFile) ret.have_runtime_config_blob = ConvertFieldToBool ("have_runtime_config_blob", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 7: // have_assemblies_blob: bool / .byte - AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); - ret.have_assemblies_blob = ConvertFieldToBool ("have_assemblies_blob", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); - break; - - case 8: // marshal_methods_enabled: bool / .byte + case 7: // marshal_methods_enabled: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.marshal_methods_enabled = ConvertFieldToBool ("marshal_methods_enabled", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 9: // ignore_split_configs: bool / .byte + case 8: // ignore_split_configs: bool / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.ignore_split_configs = ConvertFieldToBool ("ignore_split_configs", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 10: // bound_stream_io_exception_type: byte / .byte + case 9: // bound_stream_io_exception_type: byte / .byte AssertFieldType (envFile.Path, parser.SourceFilePath, ".byte", field [0], item.LineNumber); ret.bound_stream_io_exception_type = ConvertFieldToByte ("bound_stream_io_exception_type", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 11: // package_naming_policy: uint32_t / .word | .long + case 10: // package_naming_policy: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.package_naming_policy = ConvertFieldToUInt32 ("package_naming_policy", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 12: // environment_variable_count: uint32_t / .word | .long + case 11: // environment_variable_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.environment_variable_count = ConvertFieldToUInt32 ("environment_variable_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 13: // system_property_count: uint32_t / .word | .long + case 12: // system_property_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.system_property_count = ConvertFieldToUInt32 ("system_property_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 14: // number_of_assemblies_in_apk: uint32_t / .word | .long + case 13: // number_of_assemblies_in_apk: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_assemblies_in_apk = ConvertFieldToUInt32 ("number_of_assemblies_in_apk", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 15: // bundled_assembly_name_width: uint32_t / .word | .long - Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); - ret.bundled_assembly_name_width = ConvertFieldToUInt32 ("bundled_assembly_name_width", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); - break; - - case 16: // number_of_assembly_store_files: uint32_t / .word | .long + case 14: // number_of_assembly_store_files: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_assembly_store_files = ConvertFieldToUInt32 ("number_of_assembly_store_files", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 17: // number_of_dso_cache_entries: uint32_t / .word | .long + case 15: // number_of_dso_cache_entries: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_dso_cache_entries = ConvertFieldToUInt32 ("number_of_dso_cache_entries", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 18: // number_of_aot_cache_entries: uint32_t / .word | .long + case 16: // number_of_aot_cache_entries: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.number_of_aot_cache_entries = ConvertFieldToUInt32 ("number_of_aot_cache_entries", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 19: // android_runtime_jnienv_class_token: uint32_t / .word | .long + case 17: // android_runtime_jnienv_class_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.android_runtime_jnienv_class_token = ConvertFieldToUInt32 ("android_runtime_jnienv_class_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 20: // jnienv_initialize_method_token: uint32_t / .word | .long + case 18: // jnienv_initialize_method_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jnienv_initialize_method_token = ConvertFieldToUInt32 ("jnienv_initialize_method_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 21: // jnienv_registerjninatives_method_token: uint32_t / .word | .long + case 19: // jnienv_registerjninatives_method_token: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jnienv_registerjninatives_method_token = ConvertFieldToUInt32 ("jnienv_registerjninatives_method_token", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 22: // jni_remapping_replacement_type_count: uint32_t / .word | .long + case 20: // jni_remapping_replacement_type_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jni_remapping_replacement_type_count = ConvertFieldToUInt32 ("jni_remapping_replacement_type_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 23: // jni_remapping_replacement_method_index_entry_count: uint32_t / .word | .long + case 21: // jni_remapping_replacement_method_index_entry_count: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.jni_remapping_replacement_method_index_entry_count = ConvertFieldToUInt32 ("jni_remapping_replacement_method_index_entry_count", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 24: // mono_components_mask: uint32_t / .word | .long + case 22: // mono_components_mask: uint32_t / .word | .long Assert.IsTrue (expectedUInt32Types.Contains (field [0]), $"Unexpected uint32_t field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); ret.mono_components_mask = ConvertFieldToUInt32 ("mono_components_mask", envFile.Path, parser.SourceFilePath, item.LineNumber, field [1]); break; - case 25: // android_package_name: string / [pointer type] + case 23: // android_package_name: string / [pointer type] Assert.IsTrue (expectedPointerTypes.Contains (field [0]), $"Unexpected pointer field type in '{envFile.Path}:{item.LineNumber}': {field [0]}"); pointers.Add (field [1].Trim ()); break; diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs index 9a2335f9e75..d8bea68deb1 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig.cs @@ -31,7 +31,6 @@ sealed class ApplicationConfig public bool broken_exception_transitions; public bool jni_add_native_method_registration_attribute_present; public bool have_runtime_config_blob; - public bool have_assemblies_blob; public bool marshal_methods_enabled; public bool ignore_split_configs; public byte bound_stream_io_exception_type; @@ -39,7 +38,6 @@ sealed class ApplicationConfig public uint environment_variable_count; public uint system_property_count; public uint number_of_assemblies_in_apk; - public uint bundled_assembly_name_width; public uint number_of_dso_cache_entries; public uint number_of_aot_cache_entries; public uint number_of_shared_libraries; diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs index 9a0bc213d6c..7f080d926d1 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs @@ -175,9 +175,7 @@ sealed class XamarinAndroidBundledAssembly public global::Android.Runtime.BoundExceptionType BoundExceptionType { get; set; } public bool JniAddNativeMethodRegistrationAttributePresent { get; set; } public bool HaveRuntimeConfigBlob { get; set; } - public bool HaveAssemblyStore { get; set; } public int NumberOfAssembliesInApk { get; set; } - public int BundledAssemblyNameWidth { get; set; } // including the trailing NUL public int AndroidRuntimeJNIEnvToken { get; set; } public int JNIEnvInitializeToken { get; set; } public int JNIEnvRegisterJniNativesToken { get; set; } @@ -227,7 +225,6 @@ protected override void Construct (LlvmIrModule module) broken_exception_transitions = BrokenExceptionTransitions, jni_add_native_method_registration_attribute_present = JniAddNativeMethodRegistrationAttributePresent, have_runtime_config_blob = HaveRuntimeConfigBlob, - have_assemblies_blob = HaveAssemblyStore, marshal_methods_enabled = MarshalMethodsEnabled, ignore_split_configs = IgnoreSplitConfigs, bound_stream_io_exception_type = (byte)BoundExceptionType, @@ -236,7 +233,6 @@ protected override void Construct (LlvmIrModule module) system_property_count = (uint)(systemProperties == null ? 0 : systemProperties.Count * 2), number_of_assemblies_in_apk = (uint)NumberOfAssembliesInApk, number_of_shared_libraries = (uint)NativeLibraries.Count, - bundled_assembly_name_width = (uint)BundledAssemblyNameWidth, number_of_dso_cache_entries = (uint)dsoCache.Count, number_of_aot_cache_entries = (uint)aotDsoCache.Count, android_runtime_jnienv_class_token = (uint)AndroidRuntimeJNIEnvToken, @@ -269,36 +265,12 @@ protected override void Construct (LlvmIrModule module) }; module.Add (dso_apk_entries); - if (!HaveAssemblyStore) { - xamarinAndroidBundledAssemblies = new List> (NumberOfAssembliesInApk); - - var emptyBundledAssemblyData = new XamarinAndroidBundledAssembly { - file_fd = -1, - data_offset = 0, - data_size = 0, - data = 0, - name_length = (uint)BundledAssemblyNameWidth, - name = null, - }; - - for (int i = 0; i < NumberOfAssembliesInApk; i++) { - xamarinAndroidBundledAssemblies.Add (new StructureInstance (xamarinAndroidBundledAssemblyStructureInfo, emptyBundledAssemblyData)); - } - } - - string bundledBuffersSize = xamarinAndroidBundledAssemblies == null ? "empty (unused when assembly stores are enabled)" : $"{BundledAssemblyNameWidth} bytes long"; - var bundled_assemblies = new LlvmIrGlobalVariable (typeof(List>), "bundled_assemblies", LlvmIrVariableOptions.GlobalWritable) { - Value = xamarinAndroidBundledAssemblies, - Comment = $" Bundled assembly name buffers, all {bundledBuffersSize}", - }; - module.Add (bundled_assemblies); - AddAssemblyStores (module); } void AddAssemblyStores (LlvmIrModule module) { - ulong itemCount = (ulong)(HaveAssemblyStore ? NumberOfAssembliesInApk : 0); + ulong itemCount = (ulong)NumberOfAssembliesInApk; var assembly_store_bundled_assemblies = new LlvmIrGlobalVariable (typeof(List>), "assembly_store_bundled_assemblies", LlvmIrVariableOptions.GlobalWritable) { ZeroInitializeArray = true, ArrayItemCount = itemCount, diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 82c438e8ac4..bb4c185f0c0 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -320,8 +320,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. <_AndroidAotStripLibraries Condition=" '$(_AndroidAotStripLibraries)' == '' And '$(AndroidIncludeDebugSymbols)' != 'true' ">True - false - true True False False @@ -1742,7 +1740,6 @@ because xbuild doesn't support framework reference assemblies. PackageNamingPolicy="$(AndroidPackageNamingPolicy)" BoundExceptionType="$(AndroidBoundExceptionType)" RuntimeConfigBinFilePath="$(_BinaryRuntimeConfigPath)" - UseAssemblyStore="$(AndroidUseAssemblyStore)" EnableMarshalMethods="$(_AndroidUseMarshalMethods)" CustomBundleConfigFile="$(AndroidBundleConfigurationFile)" > diff --git a/src/native/monodroid/embedded-assemblies-zip.cc b/src/native/monodroid/embedded-assemblies-zip.cc index 23aa21f7dda..6b3fafc60ca 100644 --- a/src/native/monodroid/embedded-assemblies-zip.cc +++ b/src/native/monodroid/embedded-assemblies-zip.cc @@ -87,94 +87,6 @@ EmbeddedAssemblies::zip_load_entry_common (size_t entry_index, std::vector const& entry_name, ZipEntryLoadState const& state, [[maybe_unused]] monodroid_should_register should_register) noexcept -{ -#if defined (DEBUG) - const char *last_slash = Util::find_last (entry_name, '/'); - bool entry_is_overridden = last_slash == nullptr ? false : !should_register (last_slash + 1); -#else - constexpr bool entry_is_overridden = false; -#endif - - if (register_debug_symbols && !entry_is_overridden && Util::ends_with (entry_name, SharedConstants::PDB_EXTENSION)) { - if (bundled_debug_data == nullptr) { - bundled_debug_data = new std::vector (); - bundled_debug_data->reserve (application_config.number_of_assemblies_in_apk); - } - - bundled_debug_data->emplace_back (); - set_debug_entry_data (bundled_debug_data->back (), state, entry_name); - return; - } - - if (!Util::ends_with (entry_name, SharedConstants::DLL_EXTENSION)) { - return; - } - -#if defined (DEBUG) - if (entry_is_overridden) { - return; - } -#endif - - if (bundled_assembly_index >= application_config.number_of_assemblies_in_apk || state.bundled_assemblies_slow_path) [[unlikely]] { - if (!state.bundled_assemblies_slow_path && bundled_assembly_index == application_config.number_of_assemblies_in_apk) { - log_warn (LOG_ASSEMBLY, "Number of assemblies stored at build time (%u) was incorrect, switching to slow bundling path.", application_config.number_of_assemblies_in_apk); - } - - if (extra_bundled_assemblies == nullptr) { - extra_bundled_assemblies = new std::vector (); - } - - extra_bundled_assemblies->emplace_back (); - // means we need to allocate memory to store the entry name, only the entries pre-allocated during - // build have valid pointer to the name storage area - set_entry_data (extra_bundled_assemblies->back (), state, entry_name); - return; - } - - log_debug (LOG_ASSEMBLY, "Setting bundled assembly entry data at index %zu", bundled_assembly_index); - set_assembly_entry_data (bundled_assemblies [bundled_assembly_index], state, entry_name); - log_debug (LOG_ASSEMBLY, "[%zu] data set: name == '%s'; file_name == '%s'", bundled_assembly_index, bundled_assemblies [bundled_assembly_index].name, bundled_assemblies [bundled_assembly_index].file_name); - bundled_assembly_index++; - number_of_found_assemblies = bundled_assembly_index; - have_and_want_debug_symbols = register_debug_symbols && bundled_debug_data != nullptr; -} - -force_inline void -EmbeddedAssemblies::zip_load_individual_assembly_entries (std::vector const& buf, uint32_t num_entries, [[maybe_unused]] monodroid_should_register should_register, ZipEntryLoadState &state) noexcept -{ - // TODO: do away with all the string manipulation here. Replace it with generating xxhash for the entry name - dynamic_local_string entry_name; - configure_state_for_individual_assembly_load (state); - - // clang-tidy claims we have a leak in the loop: - // - // Potential leak of memory pointed to by 'assembly_name' - // - // This is because we allocate `assembly_name` for a `.config` file, pass it to Mono and we don't free the value. - // However, clang-tidy can't know that the value is owned by Mono and we must not free it, thus the suppression. - // - // NOLINTNEXTLINE(clang-analyzer-unix.Malloc) - for (size_t i = 0; i < num_entries; i++) { - bool interesting_entry = zip_load_entry_common (i, buf, entry_name, state); - if (!interesting_entry) { - continue; - } - - if (entry_name[state.prefix_len + SharedConstants::REGULAR_ASSEMBLY_MARKER_INDEX] == SharedConstants::REGULAR_ASSEMBLY_MARKER_CHAR) { - unmangle_name (entry_name, state.prefix_len); - } else if (entry_name[state.prefix_len + SharedConstants::SATELLITE_ASSEMBLY_MARKER_INDEX] == SharedConstants::SATELLITE_ASSEMBLY_MARKER_CHAR) { - unmangle_name (entry_name, state.prefix_len); - } else { - continue; // Can't be an assembly, the name's not mangled - } - - store_individual_assembly_data (entry_name, state, should_register); - } -} - inline void EmbeddedAssemblies::map_assembly_store (dynamic_local_string const& entry_name, ZipEntryLoadState &state) noexcept { @@ -347,8 +259,6 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus .data_offset = 0, .file_size = 0, .bundled_assemblies_slow_path = false, - .max_assembly_name_size = 0, - .max_assembly_file_name_size = 0, }; ssize_t nread = read (fd, buf.data (), static_cast(buf.size ())); @@ -365,52 +275,7 @@ EmbeddedAssemblies::zip_load_entries (int fd, const char *apk_name, [[maybe_unus ); } - if (application_config.have_assembly_store) { - zip_load_assembly_store_entries (buf, cd_entries, state); - } else { - zip_load_individual_assembly_entries (buf, cd_entries, should_register, state); - } -} - -template -force_inline void -EmbeddedAssemblies::set_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept -{ - entry.file_fd = state.file_fd; - if constexpr (NeedsNameAlloc) { - entry.name = Util::strdup_new (entry_name.get () + state.prefix_len); - if (!AndroidSystem::is_embedded_dso_mode_enabled () && state.file_name != nullptr) { - entry.file_name = Util::strdup_new (state.file_name); - } - } else { - // entry.name is preallocated at build time here and is max_name_size + 1 bytes long, filled with 0s, thus we - // don't need to append the terminating NUL even for strings of `max_name_size` characters - strncpy (entry.name, entry_name.get () + state.prefix_len, state.max_assembly_name_size); - if (!AndroidSystem::is_embedded_dso_mode_enabled () && state.file_name != nullptr) { - strncpy (entry.file_name, state.file_name, state.max_assembly_file_name_size); - } - } - entry.name_length = std::min (static_cast(entry_name.length ()) - state.prefix_len, state.max_assembly_name_size); - entry.data_offset = state.data_offset; - entry.data_size = state.file_size; - - log_debug ( - LOG_ASSEMBLY, - "Set bundled assembly entry data. file name: '%s'; entry name: '%s'; data size: %u", - entry.file_name, entry.name, entry.data_size - ); -} - -force_inline void -EmbeddedAssemblies::set_assembly_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept -{ - set_entry_data (entry, state, entry_name); -} - -force_inline void -EmbeddedAssemblies::set_debug_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept -{ - set_entry_data (entry, state, entry_name); + zip_load_assembly_store_entries (buf, cd_entries, state); } bool diff --git a/src/native/monodroid/embedded-assemblies.cc b/src/native/monodroid/embedded-assemblies.cc index 7f66b345d2a..62d98be3148 100644 --- a/src/native/monodroid/embedded-assemblies.cc +++ b/src/native/monodroid/embedded-assemblies.cc @@ -171,203 +171,12 @@ EmbeddedAssemblies::get_assembly_data (uint8_t *data, uint32_t data_size, [[mayb } } -force_inline void -EmbeddedAssemblies::get_assembly_data (XamarinAndroidBundledAssembly const& e, uint8_t*& assembly_data, uint32_t& assembly_data_size) noexcept -{ - get_assembly_data (e.data, e.data_size, e.name, assembly_data, assembly_data_size); -} - force_inline void EmbeddedAssemblies::get_assembly_data (AssemblyStoreSingleAssemblyRuntimeData const& e, uint8_t*& assembly_data, uint32_t& assembly_data_size) noexcept { get_assembly_data (e.image_data, e.descriptor->data_size, "", assembly_data, assembly_data_size); } -template -force_inline void -EmbeddedAssemblies::map_runtime_file (XamarinAndroidBundledAssembly& file) noexcept -{ - int fd; - bool close_fd; - if (!AndroidSystem::is_embedded_dso_mode_enabled ()) { - log_debug (LOG_ASSEMBLY, "Mapping a runtime file from filesystem"); - close_fd = true; - - // file.file_fd refers to the directory where our files live - auto temp_fd = Util::open_file_ro_at (file.file_fd, file.file_name); - if (!temp_fd) { - return; - } - fd = temp_fd.value (); - } else { - fd = file.file_fd; - close_fd = false; - } - - md_mmap_info map_info = md_mmap_apk_file (fd, file.data_offset, file.data_size, file.name); - if (close_fd) { - close (fd); - } - - auto [payload_data, payload_size] = get_wrapper_dso_payload_pointer_and_size (map_info, file.name); - - // `data_size` might have been ELF wrapper file size, we must store payload size here (the actual DLL size) - file.data_size = static_cast(payload_size); - - if (MonodroidState::is_startup_in_progress ()) { - file.data = static_cast(payload_data); - } else { - uint8_t *expected_null = nullptr; - bool already_mapped = !__atomic_compare_exchange ( - /* ptr */ &file.data, - /* expected */ &expected_null, - /* desired */ reinterpret_cast(&payload_data), - /* weak */ false, - /* success_memorder */ __ATOMIC_ACQUIRE, - /* failure_memorder */ __ATOMIC_RELAXED - ); - - if (already_mapped) { - log_debug (LOG_ASSEMBLY, "Assembly %s already mmapped by another thread, unmapping our copy", file.name); - munmap (map_info.area, file.data_size); - map_info.area = nullptr; - } - } - - if constexpr (LogMapping) { - if (Util::should_log (LOG_ASSEMBLY) && map_info.area != nullptr) [[unlikely]] { - const char *p = (const char*) file.data; - - std::array header; - for (size_t j = 0; j < header.size () - 1; ++j) - header[j] = isprint (p [j]) ? p [j] : '.'; - header [header.size () - 1] = '\0'; - - log_info_nocheck (LOG_ASSEMBLY, "file-offset: % 8x start: %08p end: %08p len: % 12i zip-entry: %s name: %s [%s]", - (int) file.data_offset, file.data, file.data + file.data_size, (int) file.data_size, file.name, file.name, header.data ()); - } - } -} - -force_inline void -EmbeddedAssemblies::map_assembly (XamarinAndroidBundledAssembly& file) noexcept -{ - map_runtime_file (file); -} - -force_inline void -EmbeddedAssemblies::map_debug_data (XamarinAndroidBundledAssembly& file) noexcept -{ - map_runtime_file (file); -} - -template -force_inline MonoAssembly* -EmbeddedAssemblies::load_bundled_assembly ( - XamarinAndroidBundledAssembly& assembly, - dynamic_local_string const& name, - dynamic_local_string const& abi_name, - TLoaderData loader_data, - bool ref_only) noexcept -{ - if (assembly.name == nullptr || assembly.name[0] == '\0') { - return nullptr; - } - - if (strcmp (assembly.name, name.get ()) != 0) { - if (strcmp (assembly.name, abi_name.get ()) != 0) { - return nullptr; - } else { - log_debug (LOG_ASSEMBLY, "open_from_bundles: found architecture-specific: '%s'", abi_name.get ()); - } - } - - if (assembly.data == nullptr) { - map_assembly (assembly); - } - - uint8_t *assembly_data; - uint32_t assembly_data_size; - - get_assembly_data (assembly, assembly_data, assembly_data_size); - MonoImage *image = MonoImageLoader::load (name, loader_data, assembly_data, assembly_data_size); - if (image == nullptr) { - return nullptr; - } - - if (have_and_want_debug_symbols) { - uint32_t base_name_length = assembly.name_length - 3; // we need the trailing dot - for (XamarinAndroidBundledAssembly& debug_file : *bundled_debug_data) { - if (debug_file.name_length != assembly.name_length) { - continue; - } - - if (strncmp (debug_file.name, assembly.name, base_name_length) != 0) { - continue; - } - - if (debug_file.data == nullptr) { - map_debug_data (debug_file); - } - - if (debug_file.data != nullptr) { - if (debug_file.data_size > std::numeric_limits::max ()) { - log_warn (LOG_ASSEMBLY, "Debug info file '%s' is too big for Mono to consume", debug_file.name); - } else { - mono_debug_open_image_from_memory (image, reinterpret_cast(debug_file.data), static_cast(debug_file.data_size)); - } - } - break; - } - } - - MonoImageOpenStatus status; - MonoAssembly *a = mono_assembly_load_from_full (image, name.get (), &status, ref_only); - if (a == nullptr || status != MonoImageOpenStatus::MONO_IMAGE_OK) { - log_warn (LOG_ASSEMBLY, "Failed to load managed assembly '%s'. %s", name.get (), mono_image_strerror (status)); - return nullptr; - } - - return a; -} - -template -force_inline MonoAssembly* -EmbeddedAssemblies::individual_assemblies_open_from_bundles (dynamic_local_string& name, TLoaderData loader_data, bool ref_only) noexcept -{ - if (!Util::ends_with (name, SharedConstants::DLL_EXTENSION)) { - name.append (SharedConstants::DLL_EXTENSION); - } - - log_debug (LOG_ASSEMBLY, "individual_assemblies_open_from_bundles: looking for bundled name: '%s'", name.get ()); - - dynamic_local_string abi_name; - abi_name - .assign (SharedConstants::android_lib_abi) - .append (zip_path_separator) - .append (name); - - MonoAssembly *a = nullptr; - - for (size_t i = 0; i < application_config.number_of_assemblies_in_apk; i++) { - a = load_bundled_assembly (bundled_assemblies [i], name, abi_name, loader_data, ref_only); - if (a != nullptr) { - return a; - } - } - - if (extra_bundled_assemblies != nullptr) { - for (XamarinAndroidBundledAssembly& assembly : *extra_bundled_assemblies) { - a = load_bundled_assembly (assembly, name, abi_name, loader_data, ref_only); - if (a != nullptr) { - return a; - } - } - } - - return nullptr; -} - force_inline const AssemblyStoreIndexEntry* EmbeddedAssemblies::find_assembly_store_entry (hash_t hash, const AssemblyStoreIndexEntry *entries, size_t entry_count) noexcept { @@ -472,13 +281,7 @@ EmbeddedAssemblies::open_from_bundles (MonoAssemblyName* aname, TLoaderData load } name.append_c (asmname); - MonoAssembly *a; - if (application_config.have_assembly_store) { - a = assembly_store_open_from_bundles (name, loader_data, ref_only); - } else { - a = individual_assemblies_open_from_bundles (name, loader_data, ref_only); - } - + MonoAssembly *a = assembly_store_open_from_bundles (name, loader_data, ref_only); if (a == nullptr) { log_warn (LOG_ASSEMBLY, "open_from_bundles: failed to load bundled assembly %s", name.get ()); #if defined(DEBUG) @@ -1160,69 +963,6 @@ EmbeddedAssemblies::register_from_apk (const char *apk_file, monodroid_should_re return number_of_found_assemblies; } -template -force_inline bool -EmbeddedAssemblies::maybe_register_assembly_from_filesystem ( - [[maybe_unused]] monodroid_should_register should_register, - size_t &assembly_count, - const dirent* dir_entry, - ZipEntryLoadState& state) noexcept -{ - dynamic_local_string entry_name; - auto copy_dentry_and_update_state = [] (dynamic_local_string &name, ZipEntryLoadState& state, const dirent* dir_entry) - { - name.assign_c (dir_entry->d_name); - - // We don't need to duplicate the name here, it will be done farther on - state.file_name = dir_entry->d_name; - }; - - // We check whether dir_entry->d_name is an array with a fixed size and whether it's - // big enough so that we can index the array below without having to worry about buffer - // overflows. These are compile-time checks and the status of the field won't change at - // runtime unless Android breaks compatibility (unlikely). - // - // Currently (Jan 2024), dir_try->d_name is declared as `char[256]` by Bionic - static_assert (std::is_bounded_array_vd_name)>); - static_assert (sizeof(dir_entry->d_name) > SharedConstants::MANGLED_ASSEMBLY_REGULAR_ASSEMBLY_MARKER.size()); - static_assert (sizeof(dir_entry->d_name) > SharedConstants::MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER.size()); - - if constexpr (MangledNamesMode) { - // We're only interested in "mangled" file names, namely those starting with either the `lib_` or `lib-` prefixes - if (dir_entry->d_name[SharedConstants::REGULAR_ASSEMBLY_MARKER_INDEX] == SharedConstants::REGULAR_ASSEMBLY_MARKER_CHAR) { - assembly_count++; - copy_dentry_and_update_state (entry_name, state, dir_entry); - unmangle_name (entry_name); - } else if (dir_entry->d_name[SharedConstants::SATELLITE_ASSEMBLY_MARKER_INDEX] == SharedConstants::SATELLITE_ASSEMBLY_MARKER_CHAR) { - assembly_count++; - copy_dentry_and_update_state (entry_name, state, dir_entry); - unmangle_name (entry_name); - } else { - return false; - } - } else { - if (Util::ends_with (dir_entry->d_name, SharedConstants::DLL_EXTENSION) || - Util::ends_with (dir_entry->d_name, SharedConstants::PDB_EXTENSION)) { - assembly_count++; - copy_dentry_and_update_state (entry_name, state, dir_entry); - } else { - return false; - } - - } - state.data_offset = 0; - - auto file_size = Util::get_file_size_at (state.file_fd, state.file_name); - if (!file_size) { - return false; // don't terminate, keep going - } - - state.file_size = static_cast(file_size.value ()); - store_individual_assembly_data (entry_name, state, should_register); - - return false; -} - force_inline bool EmbeddedAssemblies::maybe_register_blob_from_filesystem ( [[maybe_unused]] monodroid_should_register should_register, @@ -1283,13 +1023,7 @@ EmbeddedAssemblies::register_from_filesystem (const char *lib_dir_path,bool look return 0; } - auto register_fn = - application_config.have_assembly_store ? std::mem_fn (&EmbeddedAssemblies::maybe_register_blob_from_filesystem) : - (look_for_mangled_names ? - std::mem_fn (&EmbeddedAssemblies::maybe_register_assembly_from_filesystem) : - std::mem_fn (&EmbeddedAssemblies::maybe_register_assembly_from_filesystem - ) - ); + auto register_fn = std::mem_fn (&EmbeddedAssemblies::maybe_register_blob_from_filesystem); size_t assembly_count = 0; do { diff --git a/src/native/monodroid/embedded-assemblies.hh b/src/native/monodroid/embedded-assemblies.hh index 02c4375fd87..b690f4fc31d 100644 --- a/src/native/monodroid/embedded-assemblies.hh +++ b/src/native/monodroid/embedded-assemblies.hh @@ -73,8 +73,6 @@ namespace xamarin::android::internal { uint32_t data_offset; uint32_t file_size; bool bundled_assemblies_slow_path; - uint32_t max_assembly_name_size; - uint32_t max_assembly_file_name_size; }; private: @@ -185,10 +183,6 @@ namespace xamarin::android::internal { void ensure_valid_assembly_stores () const noexcept { - if (!application_config.have_assembly_store) { - return; - } - abort_unless (assembly_store_hashes != nullptr, "Invalid or incomplete assembly store data"); } @@ -199,34 +193,16 @@ namespace xamarin::android::internal { size_t register_from_filesystem (monodroid_should_register should_register) noexcept; size_t register_from_filesystem (const char *dir, bool look_for_mangled_names, monodroid_should_register should_register) noexcept; - template - bool maybe_register_assembly_from_filesystem (monodroid_should_register should_register, size_t& assembly_count, const dirent* dir_entry, ZipEntryLoadState& state) noexcept; bool maybe_register_blob_from_filesystem (monodroid_should_register should_register, size_t& assembly_count, const dirent* dir_entry, ZipEntryLoadState& state) noexcept; void gather_bundled_assemblies_from_apk (const char* apk, monodroid_should_register should_register); - template - MonoAssembly* individual_assemblies_open_from_bundles (dynamic_local_string& name, TLoaderData loader_data, bool ref_only) noexcept; - template MonoAssembly* assembly_store_open_from_bundles (dynamic_local_string& name, TLoaderData loader_data, bool ref_only) noexcept; template MonoAssembly* open_from_bundles (MonoAssemblyName* aname, TLoaderData loader_data, MonoError *error, bool ref_only) noexcept; - template - void map_runtime_file (XamarinAndroidBundledAssembly& file) noexcept; - void map_assembly (XamarinAndroidBundledAssembly& file) noexcept; - void map_debug_data (XamarinAndroidBundledAssembly& file) noexcept; - - template - MonoAssembly* load_bundled_assembly ( - XamarinAndroidBundledAssembly& assembly, - dynamic_local_string const& name, - dynamic_local_string const& abi_name, - TLoaderData loader_data, - bool ref_only) noexcept; - #if defined (DEBUG) template bool typemap_read_header (int dir_fd, const char *file_type, const char *dir_path, const char *file_path, uint32_t expected_magic, H &header, size_t &file_size, int &fd); @@ -244,11 +220,9 @@ namespace xamarin::android::internal { void set_assembly_data_and_size (uint8_t* source_assembly_data, uint32_t source_assembly_data_size, uint8_t*& dest_assembly_data, uint32_t& dest_assembly_data_size) noexcept; void get_assembly_data (uint8_t *data, uint32_t data_size, const char *name, uint8_t*& assembly_data, uint32_t& assembly_data_size) noexcept; - void get_assembly_data (XamarinAndroidBundledAssembly const& e, uint8_t*& assembly_data, uint32_t& assembly_data_size) noexcept; void get_assembly_data (AssemblyStoreSingleAssemblyRuntimeData const& e, uint8_t*& assembly_data, uint32_t& assembly_data_size) noexcept; void zip_load_entries (int fd, const char *apk_name, monodroid_should_register should_register); - void zip_load_individual_assembly_entries (std::vector const& buf, uint32_t num_entries, monodroid_should_register should_register, ZipEntryLoadState &state) noexcept; void zip_load_assembly_store_entries (std::vector const& buf, uint32_t num_entries, ZipEntryLoadState &state) noexcept; bool zip_load_entry_common (size_t entry_index, std::vector const& buf, dynamic_local_string &entry_name, ZipEntryLoadState &state) noexcept; bool zip_read_cd_info (int fd, uint32_t& cd_offset, uint32_t& cd_size, uint16_t& cd_entries); @@ -321,11 +295,7 @@ namespace xamarin::android::internal { return { assemblies_prefix_override, static_cast(strlen (assemblies_prefix_override)) }; } - if (application_config.have_assembly_store) { - return { apk_lib_prefix.data (), apk_lib_prefix.size () - 1 }; - } - - return {assemblies_prefix.data (), assemblies_prefix.size () - 1}; + return { apk_lib_prefix.data (), apk_lib_prefix.size () - 1 }; } bool all_required_zip_entries_found () const noexcept @@ -349,13 +319,8 @@ namespace xamarin::android::internal { static int compare_mvid (const uint8_t *mvid, const TypeMapModule *module) noexcept; static const TypeMapModuleEntry* binary_search (uint32_t key, const TypeMapModuleEntry *arr, uint32_t n) noexcept; #endif - template - void set_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept; - void set_assembly_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept; - void set_debug_entry_data (XamarinAndroidBundledAssembly &entry, ZipEntryLoadState const& state, dynamic_local_string const& entry_name) noexcept; void map_assembly_store (dynamic_local_string const& entry_name, ZipEntryLoadState &state) noexcept; const AssemblyStoreIndexEntry* find_assembly_store_entry (hash_t hash, const AssemblyStoreIndexEntry *entries, size_t entry_count) noexcept; - void store_individual_assembly_data (dynamic_local_string const& entry_name, ZipEntryLoadState const& state, monodroid_should_register should_register) noexcept; constexpr size_t get_mangled_name_max_size_overhead () { @@ -367,10 +332,6 @@ namespace xamarin::android::internal { void configure_state_for_individual_assembly_load (ZipEntryLoadState& state) noexcept { state.bundled_assemblies_slow_path = bundled_assembly_index >= application_config.number_of_assemblies_in_apk; - state.max_assembly_name_size = application_config.bundled_assembly_name_width - 1; - - // Enough room for the mangle character at the start, plus the extra extension - state.max_assembly_file_name_size = static_cast(state.max_assembly_name_size + get_mangled_name_max_size_overhead ()); } template @@ -418,9 +379,6 @@ namespace xamarin::android::internal { static inline constexpr bool UnmangleSatelliteAssembly = true; static inline constexpr bool UnmangleRegularAssembly = false; - std::vector *bundled_debug_data = nullptr; - std::vector *extra_bundled_assemblies = nullptr; - bool register_debug_symbols; bool have_and_want_debug_symbols; size_t bundled_assembly_index = 0; diff --git a/src/native/monodroid/monodroid-glue.cc b/src/native/monodroid/monodroid-glue.cc index 88ff6ada6ba..dd1c6a32167 100644 --- a/src/native/monodroid/monodroid-glue.cc +++ b/src/native/monodroid/monodroid-glue.cc @@ -235,7 +235,6 @@ MonodroidRuntime::gather_bundled_assemblies (jstring_array_wrapper &runtimeApks, int64_t apk_count = static_cast(runtimeApks.get_length ()); size_t prev_num_assemblies = 0; bool got_split_config_abi_apk = false; - bool got_base_apk = false; for (int64_t i = 0; i < apk_count; i++) { jstring_wrapper &apk_file = runtimeApks [static_cast(i)]; @@ -247,8 +246,6 @@ MonodroidRuntime::gather_bundled_assemblies (jstring_array_wrapper &runtimeApks, // configuration blob are in `lib/{ARCH}`, which in turn lives in the split config APK if (!got_split_config_abi_apk && Util::ends_with (apk_file.get_cstr (), SharedConstants::split_config_abi_apk_name)) { got_split_config_abi_apk = scan_apk = true; - } else if (!application_config.have_assembly_store && !got_base_apk && Util::ends_with (apk_file.get_cstr (), base_apk_name)) { - got_base_apk = scan_apk = true; } if (!scan_apk) { diff --git a/src/native/xamarin-app-stub/application_dso_stub.cc b/src/native/xamarin-app-stub/application_dso_stub.cc index 37c3e6381ef..81dd738b96f 100644 --- a/src/native/xamarin-app-stub/application_dso_stub.cc +++ b/src/native/xamarin-app-stub/application_dso_stub.cc @@ -49,7 +49,6 @@ const ApplicationConfig application_config = { .broken_exception_transitions = false, .jni_add_native_method_registration_attribute_present = false, .have_runtime_config_blob = false, - .have_assembly_store = false, .marshal_methods_enabled = false, .ignore_split_configs = false, .bound_exception_type = 0, // System @@ -57,7 +56,6 @@ const ApplicationConfig application_config = { .environment_variable_count = 0, .system_property_count = 0, .number_of_assemblies_in_apk = 2, - .bundled_assembly_name_width = 0, .number_of_dso_cache_entries = 2, .number_of_shared_libraries = 2, .android_runtime_jnienv_class_token = 1, @@ -73,33 +71,6 @@ const char* const mono_aot_mode_name = "normal"; const char* const app_environment_variables[] = {}; const char* const app_system_properties[] = {}; -static constexpr size_t AssemblyNameWidth = 128; - -static char first_assembly_name[AssemblyNameWidth]; -static char second_assembly_name[AssemblyNameWidth]; - -XamarinAndroidBundledAssembly bundled_assemblies[] = { - { - .file_fd = -1, - .file_name = nullptr, - .data_offset = 0, - .data_size = 0, - .data = nullptr, - .name_length = 0, - .name = first_assembly_name, - }, - - { - .file_fd = -1, - .file_name = nullptr, - .data_offset = 0, - .data_size = 0, - .data = nullptr, - .name_length = 0, - .name = second_assembly_name, - }, -}; - AssemblyStoreSingleAssemblyRuntimeData assembly_store_bundled_assemblies[] = { { .image_data = nullptr, diff --git a/src/native/xamarin-app-stub/xamarin-app.hh b/src/native/xamarin-app-stub/xamarin-app.hh index 426b4913e55..f54aa062ef8 100644 --- a/src/native/xamarin-app-stub/xamarin-app.hh +++ b/src/native/xamarin-app-stub/xamarin-app.hh @@ -122,17 +122,6 @@ struct CompressedAssemblies CompressedAssemblyDescriptor *descriptors; }; -struct XamarinAndroidBundledAssembly -{ - int32_t file_fd; - char *file_name; - uint32_t data_offset; - uint32_t data_size; - uint8_t *data; - uint32_t name_length; - char *name; -}; - // // Assembly store format // @@ -239,7 +228,6 @@ struct ApplicationConfig bool broken_exception_transitions; bool jni_add_native_method_registration_attribute_present; bool have_runtime_config_blob; - bool have_assembly_store; bool marshal_methods_enabled; bool ignore_split_configs; uint8_t bound_exception_type; @@ -247,7 +235,6 @@ struct ApplicationConfig uint32_t environment_variable_count; uint32_t system_property_count; uint32_t number_of_assemblies_in_apk; - uint32_t bundled_assembly_name_width; uint32_t number_of_dso_cache_entries; uint32_t number_of_aot_cache_entries; uint32_t number_of_shared_libraries; @@ -334,7 +321,6 @@ MONO_API MONO_API_EXPORT const char* const app_system_properties[]; MONO_API MONO_API_EXPORT const char* const mono_aot_mode_name; -MONO_API MONO_API_EXPORT XamarinAndroidBundledAssembly bundled_assemblies[]; MONO_API MONO_API_EXPORT AssemblyStoreSingleAssemblyRuntimeData assembly_store_bundled_assemblies[]; MONO_API MONO_API_EXPORT AssemblyStoreRuntimeData assembly_store;