This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld: Add '--defined' command line option.
- From: Nick Clifton <nickc at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, binutils at sourceware dot org
- Date: Thu, 23 Jul 2015 12:26:18 +0100
- Subject: Re: [PATCH] ld: Add '--defined' command line option.
- Authentication-results: sourceware.org; auth=none
- References: <1437426340-25537-1-git-send-email-andrew dot burgess at embecosm dot com>
Hi Andrew,
I like this patch in principle, but there are a few problems with it
at the moment:
* Is this patch really necessary ? Can the same affect not be
achieved by combining --undefined= and --no-undefined ? If not, why not ?
* I think that the name of the option, --defined is slightly
confusing. When I first read your submission I thought that it meant
that a defined symbol was being created, ie that it was an alias of
--defsym. So how about a different name ? For example
--no-allow-undef=<foo>. [This version might even be extended so the the
inverse option --allow-undef=<foo> would stop --no-undefined from
complaining if that particular symbol was undefined]. Or how about
--undefined-and-err= so that the connection with --undefined is more
obvious ?
* The documentation needs to be extended. You need an entry in the
ld/NEWS file and an update to the --undefined entry in ld/ld.texinfo
referring the reader to the new option and explaining why they might
want to use it instead.
* The new tests need to be extend to make sure that the linker does
not complain if the defined symbol does exist, and that the new option
does duplicate the behaviour of the --undefined option.
Cheers
Nick