PATCH: Check GLIBC_IFUNC to enable/disable ifunc features

H.J. Lu hjl.tools@gmail.com
Thu Jun 30 18:01:00 GMT 2016


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.



More information about the Libc-alpha mailing list