public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH v2 01/14] Add OTHER_SHLIB_COMPAT
Date: Fri, 19 Mar 2021 17:29:01 -0300	[thread overview]
Message-ID: <20210319202914.2475530-2-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20210319202914.2475530-1-adhemerval.zanella@linaro.org>

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.
---
 include/shlib-compat.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/shlib-compat.h b/include/shlib-compat.h
index f4978c05af..750d72b732 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 can check versions in other libraries.  It is
+   not always false outside 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
@@ -88,6 +96,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) \
-- 
2.25.1


  reply	other threads:[~2021-03-19 20:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19 20:29 [PATCH v2 00/14] libpthread removal: pthread-compat-wrappers and other libc symbols Adhemerval Zanella
2021-03-19 20:29 ` Adhemerval Zanella [this message]
2021-03-19 20:36   ` [PATCH v2 01/14] Add OTHER_SHLIB_COMPAT Florian Weimer
2021-03-19 20:29 ` [PATCH v2 02/14] nptl: Remove send from libpthread Adhemerval Zanella
2021-03-25 13:36   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 03/14] nptl: Remove lseek " Adhemerval Zanella
2021-03-25 13:37   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 04/14] nptl: Remove open " Adhemerval Zanella
2021-03-25 13:46   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 05/14] nptl: Remove pread " Adhemerval Zanella
2021-03-25 14:07   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 06/14] nptl: Remove pwrite " Adhemerval Zanella
2021-03-25 14:11   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 07/14] nptl: Remove msgsnd from pthread-compat-wrappers Adhemerval Zanella
2021-03-25 14:33   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 08/14] nptl: Remove msgrcv " Adhemerval Zanella
2021-03-25 14:33   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 09/14] nptl: Remove sigsuspend " Adhemerval Zanella
2021-03-25 14:34   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 10/14] nptl: Move pthread_kill to libc Adhemerval Zanella
2021-03-25 14:45   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 11/14] nptl: Remove pthread raise implementation Adhemerval Zanella
2021-03-25 14:49   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 12/14] nptl: Move sigaction to libc Adhemerval Zanella
2021-03-25 15:00   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 13/14] nptl: Remove __libc_allocate_rtsig, __libc_current_sigrtmax, and __libc_current_sigrtmin Adhemerval Zanella
2021-03-25 15:31   ` Florian Weimer
2021-03-19 20:29 ` [PATCH v2 14/14] nptl: Remove unused rules Adhemerval Zanella
2021-03-25 15:33   ` Florian Weimer
2021-03-25 17:59 ` [PATCH v2 00/14] libpthread removal: pthread-compat-wrappers and other libc symbols Florian Weimer
2021-03-25 18:13   ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210319202914.2475530-2-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).