[PATCH] allow empty string as argument to -Map

Nick Clifton nickc@redhat.com
Thu May 28 09:54:27 GMT 2020


Hi Rasmus,

> That makes a lot of sense, thanks. And one can get "my" behaviour by
> passing "-Map=." or "-Map .", 

Ha!  I had not even though of that.

> ... eliminates the somewhat clumsy need to specify the empty string as
> argument, 

Agreed.

> 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)?

I have made the change.  See the attached patch.  I decided that for
the empty string case it would be best to generate a message telling
the user and ignoring the map file request.


> (And perhaps change "map file" to "link map" or "linker map")

Also done.

Cheers
  Nick

ld/ChangeLog
2020-05-28  Nick Clifton  <nickc@redhat.com>

	* lexsup.c (parse_args): Generate an error if a name is not
	provided to the -Map option.
	(ld_options): Mention that the -Map option supports a directory
	name as an argument.
	* NEWS: Remove mention of support for an empty string as an
	argument to -Map.
	* ld.texi: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: map.patch
Type: text/x-patch
Size: 3906 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200528/0c5fe1c2/attachment-0001.bin>


More information about the Binutils mailing list