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: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: nd <nd at arm dot com>, "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <sid at reserved-bit dot com>
- Date: Thu, 30 Jun 2016 11:00:56 -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> <20160630013716 dot GY4685 at vapier dot lan> <CAMe9rOrgshV6t5quE01r_oc91ps0JJ7fYfAC=MuQOs96qNv1uQ at mail dot gmail dot com> <57752F1B dot 7010809 at arm dot com> <CAMe9rOoy2q3+NV26RjCe0KNCUEc5U1OcBb5_PUKBLLPf-eQk4A at mail dot gmail dot com> <CAMe9rOrxQYG7T0QgNwJ2unonB_JdQ5Unp8vu94h9LfoZe2aWEw at mail dot gmail dot com> <577555AB dot 7050306 at arm dot com>
On Thu, Jun 30, 2016 at 10:23 AM, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
> On 30/06/16 17:21, H.J. Lu wrote:
>> + /* Can't use strlen because it may trigger an ifunc resolve
>> + loop. */
>> + for (; *end != '\0'; end++);
>
> the compiler can optimize this into a strlen call.
>
> but e.g. -ffreestanding can solve that
> (i wonder why glibc does not use that already
> at least for early startup code).
>
You are right. We should use -ffreestanding in those places.
--
H.J.