[lld] r248389 - [ELF2] - added ignored command line options for compatibility.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 11:35:14 PDT 2015

On Wed, Sep 23, 2015 at 11:05 AM, George Rimar <grimar at accesssoftek.com>
> I found the description of that flag in The GNU Linker book -
> Page 14:
> -assert keyword
> This option is ignored for SunOS compatibility

This was insteresting. Unfortunately, option handling doesn't seem to be
very consistent between version and documentation.

On binutils 2.25:
% /usr/local/bin/ld.bfd -assert
/usr/local/bin/ld.bfd: unrecognized option '-assert'

% /usr/local/bin/ld.gold -assert
/usr/local/bin/ld.gold: -assert: missing argument

It seems that also older versions of ld don't ignore that version, just not
recognize it (both single and double dash).

When there's ambiguity, I generally err on the side of being a little bit
stricter (unless there's a good reason not to).
In this case in particular, it seems you don't have a real use case for
this, and there's some contraddiction between what documentation says, what
ld.bfd does and what gold does.

At the light of these facts, I propose to revert this given it seems
whatever choice you make you violate something, and given this option has
probably impact on a negligible amount of users.

Please let me know if you have any objections.



"There are no solved problems; there are only problems that are more or
less solved" -- Henri Poincare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150923/89ffce16/attachment.html>

More information about the llvm-commits mailing list