aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-29 14:12:01 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-29 14:15:47 -0700
commit7d6fbf5876d66e319ed4d1e0881528b70d84c44e (patch)
treeda0d66635b534703e197f66591637c5c1a2339f8
parentf301e5334065e93aace667fd4a87bce6fc1dbd13 (diff)
downloadglibc-hjl/pr22363/master.zip
glibc-hjl/pr22363/master.tar.gz
glibc-hjl/pr22363/master.tar.bz2
x32: Set GLRO(dl_platform) to "x86_64" by default [BZ #22363]hjl/pr22363/master
Set dl_platform to "x86_64" for x32 by default since kernel may set it to "i686". This fixed: FAIL: elf/tst-platform-1 on x32. Tested on x86-64 and x32. [BZ #22363] * sysdeps/x86/cpu-features.c (init_cpu_features): Set GLRO(dl_platform) to "x86_64" by default for x32.
-rw-r--r--sysdeps/x86/cpu-features.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 87aaa86..0ca2936 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -430,6 +430,11 @@ no_cpuid:
if (platform != NULL)
GLRO(dl_platform) = platform;
+# ifdef __ILP32__
+ /* Set dl_platform to "x86_64" since kernel may set it to "i686". */
+ else
+ GLRO(dl_platform) = "x86_64";
+# endif
}
#else
GLRO(dl_hwcap) = 0;