[aot] change method table generation so that it works for larger assemblies on ARM...
commit9ff3b0d65ee401616ac08fe43530d7a27bbe5902
authorBernhard Urban <bernhard.urban@xamarin.com>
Mon, 15 Apr 2019 22:25:51 +0000 (16 00:25 +0200)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 15 Apr 2019 22:25:51 +0000 (15 18:25 -0400)
treeace3479df30d9feb7c79054949b80d5e33ad6fe7
parentb1af4c2726cdc211971efacee7d66a6e447336d2
[aot] change method table generation so that it works for larger assemblies on ARM (#14043)

[aot] change method table generation so that it works for larger assemblies on ARM

At the end of the AOT compilation, we dump a table containing all method
entrypoints using the toolchain linker to resolve the addresses. Previously
we used `bl` for that, however on larger assemblies the offset might
overflow the 24bit immediate (thus, the linker bailing out with
"Error: branch out of range"). Instead, using `ldr pc,=<label>` followed
by `.ltorg` emits the full 32bit address to a method. That takes 8 bytes
for each method instead of 4 bytes.

( I couldn't reopen https://github.com/mono/mono/pull/3486 anymore)
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c