glibc/sysdeps
H.J. Lu 45ff34638f x86: Add x86_64 to x86-64 HWCAP [BZ #22093]
Before glibc 2.26, ld.so set dl_platform to "x86_64" and searched the
"x86_64" subdirectory when loading a shared library.  ld.so in glibc
2.26 was changed to set dl_platform to "haswell" or "xeon_phi", based
on supported ISAs.  This led to shared library loading failure for
shared libraries placed under the "x86_64" subdirectory.

This patch adds "x86_64" to x86-64 dl_hwcap so that ld.so will always
search the "x86_64" subdirectory when loading a shared library.

NB: We can't set x86-64 dl_platform to "x86-64" since ld.so will skip
the "haswell" and "xeon_phi" subdirectories on "haswell" and "xeon_phi"
machines.

Tested on i686 and x86-64.

	[BZ #22093]
	* sysdeps/x86/cpu-features.c (init_cpu_features): Initialize
	GLRO(dl_hwcap) to HWCAP_X86_64 for x86-64.
	* sysdeps/x86/dl-hwcap.h (HWCAP_COUNT): Updated.
	(HWCAP_IMPORTANT): Likewise.
	(HWCAP_X86_64): New enum.
	(HWCAP_X86_AVX512_1): Updated.
	* sysdeps/x86/dl-procinfo.c (_dl_x86_hwcap_flags): Add "x86_64".
	* sysdeps/x86_64/Makefile (tests): Add tst-x86_64-1.
	(modules-names): Add x86_64/tst-x86_64mod-1.
	(LDFLAGS-tst-x86_64mod-1.so): New.
	($(objpfx)tst-x86_64-1): Likewise.
	($(objpfx)x86_64/tst-x86_64mod-1.os): Likewise.
	(tst-x86_64-1-clean): Likewise.
	* sysdeps/x86_64/tst-x86_64-1.c: New file.
	* sysdeps/x86_64/tst-x86_64mod-1.c: Likewise.
2017-09-11 08:18:32 -07:00
..
aarch64 Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
alpha Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
arm Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
generic Prefer new libm function wrappers for !LIBM_SVID_COMPAT. 2017-09-05 23:35:55 +00:00
gnu posix: Sync glob with gnulib [BZ #1062] 2017-09-08 09:39:13 +02:00
hppa Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
i386 Remove remaining _HAVE_STRING_ARCH_* definitions (BZ #18858) 2017-09-06 14:35:23 -03:00
ia64 Prefer new libm function wrappers for !LIBM_SVID_COMPAT. 2017-09-05 23:35:55 +00:00
ieee754 Prefer new libm function wrappers for !LIBM_SVID_COMPAT. 2017-09-05 23:35:55 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k Simplify HUGE_VAL definitions. 2017-08-31 15:50:50 +00:00
mach Hide __chmod and __mkdir [BZ #18822] 2017-09-04 13:38:51 -07:00
microblaze Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
mips Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
nios2 Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
nptl Remove extra semicolons in struct pthread_mutex (bug 21804) 2017-07-24 12:22:05 +02:00
posix hurd: Fix libc link 2017-09-03 04:36:29 +02:00
powerpc Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
pthread aio: Remove internal_function function attribute 2017-08-31 15:59:06 +02:00
s390 Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
sh Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
sparc Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
tile Obsolete pow10 functions. 2017-09-01 21:13:18 +00:00
unix Add thunderx2t99 and thunderx2t99p1 CPU names to tunables list 2017-09-08 11:02:09 -07:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 posix: Consolidate Linux glob implementation 2017-09-08 16:34:02 +02:00
x86 x86: Add x86_64 to x86-64 HWCAP [BZ #22093] 2017-09-11 08:18:32 -07:00
x86_64 x86: Add x86_64 to x86-64 HWCAP [BZ #22093] 2017-09-11 08:18:32 -07:00