From patchwork Tue Mar 2 19:02:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 42202 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 1D33B395042B; Tue, 2 Mar 2021 19:02:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D33B395042B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614711732; bh=tcq/KhiHbNH3gdCEsvKjSFKSOs6WJIhWUKKcxIApfss=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=J76Jd9cptwFlcA3SxzuBUEBzt2sGMrq8erDym5kpERWwAUXfr8p0pdoE/G6KRYTge fHu8Vk2xwgpxTmjrCCn1jMndvGPMu7qunkf5U7zLDNaeF8QUceE+HTNpxeGEKTqCBF UtQrNDopB4hLmomd5eNwu3X66qrkkh5BVRlAbD2I= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 5B6C7395042B for ; Tue, 2 Mar 2021 19:02:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5B6C7395042B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-103-NXDeqX9NMHqvCa_lvfauuw-1; Tue, 02 Mar 2021 14:02:07 -0500 X-MC-Unique: NXDeqX9NMHqvCa_lvfauuw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BA9D835E20 for ; Tue, 2 Mar 2021 19:02:06 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-51.ams2.redhat.com [10.36.112.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE48F779CF for ; Tue, 2 Mar 2021 19:02:05 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH] : Support compat_symbol_reference for _ISOMAC Date: Tue, 02 Mar 2021 20:02:09 +0100 Message-ID: <87blc1xtu6.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This is helpful for testing compat symbols in cases where _ISOMAC is activated implicitly due to -DMODULE_NAME=testsuite and cannot be disabled easily. --- include/libc-symbols.h | 8 ++++---- include/shlib-compat.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libc-symbols.h b/include/libc-symbols.h index ea126ae70c..f5b7763f6c 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -396,22 +396,22 @@ for linking") past the last element in SET. */ #define symbol_set_end_p(set, ptr) ((ptr) >= (void *const *) &__stop_##set) -/* Use symbol_version_reference to specify the version a symbol +/* Use __symbol_version_reference to specify the version a symbol reference should link to. Use symbol_version or default_symbol_version for the definition of a versioned symbol. The difference is that the latter is a no-op in non-shared builds. */ #ifdef __ASSEMBLER__ -# define symbol_version_reference(real, name, version) \ +# define __symbol_version_reference(real, name, version) \ .symver real, name##@##version #else /* !__ASSEMBLER__ */ -# define symbol_version_reference(real, name, version) \ +# define __symbol_version_reference(real, name, version) \ __asm__ (".symver " #real "," #name "@" #version) #endif #ifdef SHARED # define symbol_version(real, name, version) \ - symbol_version_reference(real, name, version) + __symbol_version_reference(real, name, version) # define default_symbol_version(real, name, version) \ _default_symbol_version(real, name, version) # ifdef __ASSEMBLER__ diff --git a/include/shlib-compat.h b/include/shlib-compat.h index 28baef1ea4..e8adef71bf 100644 --- a/include/shlib-compat.h +++ b/include/shlib-compat.h @@ -130,7 +130,7 @@ #define compat_symbol_reference_1(lib, local, symbol, version) \ compat_symbol_reference_2 (local, symbol, VERSION_##lib##_##version) #define compat_symbol_reference_2(local, symbol, name) \ - symbol_version_reference (local, symbol, name) + __symbol_version_reference (local, symbol, name) /* Export the symbol only for shared-library compatibility. */ #define libc_sunrpc_symbol(name, aliasname, version) \