[arm][ios] Follow branch islands when determining method entry addresses. (#19126)
commit90430277a1dcd61f33cc83c3fba4fdf09844fef8
authorimhameed <imhameed@microsoft.com>
Mon, 9 Mar 2020 19:28:13 +0000 (9 12:28 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Mar 2020 19:28:13 +0000 (9 12:28 -0700)
treedab58034408c5a2474655031f6472c5045c0a3b9
parent90574987940959fe386008a850982ea18236a533
[arm][ios] Follow branch islands when determining method entry addresses. (#19126)

Fixes https://github.com/mono/mono/issues/18612; `aot_code_low_addr` and
`aot_code_high_addr` were set to a range that included only first-level
branch islands, so `find_aot_module` would fail early when passed a
genuine function address.

This change only affects monotouch for now.

Why not use relative offsets stored in a read-only section? One reason
is that llvm-as cannot handle a `.long` directive containing a
subtraction expression involving externally-defined symbols. The AOT
method address table and AOT LLVM-generated code are currently emitted
in separate object files, so the method address table would include
expressions with undefined symbols.

Related: https://xamarin.github.io/bugzilla-archives/70/707/bug.html
mono/mini/aot-runtime.c