This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Check GLIBC_IFUNC to enable/disable ifunc features
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 30 Jun 2016 05:01:28 -0700
- Subject: Re: PATCH: Check GLIBC_IFUNC to enable/disable ifunc features
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOq1+_rMbs1mt3=Md=Wx=7ZxUbD+BhOx-qrO5TBRBrRLww at mail dot gmail dot com> <20160630030947 dot GD3824 at devel dot intra dot reserved-bit dot com> <CAMe9rOrd+DEP1POnXaUaOrCaGqMmrftJbR_6ydFCXQeWueWmag at mail dot gmail dot com> <20160630034351 dot GE3824 at devel dot intra dot reserved-bit dot com> <CAMe9rOpNGtU=mVWEC5fvAABD_bkdM=8kx49KOc_yYkEXiPfx=w at mail dot gmail dot com> <20160630114416 dot GA7564 at devel dot intra dot reserved-bit dot com>
On Thu, Jun 30, 2016 at 4:44 AM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> On Thu, Jun 30, 2016 at 04:34:53AM -0700, H.J. Lu wrote:
>> Another concern is we only need to check one GLIBC_IFUNC and
>> done. With GLIBC_IFUNC_X86_XXX, it becomes open ended. I
>> really want to avoid it.
>
> I don't understand, could you please elaborate?
My scheme is
do
{
if (*env == GLIBC_IFUNC=.*)
{
process
break
}
env++
}
We only need to check GLIBC_IFUNC only if it hasn't been found. With
GLIBC_IFUNC_X86_XXX, we have to do
do
{
if (*env == GLIBC_IFUNC_X86_*)
process
env++
}
We need to check GLIBC_IFUNC_X86 in each iteration.
--
H.J.