public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org, Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH V2] testsuite: support mold linker
Date: Mon, 5 Dec 2022 15:24:35 +0100	[thread overview]
Message-ID: <3fde398b-b77c-8aee-1a99-a628e3a31222@suse.cz> (raw)
In-Reply-To: <7ed64ac6-3719-eded-bfb2-59fa794e7ade@suse.com>

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


  reply	other threads:[~2022-12-05 14:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 12:10 [PATCH] " Martin Liška
2022-12-05 12:22 ` Jan Beulich
2022-12-05 13:46   ` Martin Liška
2022-12-05 13:48     ` [PATCH V2] " Martin Liška
2022-12-05 14:08       ` Jan Beulich
2022-12-05 14:24         ` Martin Liška [this message]
2022-12-05 14:48           ` Jan Beulich
2022-12-05 14:52             ` Martin Liška
2022-12-05 15:13               ` Jan Beulich
2022-12-05 14:25         ` Jakub Jelinek
2022-12-05 14:41           ` [PATCH V3] " Martin Liška
2022-12-05 14:50             ` Jan Beulich
2022-12-07  0:36               ` Fangrui Song
2022-12-07  0:42                 ` Fangrui Song
2022-12-07 13:01                 ` Martin Liška

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=3fde398b-b77c-8aee-1a99-a628e3a31222@suse.cz \
    --to=mliska@suse.cz \
    --cc=binutils@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=jbeulich@suse.com \
    /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).