mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
Call init_cpu_features only if SHARED is defined
In static executable, since init_cpu_features is called early from __libc_start_main, there is no need to call it again in dl_platform_init. [BZ #20072] * sysdeps/i386/dl-machine.h (dl_platform_init): Call init_cpu_features only if SHARED is defined. * sysdeps/x86_64/dl-machine.h (dl_platform_init): Likewise.
This commit is contained in:
parent
9e4ec3e816
commit
4facca0b0e
@ -1,3 +1,10 @@
|
||||
2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #20072]
|
||||
* sysdeps/i386/dl-machine.h (dl_platform_init): Call
|
||||
init_cpu_features only if SHARED is defined.
|
||||
* sysdeps/x86_64/dl-machine.h (dl_platform_init): Likewise.
|
||||
|
||||
2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* sysdeps/x86/cacheinfo.c (init_cacheinfo): Check and support
|
||||
|
@ -237,7 +237,11 @@ dl_platform_init (void)
|
||||
/* Avoid an empty string which would disturb us. */
|
||||
GLRO(dl_platform) = NULL;
|
||||
|
||||
#ifdef SHARED
|
||||
/* init_cpu_features has been called early from __libc_start_main in
|
||||
static executable. */
|
||||
init_cpu_features (&GLRO(dl_x86_cpu_features));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline Elf32_Addr
|
||||
|
@ -224,7 +224,11 @@ dl_platform_init (void)
|
||||
/* Avoid an empty string which would disturb us. */
|
||||
GLRO(dl_platform) = NULL;
|
||||
|
||||
#ifdef SHARED
|
||||
/* init_cpu_features has been called early from __libc_start_main in
|
||||
static executable. */
|
||||
init_cpu_features (&GLRO(dl_x86_cpu_features));
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline ElfW(Addr)
|
||||
|
Loading…
Reference in New Issue
Block a user