[PATCH] D42825: Fix typo: --nopie -> --no-pie.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 20:10:08 PST 2018


If you give "-nopie" (with single leading hyphen) to gold, it looks like
gold interprets it as "-n -o pie". So, it doesn't print out any error
message, and it silently sets the output file name to "pie", which is I
think worse than reporting an error on "-nopie".

On Fri, Feb 16, 2018 at 7:59 PM, Rui Ueyama <ruiu at google.com> wrote:

> Can you explain why you think so?
>
> $ ld.gold --no-pie
> ld.gold: fatal error: no input files
>
> $ ld.gold --nopie
> ld.gold: --nopie: unknown option
> ld.gold: use the --help option for usage information
>
> $ ld.bfd --no-pie
> ld.bfd: unrecognized option '--no-pie'
> ld.bfd: use the --help option for usage information
>
> $ ld.bfd --nopie
> ld.bfd: unrecognized option '--nopie'
> ld.bfd: use the --help option for usage information
>
> On Fri, Feb 16, 2018 at 7:55 PM, Brad Smith via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
>> brad added a comment.
>> Herald added a subscriber: arichardson.
>>
>> This was NOT a typo.
>>
>>
>> Repository:
>>   rLLD LLVM Linker
>>
>> https://reviews.llvm.org/D42825
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180216/0d7af0a1/attachment.html>


More information about the llvm-commits mailing list