Skip to content

Commit 8355471

Browse files
committed
Now it's done :P
1 parent b5b6291 commit 8355471

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ protected override void Construct (LlvmIrModule module)
276276

277277
// This variable MUST be written after `dso_cache` since it relies on sorting performed by HashAndSortDSOCache
278278
var dso_jni_preloads_idx = new LlvmIrGlobalVariable (new List<uint> (), "dso_jni_preloads_idx", LlvmIrVariableOptions.GlobalConstant) {
279-
Comment = "Indices of DSO libraries to preload because of JNI use",
279+
Comment = " Indices into dso_cache[] of DSO libraries to preload because of JNI use",
280280
ArrayItemCount = (uint)dsoState.JniPreloadDSOs.Count,
281281
BeforeWriteCallback = PopulatePreloadIndices,
282282
BeforeWriteCallbackCallerState = dsoState,
283283
};
284+
module.AddGlobalVariable ("dso_jni_preloads_idx_count", dso_jni_preloads_idx.ArrayItemCount);
284285
module.Add (dso_jni_preloads_idx);
285286

286287
var aot_dso_cache = new LlvmIrGlobalVariable (dsoState.AotDsoCache, "aot_dso_cache", LlvmIrVariableOptions.GlobalWritable) {

src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfigNativeAssemblyGeneratorCLR.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,12 @@ protected override void Construct (LlvmIrModule module)
396396

397397
// This variable MUST be written after `dso_cache` since it relies on sorting performed by HashAndSortDSOCache
398398
var dso_jni_preloads_idx = new LlvmIrGlobalVariable (new List<uint> (), "dso_jni_preloads_idx", LlvmIrVariableOptions.GlobalConstant) {
399-
Comment = "Indices of DSO libraries to preload because of JNI use",
399+
Comment = " Indices into dso_cache[] of DSO libraries to preload because of JNI use",
400400
ArrayItemCount = (uint)dsoState.JniPreloadDSOs.Count,
401401
BeforeWriteCallback = PopulatePreloadIndices,
402402
BeforeWriteCallbackCallerState = dsoState,
403403
};
404+
module.AddGlobalVariable ("dso_jni_preloads_idx_count", dso_jni_preloads_idx.ArrayItemCount);
404405
module.Add (dso_jni_preloads_idx);
405406

406407
var aot_dso_cache = new LlvmIrGlobalVariable (dsoState.AotDsoCache, "aot_dso_cache", LlvmIrVariableOptions.GlobalWritable) {

0 commit comments

Comments
 (0)