Re: [Android] Enable ifuncs on Android

2014-11-24 Thread Jeff Law
On 11/24/14 02:49, Alexander Ivchenko wrote: *ping* thanks, Alexander Can you put a reference to the actual patch you want to ping (or just attach the patch you want to ping)? I'll review given the updated context/changes from HJ. jeff

Re: [Android] Enable ifuncs on Android

2014-11-24 Thread Alexander Ivchenko
*ping* thanks, Alexander 2014-11-14 19:49 GMT+03:00 H.J. Lu : > On Thu, Nov 13, 2014 at 8:59 PM, Jeff Law wrote: >> On 11/13/14 21:46, H.J. Lu wrote: >> >>> >>> Hi Jeff, >>> >>> I believe the patch is correct. Not all glibcs support IFUNC. It doesn't >>> mean >>> we should disable IFUNC for all

Re: [Android] Enable ifuncs on Android

2014-11-14 Thread H.J. Lu
On Thu, Nov 13, 2014 at 8:59 PM, Jeff Law wrote: > On 11/13/14 21:46, H.J. Lu wrote: > >> >> Hi Jeff, >> >> I believe the patch is correct. Not all glibcs support IFUNC. It doesn't >> mean >> we should disable IFUNC for all glibcs. By default, we do a configure >> time >> check for IFUNC. We DO

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread H.J. Lu
On Thu, Nov 13, 2014 at 8:59 PM, Jeff Law wrote: > On 11/13/14 21:46, H.J. Lu wrote: > >> >> Hi Jeff, >> >> I believe the patch is correct. Not all glibcs support IFUNC. It doesn't >> mean >> we should disable IFUNC for all glibcs. By default, we do a configure >> time >> check for IFUNC. We DO

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread Jeff Law
On 11/13/14 21:46, H.J. Lu wrote: Hi Jeff, I believe the patch is correct. Not all glibcs support IFUNC. It doesn't mean we should disable IFUNC for all glibcs. By default, we do a configure time check for IFUNC. We DO want to use configure time check for IFUNC for Android NDK. I I'm sorry,

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread H.J. Lu
On Thu, Nov 13, 2014 at 8:46 PM, H.J. Lu wrote: > On Thu, Nov 13, 2014 at 9:36 AM, Jeff Law wrote: >> On 11/12/14 03:02, Alexander Ivchenko wrote: >>> >>> Hi, >>> >>> Bionic - Android libc - supports indirect functions right now, but >>> they are disabled in gcc; >>> >>> We cannot do the configur

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread H.J. Lu
On Thu, Nov 13, 2014 at 9:36 AM, Jeff Law wrote: > On 11/12/14 03:02, Alexander Ivchenko wrote: >> >> Hi, >> >> Bionic - Android libc - supports indirect functions right now, but >> they are disabled in gcc; >> >> We cannot do the configure-time check for that, because there is only >> one version

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread Alexander Ivchenko
-bool -linux_has_ifunc_p (void) -{ - return OPTION_BIONIC ? false : HAVE_GNU_INDIRECT_FUNCTION; -} That is what prevent us from doing so. We need to remove OPTION_BIONIC from that hook and that is what the patch does. 2014-11-14 8:32 GMT+04:00 H.J. Lu : > On Thu, Nov 13, 2014 at 8:27 PM, Andrew

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread H.J. Lu
On Thu, Nov 13, 2014 at 8:27 PM, Andrew Hsieh wrote: > What about overloading the existing option -mbionic ? -mbionic=21 and > above enable ifunc (so NDK can help enforce it) > > On Fri, Nov 14, 2014 at 11:51 AM, enh wrote: >> On Thu, Nov 13, 2014 at 5:12 PM, Jeff Law wrote: >>> On 11/13/14 10:4

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread Andrew Hsieh
What about overloading the existing option -mbionic ? -mbionic=21 and above enable ifunc (so NDK can help enforce it) On Fri, Nov 14, 2014 at 11:51 AM, enh wrote: > On Thu, Nov 13, 2014 at 5:12 PM, Jeff Law wrote: >> On 11/13/14 10:46, enh wrote: >>> >>> This feels like a bad idea to me simp

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread enh
On Thu, Nov 13, 2014 at 5:12 PM, Jeff Law wrote: > On 11/13/14 10:46, enh wrote: >> >> This feels like a bad idea to me simply because a new compiler with an >> old runtime will generate code that fails, right? >> >> >> yes, but that's already true of PIE or gnu-style hash or... > > That d

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread Jeff Law
On 11/13/14 10:46, enh wrote: This feels like a bad idea to me simply because a new compiler with an old runtime will generate code that fails, right? yes, but that's already true of PIE or gnu-style hash or... That doesn't make it the right thing to do. I would argue that's a bug tha

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread enh
On Thu, Nov 13, 2014 at 9:36 AM, Jeff Law wrote: > On 11/12/14 03:02, Alexander Ivchenko wrote: >> >> Hi, >> >> Bionic - Android libc - supports indirect functions right now, but >> they are disabled in gcc; >> >> We cannot do the configure-time check for that, because there is only >> one version

Re: [Android] Enable ifuncs on Android

2014-11-13 Thread Jeff Law
On 11/12/14 03:02, Alexander Ivchenko wrote: Hi, Bionic - Android libc - supports indirect functions right now, but they are disabled in gcc; We cannot do the configure-time check for that, because there is only one version of each compiler shipped in ndk for all Android platforms. On the other

[Android] Enable ifuncs on Android

2014-11-12 Thread Alexander Ivchenko
Hi, Bionic - Android libc - supports indirect functions right now, but they are disabled in gcc; We cannot do the configure-time check for that, because there is only one version of each compiler shipped in ndk for all Android platforms. On the other hand, having different runtime targets like -m