From patchwork Fri Mar 19 20:29:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 42712 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9988A386F450; Fri, 19 Mar 2021 20:29:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9988A386F450 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1616185762; bh=Suxkf7AFKeMtRDhH1VzXGvyrrDVZArXdOf7gKl05H3o=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gy4tVRxsVEQYXM3Do6nevVL/xGhyr+TrGHtRnsiaryRSOgv0fsylBoefJMe1h7I5a I5nyRIDrw7wfZsAAUSIwy48W3jIokZyc6DGHbLhz6Hc7x98eQ+so1cIfp7gaucDQYd OMy0iES2raL786Y3jdq5jCT/OcAG07w0SJDEOE2Q= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by sourceware.org (Postfix) with ESMTPS id 4970C385782A for ; Fri, 19 Mar 2021 20:29:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4970C385782A Received: by mail-qv1-xf33.google.com with SMTP id x27so5702176qvd.2 for ; Fri, 19 Mar 2021 13:29:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Suxkf7AFKeMtRDhH1VzXGvyrrDVZArXdOf7gKl05H3o=; b=KtQ7gFg3UEzL5Qdda2VR+gRGIq6tUxiNcGGow4/rgi+G9pMK1x1HwO/9GAyQqcJg1G O41o8qoKYKjZI9URkIhzbG1JYG7zoM6KPa+zBJFWJabMViO4z0fTk0RRktqIjm+8sDZ6 uIkRQ2mS0n61tgl30ScZAAza8kzPN6OTDyZCcalCTZ73SDvNJuVBoiMaaxhafMVO6FP0 TJ58RrNs8vBdUROsmJ92CQ+Jj9LETC5vsdM2PFauBtCS8VnUwSthc7sqXV0xYBlmQJJx OIimBTI4Nf0vtacFih4nHTM+Ann8hPLZdMtylNmwk2M6MpjTq5HSNN49MIahGypMmDZV VCfw== X-Gm-Message-State: AOAM531gPzBERkqJa1+EYNkY3Jif/rHhYjy70vXaSVVZwYWscdBba33z mAwwAm3zmUVyoHjadjT1JPiBvrMHcHDn8XeF X-Google-Smtp-Source: ABdhPJxewQAbRHALRpdiWBCC6RN/kaJHcLchm3kE5/OADjkGmHRSKwW9ho5tBcu18SbCxszxIBqPkg== X-Received: by 2002:a05:6214:18c3:: with SMTP id cy3mr10980283qvb.1.1616185759789; Fri, 19 Mar 2021 13:29:19 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id i25sm5259747qka.38.2021.03.19.13.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 13:29:19 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v2 01/14] Add OTHER_SHLIB_COMPAT Date: Fri, 19 Mar 2021 17:29:01 -0300 Message-Id: <20210319202914.2475530-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210319202914.2475530-1-adhemerval.zanella@linaro.org> References: <20210319202914.2475530-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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) \