diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-05-24 10:39:13 +0200 |
---|---|---|
committer | Stefan Liebler <stli@linux.vnet.ibm.com> | 2016-05-24 10:39:13 +0200 |
commit | 71655832555411915d157b17253c8ffe0848533a (patch) | |
tree | d1adce32bdf4c1a431d1e40ea5d92cd0eece8335 /sysdeps/s390/s390-32 | |
parent | 074b0f27d9b9cdfb58c5c7e7f4129546084582b2 (diff) | |
download | glibc-71655832555411915d157b17253c8ffe0848533a.tar glibc-71655832555411915d157b17253c8ffe0848533a.tar.gz glibc-71655832555411915d157b17253c8ffe0848533a.tar.bz2 glibc-71655832555411915d157b17253c8ffe0848533a.zip |
S390: Do not call memcpy, memcmp, memset within libc.so via ifunc-plt.
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.
ChangeLog:
* sysdeps/s390/multiarch/ifunc-resolve.h (s390_libc_ifunc):
Remove __GI_ symbol.
* sysdeps/s390/s390-32/multiarch/memcmp-s390.S: Add __GI_memcmp symbol.
* sysdeps/s390/s390-64/multiarch/memcmp-s390x.S: Likewise.
* sysdeps/s390/s390-32/multiarch/memcpy-s390.S: Add __GI_memcpy symbol.
* sysdeps/s390/s390-64/multiarch/memcpy-s390x.S: Likewise.
* sysdeps/s390/s390-32/multiarch/memset-s390.S: Add __GI_memset symbol.
* sysdeps/s390/s390-64/multiarch/memset-s390x.S: Likewise.
Diffstat (limited to 'sysdeps/s390/s390-32')
-rw-r--r-- | sysdeps/s390/s390-32/multiarch/memcmp-s390.S | 3 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/multiarch/memcpy-s390.S | 5 | ||||
-rw-r--r-- | sysdeps/s390/s390-32/multiarch/memset-s390.S | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp-s390.S b/sysdeps/s390/s390-32/multiarch/memcmp-s390.S index e9ee6d2270..a01f3b748d 100644 --- a/sysdeps/s390/s390-32/multiarch/memcmp-s390.S +++ b/sysdeps/s390/s390-32/multiarch/memcmp-s390.S @@ -101,4 +101,7 @@ END(__memcmp_z10) .set memcmp,__memcmp_default .weak bcmp .set bcmp,__memcmp_default +#elif defined SHARED && IS_IN (libc) +.globl __GI_memcmp +.set __GI_memcmp,__memcmp_default #endif diff --git a/sysdeps/s390/s390-32/multiarch/memcpy-s390.S b/sysdeps/s390/s390-32/multiarch/memcpy-s390.S index 4e30cdf6c6..92ffaea5ed 100644 --- a/sysdeps/s390/s390-32/multiarch/memcpy-s390.S +++ b/sysdeps/s390/s390-32/multiarch/memcpy-s390.S @@ -92,7 +92,10 @@ END(__memcpy_z10) #include "../memcpy.S" -#if !defined SHARED || !IS_IN (libc) +#if defined SHARED && IS_IN (libc) +.globl __GI_memcpy +.set __GI_memcpy,__memcpy_default +#else .globl memcpy .set memcpy,__memcpy_default #endif diff --git a/sysdeps/s390/s390-32/multiarch/memset-s390.S b/sysdeps/s390/s390-32/multiarch/memset-s390.S index 47277c13a6..a2ddd98afe 100644 --- a/sysdeps/s390/s390-32/multiarch/memset-s390.S +++ b/sysdeps/s390/s390-32/multiarch/memset-s390.S @@ -110,4 +110,7 @@ END(__memset_mvcle) #if !IS_IN (libc) .globl memset .set memset,__memset_default +#elif defined SHARED && IS_IN (libc) +.globl __GI_memset +.set __GI_memset,__memset_default #endif |