From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D84F31F8C6 for ; Mon, 2 Aug 2021 04:03:22 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B55A13838013 for ; Mon, 2 Aug 2021 04:03:21 +0000 (GMT) Received: from bumble.maple.relay.mailchannels.net (bumble.maple.relay.mailchannels.net [23.83.214.25]) by sourceware.org (Postfix) with ESMTPS id 4DBA5384F007 for ; Mon, 2 Aug 2021 04:03:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DBA5384F007 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 08DD26811ED; Mon, 2 Aug 2021 04:03:04 +0000 (UTC) Received: from pdx1-sub0-mail-a4.g.dreamhost.com (100-96-16-167.trex.outbound.svc.cluster.local [100.96.16.167]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8B2F3681327; Mon, 2 Aug 2021 04:03:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a4.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.167 (trex/6.3.3); Mon, 02 Aug 2021 04:03:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Reaction-Tank: 7e64774f6bc3aded_1627876983792_2515080264 X-MC-Loop-Signature: 1627876983792:2786569343 X-MC-Ingress-Time: 1627876983791 Received: from pdx1-sub0-mail-a4.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a4.g.dreamhost.com (Postfix) with ESMTP id 4AB0A8A057; Sun, 1 Aug 2021 21:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=vufsJl eahSLBo5gMRKZi/B2AhFM=; b=Jq37bDLFPh5HaEbrYjpXIRyMF+4h9hGt+D3kMy WUsAX7NhGplM2C8sw/Zo5ruIrHOX03NQIG+pSQh7iKlJR1XhzVaxHVbdeeyjs+l8 4sUDSacpmXXMr9LamuDwuoHtXa3Jsqfs0Q++H39xkdRih3clk1PDMBdq+/gAQQj3 fJzPk= Received: from [192.168.1.158] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a4.g.dreamhost.com (Postfix) with ESMTPSA id E06798AA7F; Sun, 1 Aug 2021 21:03:00 -0700 (PDT) Subject: Re: [PATCH 0/3] Allow LLD 13.0.0 and improve compatibility with gold and clang To: Fangrui Song , libc-alpha@sourceware.org References: <20210726035802.275992-1-maskray@google.com> X-DH-BACKEND: pdx1-sub0-mail-a4 From: Siddhesh Poyarekar Message-ID: Date: Mon, 2 Aug 2021 09:32:55 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210726035802.275992-1-maskray@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/26/21 9:27 AM, Fangrui Song via Libc-alpha wrote: > For malloc/tst-compathooks-on, > > malloc/tst-compathooks-on: Symbol `__free_hook' has different size in shared object, consider re-linking > > the root cause is that lld's symbol versioning is different from GNU ld in an unusal case: > > __asm__ (".symver " "__free_hook" "," "__free_hook" "@" "GLIBC_2.2.5"); > > This leaves two symbols __free_hook and __free_hook@GLIBC_2.2.5. > __free_hook is then attached a default version GLIBC_2.2.5. > I think malloc/malloc-debug.c uses a fragile versioned symbol here. > If the inline asm uses @@ the failure should go away. The entire point of link time deprecation is to not emit a @@ symbol. If lld emits __free_hook@@GLIBC_2.2.5 in this case then this needs to be resolved. How does one do symbol deprecation in lld? > In summary, I think the failed tests touch some dark corners of the toolchain. > These things do not really matter for real world applications. Not having a default symbol version is a documented mechanism[1] to deprecate symbols, so this is not some obscure use case. Symbol deprecation matters for real world applications. Siddhesh [1] See section 3.3 in https://www.akkadia.org/drepper/dsohowto.pdf: "Every versioned DSO has at most one version of every API which can be used at link-time. An API (not ABI) can also vanish completely: this is a way to deprecate APIs without affecting binary compatibility."