This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/16428: Disallow -shared/-pie, -shared/-static, -pie/-static
- From: Cary Coutant <ccoutant at google dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 13 Jan 2014 14:25:50 -0800
- Subject: Re: PATCH: PR ld/16428: Disallow -shared/-pie, -shared/-static, -pie/-static
- Authentication-results: sourceware.org; auth=none
- References: <20140110142001 dot GA6035 at intel dot com> <20140111001259 dot GE5390 at bubble dot grove dot modra dot org> <CAMe9rOo0UtpbdT69cnkK4fZD5pmzQnuX2wMCkBy3GuSLGcmcow at mail dot gmail dot com>
>>> + bfd_boolean seen_pie = FALSE, seen_shared = FALSE, seen_static = FALSE;
>>
>> Do we really want to error on the mere presense of an option on the
>> command line that is later cancelled by some other option? I think
>> this is a bad idea.
>
> That is what gold does.
Are there "no" versions of these options? In gold, once any of these
options is set, it can't be unset.
(Nevertheless, if there were a way to unset any of them, gold only
checks the final state of the options -- it wouldn't complain if you
had, e.g., "--static --shared --nostatic". HJ's patch appears to do it
this way as well; if there were a --nostatic, it should set
seen_static to FALSE, and you wouldn't get an error.)
-cary