public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: Jan Beulich <jbeulich@suse.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH v2 1/2] ld: Add support for a new option, -exclude-symbols, in COFF object file directives
Date: Tue, 26 Jul 2022 10:09:34 +0300 (EEST)	[thread overview]
Message-ID: <7082e388-8c14-c741-4e66-4bc3d9639ab@martin.st> (raw)
In-Reply-To: <36a3fb2e-c06d-ef6c-93f7-18c5a88d71d1@suse.com>

On Mon, 25 Jul 2022, Jan Beulich wrote:

> On 23.07.2022 00:02, Martin Storsjo wrote:
>> This maps to the same as ld's --exclude-symbols command line option,
>> but allowing specifying the option via directives embedded in the
>> object files instead of passed manually on the command line.
>> ---
>> Fixed parsing multiple comma separated symbols. While pe_dll_add_excludes
>> does tokenize the string, the symbol tokens in deffilep.y don't
>> include commas, so we need to handle that at that level.
>
> This patch is about object files only, so doesn't all of this belong in the
> next patch?

Surprisingly, the def parser is used to tokenize the argument to the 
option in the embedded directive - in the previous patch, it only included 
the first symbol up to the first comma. So due to that, we'd either need a 
def parser token for "identifier string including commas", or do the 
comma splitting at the parser level.

>> --- /dev/null
>> +++ b/ld/testsuite/ld-pe/exclude-symbols-embedded.d
>> @@ -0,0 +1,10 @@
>> +#source: exclude-symbols-embedded.s
>> +#target: i*86-*-cygwin* i*86-*-pe i*86-*-mingw*
>
> What about x86-64 at the very least? That's the most common target nowadays,
> i.e. also the one with the pest chances of catching regressions early.

Sure, I can add that too, sorry for missing it. Here, i386 is the more 
interesting one though, as it has symbol prefixes, and the testcase 
defines how that's handled. But I'll add an x86_64 one too.

> Also while I realize that there are several uses of i*86-* there already, I think
> that's a little too broad. Can I talk you into using i?86-* instead?

Sure, I can absolutely change that. That was just a copypaste from some 
other test.

// Martin


      reply	other threads:[~2022-07-26  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 22:02 Martin Storsjo
2022-07-22 22:02 ` [PATCH v2 2/2] ld: Support the -exclude-symbols option via COFF def files, with the EXCLUDE_SYMBOLS keyword Martin Storsjo
2022-07-25  9:56   ` Jan Beulich
2022-07-26  7:10     ` Martin Storsjö
2022-07-25  9:51 ` [PATCH v2 1/2] ld: Add support for a new option, -exclude-symbols, in COFF object file directives Jan Beulich
2022-07-26  7:09   ` Martin Storsjö [this message]

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=7082e388-8c14-c741-4e66-4bc3d9639ab@martin.st \
    --to=martin@martin.st \
    --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).