[llvm] Fix intrinsic Selector.GetHandle support. (#4103)
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Tue, 6 Dec 2016 23:50:31 +0000 (00:50 +0100)
committerZoltan Varga <vargaz@gmail.com>
Tue, 6 Dec 2016 23:50:31 +0000 (18:50 -0500)
commit196a882e0268724a09e169f78ff735400ff98635
tree63a98bcc02ad073bf3a176c8e8d2b25939278b69
parent3b3b69dae1a851289376e8430a100797cae6a083
[llvm] Fix intrinsic Selector.GetHandle support. (#4103)

An OBJC_IMAGE_INFO section must be emitted when we emit the native equivalent
of @selector for Selector.GetHandle, otherwise the Objective-C runtime will
not process the selectors in this image at runtime (and we may end up with
duplicate selectors in memory).

The AOT compiler already does this here: https://github.com/mono/mono/blob/2eda626316fd8f70cd98947af2f89b7ca9b0ebe5/mono/mini/aot-compiler.c#L9657-L9661
mono/mini/mini-llvm.c