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
Subject: Re: [PATCH] testsuite: support mold linker
Date: Mon, 5 Dec 2022 14:46:26 +0100	[thread overview]
Message-ID: <83618407-1683-8805-58d9-c7ac27263ddc@suse.cz> (raw)
In-Reply-To: <390e89b4-f7ca-8147-60df-fa1094ded1eb@suse.com>

On 12/5/22 13:22, Jan Beulich wrote:
> On 05.12.2022 13:10, Martin Liška wrote:
>> --- a/binutils/testsuite/binutils-all/objcopy.exp
>> +++ b/binutils/testsuite/binutils-all/objcopy.exp
>> @@ -652,8 +652,8 @@ proc strip_test_with_saving_a_symbol { } {
>>  
>>      set exec_output [binutils_run $NM "$NMFLAGS $objfile"]
>>      set exec_output [prune_warnings $exec_output]
>> -    if {![regexp {^([0-9a-fA-F]+)?[ ]+[TD] main} $exec_output] \
>> -         && ![regexp {^([0-9a-fA-F]+)?[ ]+T _main} $exec_output]} {
>> +    if {![regexp {^([0-9a-fA-F]+)?[ ]+[tTD] main} $exec_output] \
> 
> Further below, for libbacktrace, you also include 'd' in the check (and 't'
> was already there). Could you clarify why 't' alone isn't sufficient there,
> but is sufficient here?

Yeah, it is sufficient.

> 
>> +         && ![regexp {^([0-9a-fA-F]+)?[ ]+[tT] _main} $exec_output]} {
> 
> While orthogonal to the purpose of the patch I still wonder whether you
> wouldn't better take the opportunity and fold the two regexp-s (also
> elsewhere):
> 
>     if {![regexp {^[0-9a-fA-F]*[ ]+[tTD] _?main} $exec_output]} {

Yep, works for me.

> 
> (with a simplification to the earlier part also included). Looking at
> strip_executable_with_saving_a_symbol, which you also adjust, the [TtD]
> vs [tT] difference looks to be accidental rather than deliberate.

Correct, D is really accidental value here.

Lemme send V2.

Martin

> 
> Jan


  reply	other threads:[~2022-12-05 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 12:10 Martin Liška
2022-12-05 12:22 ` Jan Beulich
2022-12-05 13:46   ` Martin Liška [this message]
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
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=83618407-1683-8805-58d9-c7ac27263ddc@suse.cz \
    --to=mliska@suse.cz \
    --cc=binutils@sourceware.org \
    --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).