mirror of git://sourceware.org/git/glibc.git
Use PIC only if SHARED is defined.
For ia32, we can avoid PIC in IFUNC functions in static library.
This commit is contained in:
parent
a3d4298d83
commit
fc1870e6a4
|
|
@ -1,3 +1,9 @@
|
||||||
|
2009-08-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* sysdeps/i386/i686/multiarch/strcspn.S (STRCSPN): Use PIC
|
||||||
|
only if SHARED is defined.
|
||||||
|
* sysdeps/i386/i686/multiarch/strspn.S (strspn): Likewise.
|
||||||
|
|
||||||
2009-08-03 Jim Meyering <meyering@redhat.com>
|
2009-08-03 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
* sysdeps/i386/configure.in: Use AC_HEADER_CHECK.
|
* sysdeps/i386/configure.in: Use AC_HEADER_CHECK.
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
define multiple versions for strpbrk in static library since we
|
define multiple versions for strpbrk in static library since we
|
||||||
need strpbrk before the initialization happened. */
|
need strpbrk before the initialization happened. */
|
||||||
#if (defined SHARED || !defined USE_AS_STRPBRK) && !defined NOT_IN_libc
|
#if (defined SHARED || !defined USE_AS_STRPBRK) && !defined NOT_IN_libc
|
||||||
|
# ifdef SHARED
|
||||||
.section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
|
.section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
|
||||||
.globl __i686.get_pc_thunk.bx
|
.globl __i686.get_pc_thunk.bx
|
||||||
.hidden __i686.get_pc_thunk.bx
|
.hidden __i686.get_pc_thunk.bx
|
||||||
|
|
@ -71,6 +72,20 @@ ENTRY(STRCSPN)
|
||||||
cfi_restore (ebx)
|
cfi_restore (ebx)
|
||||||
ret
|
ret
|
||||||
END(STRCSPN)
|
END(STRCSPN)
|
||||||
|
# else
|
||||||
|
.text
|
||||||
|
ENTRY(STRCSPN)
|
||||||
|
.type STRCSPN, @gnu_indirect_function
|
||||||
|
cmpl $0, KIND_OFFSET+__cpu_features
|
||||||
|
jne 1f
|
||||||
|
call __init_cpu_features
|
||||||
|
1: leal STRCSPN_IA32, %eax
|
||||||
|
testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
|
||||||
|
jz 2f
|
||||||
|
leal STRCSPN_SSE42, %eax
|
||||||
|
2: ret
|
||||||
|
END(STRCSPN)
|
||||||
|
# endif
|
||||||
|
|
||||||
# undef ENTRY
|
# undef ENTRY
|
||||||
# define ENTRY(name) \
|
# define ENTRY(name) \
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
/* Define multiple versions only for the definition in libc. */
|
/* Define multiple versions only for the definition in libc. */
|
||||||
#ifndef NOT_IN_libc
|
#ifndef NOT_IN_libc
|
||||||
|
# ifdef SHARED
|
||||||
.section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
|
.section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
|
||||||
.globl __i686.get_pc_thunk.bx
|
.globl __i686.get_pc_thunk.bx
|
||||||
.hidden __i686.get_pc_thunk.bx
|
.hidden __i686.get_pc_thunk.bx
|
||||||
|
|
@ -56,6 +57,20 @@ ENTRY(strspn)
|
||||||
cfi_restore (ebx)
|
cfi_restore (ebx)
|
||||||
ret
|
ret
|
||||||
END(strspn)
|
END(strspn)
|
||||||
|
# else
|
||||||
|
.text
|
||||||
|
ENTRY(strspn)
|
||||||
|
.type strspn, @gnu_indirect_function
|
||||||
|
cmpl $0, KIND_OFFSET+__cpu_features
|
||||||
|
jne 1f
|
||||||
|
call __init_cpu_features
|
||||||
|
1: leal __strspn_ia32, %eax
|
||||||
|
testl $(1<<20), CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET+__cpu_features
|
||||||
|
jz 2f
|
||||||
|
leal __strspn_sse42, %eax
|
||||||
|
2: ret
|
||||||
|
END(strspn)
|
||||||
|
# endif
|
||||||
|
|
||||||
# undef ENTRY
|
# undef ENTRY
|
||||||
# define ENTRY(name) \
|
# define ENTRY(name) \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue