diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-29 14:12:01 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-29 14:15:47 -0700 |
commit | 7d6fbf5876d66e319ed4d1e0881528b70d84c44e (patch) | |
tree | da0d66635b534703e197f66591637c5c1a2339f8 | |
parent | f301e5334065e93aace667fd4a87bce6fc1dbd13 (diff) | |
download | glibc-hjl/pr22363/master.tar.gz glibc-hjl/pr22363/master.tar.xz glibc-hjl/pr22363/master.zip |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 87aaa8683c..0ca29365ef 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; |