[arm][ios] Follow branch islands when determining method entry addresses. (#33182)
authormonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 9 Mar 2020 19:31:17 +0000 (15:31 -0400)
committerGitHub <noreply@github.com>
Mon, 9 Mar 2020 19:31:17 +0000 (12:31 -0700)
commita0545c22102245c57b2063c4030b6e8960fdc21a
tree4f4b30dd0086970144242c727c23cf88d39ec2b1
parent559f0fb15ec8985b10b2d687171c0344a77e8df0
[arm][ios] Follow branch islands when determining method entry addresses. (#33182)

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

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
src/mono/mono/mini/aot-runtime.c