[PATCH] Multiarch optimization for strspn on POWERPC

Adhemerval Zanella azanella@linux.vnet.ibm.com
Mon Mar 31 11:36:00 GMT 2014


On 29-03-2014 14:01, Andreas Schwab wrote:
> Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
>
>> I also commit the obvious fix that I didn't see previously:
>>
>> diff --git a/sysdeps/powerpc/powerpc64/multiarch/strspn.c b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> index 44945f3..bf8c877 100644
>> --- a/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> +++ b/sysdeps/powerpc/powerpc64/multiarch/strspn.c
>> @@ -16,7 +16,7 @@
>>     License along with the GNU C Library; if not, see
>>     <http://www.gnu.org/licenses/>.  */
>>  
>> -#if defined SHARED && !defined NOT_IN_libc
>> +#ifndef NOT_IN_libc
>>  # include <string.h>
>>  # include <shlib-compat.h>
>>  # include "init-arch.h"
> The static libc generally should only contain the generic version.

That's true only for some symbols that does no play well for static (for instance, memcpy).
strspn can be safely used as ifunc for static build and x86_64 does it as well, and for
other symbols as well.


>
> Andreas.
>



More information about the Libc-alpha mailing list