Skip to content

Commit fd4f50a

Browse files
committed
Use patched mono runtime library for android aarch64
1 parent e07e02b commit fd4f50a

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

.github/workflows/windbot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
shell: bash
100100
run: |
101101
msbuild.exe -t:restore WindBot.sln
102+
./ci/install-patched-mono-runtime.sh
102103
msbuild.exe -m -p:Configuration=Release WindBot.sln
103104
- name: Predeploy
104105
shell: bash

ci/README-libmonsogen.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The libmonosgen-2.0-assert-patch.so is a binary patch of the arm64-v8a library shipped with embeddinator 4000.
2+
The patch, manually backports the mono change from this commit
3+
https://github.com/mono/mono/commit/06673e723ec3d59b071a1b763680f252b71c5de4, which fixes crashes when targeting
4+
android 14 https://github.com/dotnet/runtime/issues/73197.
5+
6+
The binary patch changes the instruction
7+
```
8+
001f52e0 4a 04 00 54 b.ge LAB_001f5368
9+
```
10+
to
11+
```
12+
001f52e0 4c 04 00 54 b.gt LAB_001f5368
13+
```
14+
which corresponds to the assert changed in the above commit.
15+
In the shared object itself, this instruction is located at offset `f52e0` of the file.

ci/install-patched-mono-runtime.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail
4+
5+
rm "C:\\Users\\runneradmin\\.nuget\\packages\\embeddinator-4000\\0.4.0\\external\\Xamarin.Android\\lib\\xbuild\\Xamarin\\Android\\lib\\arm64-v8a\\libmonosgen-2.0.so"
6+
7+
cp libmonosgen-2.0-assert-patch.so "C:\\Users\\runneradmin\\.nuget\\packages\\embeddinator-4000\\0.4.0\\external\\Xamarin.Android\\lib\\xbuild\\Xamarin\\Android\\lib\\arm64-v8a\\libmonosgen-2.0.so"

ci/libmonosgen-2.0-assert-patch.so

2.96 MB
Binary file not shown.

0 commit comments

Comments
 (0)