aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-19 17:21:05 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-26 13:36:16 -0300
commit4d2e9ef806bd9edc9cf5e133983a4e86ddab381a (patch)
tree05707dc6005bfca41fafdc1aa3d6b6648bc65131 /include
parentmisc: Fix tst-select timeout handling (BZ#27648) (diff)
downloadglibc-4d2e9ef806bd9edc9cf5e133983a4e86ddab381a.tar.gz
glibc-4d2e9ef806bd9edc9cf5e133983a4e86ddab381a.tar.bz2
glibc-4d2e9ef806bd9edc9cf5e133983a4e86ddab381a.zip
Add OTHER_SHLIB_COMPAT
It is similar to SHLIB_COMPAT, but allows to check versions from other libraries. It is used to move compat symbol from other libraries to libc.
Diffstat (limited to 'include')
-rw-r--r--include/shlib-compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index 537851d753..6c423c8cb0 100644
--- a/include/shlib-compat.h
+++ b/include/shlib-compat.h
@@ -53,6 +53,14 @@
# define SHLIB_COMPAT(lib, introduced, obsoleted) \
_LIB_COMPAT (lib, introduced, obsoleted)
+/* Like SHLIB_COMPAT, but it can check versions in other libraries. It is
+ not always false for !IS_IN (LIB). */
+#define OTHER_SHLIB_COMPAT(lib, introduced, obsoleted) \
+ _OTHER_SHLIB_COMPAT (lib, introduced, obsoleted)
+#define _OTHER_SHLIB_COMPAT(lib, introduced, obsoleted) \
+ (!(ABI_##lib##_##obsoleted - 0) \
+ || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0)))
+
/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
the version set name to use for e.g. symbols first introduced into
libm in the GLIBC_2.1 version. Definitions of symbols with explicit
@@ -106,6 +114,7 @@
/* Not compiling ELF shared libraries at all, so never any old versions. */
# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
+# define OTHER_SHLIB_COMPAT(lib, introduced, obsoleted) 0
/* No versions to worry about, just make this the global definition. */
# define versioned_symbol(lib, local, symbol, version) \