From: Fangrui Song <i@maskray.me>
To: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Cc: Nick Clifton <nickc@redhat.com>, binutils@sourceware.org
Subject: Re: [PATCH] allow empty string as argument to -Map
Date: Wed, 27 May 2020 21:23:17 -0700 [thread overview]
Message-ID: <MWHPR12MB1456B711F56DA7098F7AF363CB8E0@MWHPR12MB1456.namprd12.prod.outlook.com> (raw)
In-Reply-To: <7ad73b09-c551-9a17-f0fa-0839919158b4@rasmusvillemoes.dk>
On Wed, May 27, 2020 at 5:33 PM Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote:
>
> On 27/05/2020 18.50, Nick Clifton wrote:
> > Hi Rasmus,
> >
> >> So, as the next best thing, use a previously bogus value (the empty
> >> string) as a sentinel to indicate "use the output filename + .map".
> >
> > Thanks for suggesting this patch. I have applied it along with a couple
> > of changes:
> >
> > * If a filename is supplied, but it references a directory, then
> > create a file inside that directory, again based upon the output
> > filename with .map appended. (I actually did this to make it
> > easier to test the new feature, but it strikes that it might be
> > useful in its own right).
>
> That makes a lot of sense, thanks. And one can get "my" behaviour by
> passing "-Map=." or "-Map .", which...
>
> > * Updated the --help output from the linker to show that the
> > filename is optional.
>
> ... eliminates the somewhat clumsy need to specify the empty string as
> argument, either via -Map= or actually have the shell insert an empty
> string, -Map ''. I actually did attempt to modify the help text, but as
> the argument isn't really optional, I couldn't find a way to indicate
> that the empty string was meaningful - I worry a bit that the current
>
> -Map [FILE] Write a map file (default: <outputname>.map)
>
> can lead people to think that one can actually omit the argument - and
>
> -Map --gc-sections
>
> would just put the map in the file --gc-sections, but otherwise work.
>
> So before this gets set in stone, can I retract my suggestion of
> assigning meaning to the empty string (maybe continue to handle it
> internally equivalent to ".", but not advertising it)? For the help
> text, it's hard to explain in one line, but perhaps something like
>
> -Map FILE/DIR Write a map file to FILE or DIR/<outputname>.map
>
> (And perhaps change "map file" to "link map" or "linker map")
>
> Rasmus
>
An empty argument value is very uncommon. Does an empty string work in
a response file?
next prev parent reply other threads:[~2020-05-28 4:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 7:01 Rasmus Villemoes
2020-05-27 16:50 ` Nick Clifton
2020-05-28 0:33 ` Rasmus Villemoes
2020-05-28 4:23 ` Fangrui Song [this message]
2020-05-28 9:54 ` Nick Clifton
2020-10-23 12:31 ` Rasmus Villemoes
2020-10-29 15:52 ` Nick Clifton
2020-10-30 12:37 ` Rasmus Villemoes
2020-10-30 16:35 ` Nick Clifton
2020-11-03 9:13 ` Rasmus Villemoes
2020-11-04 11:07 ` Nick Clifton
2020-11-04 11:13 ` Rasmus Villemoes
2020-11-05 0:47 ` Fangrui Song
2020-11-05 10:01 ` Nick Clifton
2020-11-05 11:41 ` Nick Clifton
2020-11-05 12:23 ` Rasmus Villemoes
2020-11-06 14:38 ` Nick Clifton
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=MWHPR12MB1456B711F56DA7098F7AF363CB8E0@MWHPR12MB1456.namprd12.prod.outlook.com \
--to=i@maskray.me \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--cc=rv@rasmusvillemoes.dk \
/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).