[PATCH 3/4] S390: Do not call memcpy, memcmp, memset within libc.so via ifunc-plt.
Stefan Liebler
stli@linux.vnet.ibm.com
Wed Apr 27 08:20:00 GMT 2016
On 04/26/2016 03:35 PM, Adhemerval Zanella wrote:
>
>
> On 26/04/2016 09:07, Stefan Liebler wrote:
>> On s390, the memcpy, memcmp, memset functions are IFUNC symbols,
>> which are created with s390_libc_ifunc-macro.
>> This macro creates a __GI_ symbol which is set to the
>> ifunced symbol. Thus calls within libc.so to e.g. memcpy
>> result in a call to *ABS*+0x954c0@plt stub and afterwards
>> to the resolved memcpy-ifunc-variant.
>>
>> This patch sets the __GI_ symbol to the default-ifunc-variant
>> to avoid the plt call. The __GI_ symbols are now created at the
>> default variant of ifunced function.
>
> Is the internal ifunc plt usage leading to a failure in s390/s390x
> (as for powerpc32 and i686) or is it an optimization fix?
No it does not lead to a failure on s390.
It is an optimization to avoid the extra call to the plt-stub if called
within libc.so.
More information about the Libc-alpha
mailing list