From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 7506438A816B for ; Mon, 5 Dec 2022 14:24:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7506438A816B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id AC53D2073C; Mon, 5 Dec 2022 14:24:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1670250275; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+yeLYqdTNyHhYOjP9k7Az7bXSzLtFvyfDZTpSXYQZmw=; b=DOS/ZUlYhYkeKRGxckOVgG6rnwUU0UD+zg4FUes1naXoDtRYspdJs5MjBJ99cKyto/Lke4 LumJZPvJ9hU/4nIGp8ruaqBTruIe+wQWkv5+AS/3Zj59LDWZLgLZ4HM7DMMZ+wFuVqICwS dUkr9m/a/TgocKC7d3kHpgbmhrt4AzQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1670250275; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+yeLYqdTNyHhYOjP9k7Az7bXSzLtFvyfDZTpSXYQZmw=; b=rc+j5m4ZAYVLfZKPE4KObcnfsHmVuPqRMkQZzjs0VOOIrl0cyVXrEs8SRtQ5fY9RDZ3ydn oiYG+PxmNufTpWDA== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 8444C13326; Mon, 5 Dec 2022 14:24:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id TiKFHiP/jWOkEAAAGKfGzw (envelope-from ); Mon, 05 Dec 2022 14:24:35 +0000 Message-ID: <3fde398b-b77c-8aee-1a99-a628e3a31222@suse.cz> Date: Mon, 5 Dec 2022 15:24:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH V2] testsuite: support mold linker Content-Language: en-US To: Jan Beulich Cc: binutils@sourceware.org, Jakub Jelinek References: <83618407-1683-8805-58d9-c7ac27263ddc@suse.cz> <7ed64ac6-3719-eded-bfb2-59fa794e7ade@suse.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <7ed64ac6-3719-eded-bfb2-59fa794e7ade@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/5/22 15:08, Jan Beulich wrote: > On 05.12.2022 14:48, Martin Liška wrote: >> Mold linker demotes symbols like main to be local and the patch >> adjusts expected output from nm. >> >> Moreover, simplify the patterns and remove accidental type 'D' that >> is supported value for _?main functions. > > Hmm, in my v1 comment I've said "accidental" to the difference, not > to the presence of D. In fact I was expecting you to uniformly use > [TtDd] everywhere. See also adacfc818440 (sadly without any real > description). (That commit is also where [some of] the odd ([...]+)? > regexp constructs were introduced.) Cc-ing Jakub in case he recalls > background. Oh, I'm also curious why 'D' was added in the revision. > > Furthermore I now even less understand ... > >> --- a/libbacktrace/Makefile.am >> +++ b/libbacktrace/Makefile.am >> @@ -498,7 +498,7 @@ TESTS += mtest_minidebug >> >> %_minidebug: % >> $(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms >> - $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms >> + $(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D" || $$2 == "d") print $$1 }' | sort > $<.fsyms > > ... this part of the change, where - as in v1 - you add a check for > 'd', while a check for 't' (which supposedly is what you're after) > was already there. This nm invocation is supposed to save dynamic symbols (.dyns) and normal symbols ('.fsyms'), where .fsymc contains both data and functions. The symbol which I need to properly list is: mtest.c:int global = 1; which gets 'b' with mold linker. Martin > > Jan