diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-08-24 15:35:44 -0700 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-08-27 08:17:13 -0700 |
commit | 9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a (patch) | |
tree | b4803297801d264be197fa249aacf52eaab948b8 | |
parent | cd41ffeb0bbca641a02e1030e13ab317ce7d645c (diff) | |
download | glibc-9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a.tar glibc-9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a.tar.gz glibc-9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a.tar.bz2 glibc-9bd8e3f99d00fc578b8db0a9d61e59e84bbb6b0a.zip |
elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests
The _sys_errlist and _sys_siglist symbols are deprecated since 2.32.
This patch adds a TEST_COMPAT check around the tests. This fixes test
failures on new architectures (such as RV32) that don't have this
symbol defined.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | elf/tst-libc_dlvsym.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h index 6b132dd7c3..99ef8a3ea3 100644 --- a/elf/tst-libc_dlvsym.h +++ b/elf/tst-libc_dlvsym.h @@ -117,8 +117,13 @@ compare_vsyms (void) obtain an explicit handle for libc.so. */ void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD); + + /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and they are + not available on architectures with base ABI newer than 2.32. */ +#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) compare_vsyms_1 (libc_handle, "_sys_errlist"); compare_vsyms_1 (libc_handle, "_sys_siglist"); +#endif compare_vsyms_1 (libc_handle, "quick_exit"); xdlclose (libc_handle); |