[amd64] Make more inline functions in header static (#4869)
authorJonathan Pryor <jonpryor@vt.edu>
Mon, 15 May 2017 17:36:48 +0000 (13:36 -0400)
committerZoltan Varga <vargaz@gmail.com>
Mon, 15 May 2017 17:36:48 +0000 (13:36 -0400)
commit384c431d886f5d3e8fd4da9ec080f5ef6fff7f0f
tree35ab9043976b8028e5bd30694c9a4d1b01a5ff98
parente5552e6905fb7f3403e1d164e168eb2dc2a561f9
[amd64] Make more inline functions in header static (#4869)

Related: commit 00c6a94a

When [Xamarin.Android attempts to build with mono/2017-04][0], the
build breaks when cross-linking Windows code via MXE due to the
presence of an undefined `inline`d function:

./.libs/libmini.a(libmini_la-tramp-amd64.o):…/xamarin-android/external/mono/mono/mini/tramp-amd64.c:746:
undefined reference to `mono_arch_unwindinfo_get_size'

Turn `mono_arch_unwindinfo_find_pc_rt_func_in_table()` and
`mono_arch_unwindinfo_get_size()` into `static inline` functions so
that they don't cause "undefined reference" linker errors.

Additionally, audit the rest of `mono` to ensure there aren't any
other `inline` functions that aren't `static`:

$ git grep '\<inline\>' mono | grep -v static | grep -E '(\.c|\.h):'
# ~50 matches, all of which are in comments or otherwise not relevant.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/388/
mono/mini/exceptions-amd64.c
mono/mini/mini-amd64.h