[PATCH] D86762: [ELF] Add documentation for --warn-backrefs: a layering check tool

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 11:15:36 PDT 2020


MaskRay added a comment.

In D86762#2244647 <https://reviews.llvm.org/D86762#2244647>, @amccarth wrote:

> Is there a more specific term than "traditional linker"?
>
> I understand that LLD's search strategy is uncommon among linkers in the Posix (and/or ELF?) realm, but it's not uncommon in other linkers, even very old ones.  For example, the VMS (now OpenVMS) linker has used LLD's strategy by default for many decades.  (It does allow opting in to the more restrictive search.)  LLD's approach matches Microsoft's link.exe.  I can't be sure, but I don't recall the so-called traditional behavior from linkers from other vendors of Windows, DOS, or CP/M linkers.

Maybe "traditional ELF linker" or just GNU ld?

> I have no objection to turning the warning on in appropriate contexts or with the argument that it helps to ensure good layering.  I'm just quibbling over the term "traditional."

Thanks!

In D86762#2244648 <https://reviews.llvm.org/D86762#2244648>, @manojgupta wrote:

> @MaskRay Is there a global option to disable e.g --no-warn-backrefs . It is not easy for us to add -warn-backrefs-exclude=<glob> individually to all packages where we need to suppress the error.

`--warn-backrefs-exclude='*'` disables all warnings. We may need `--no-warn-backrefs` if it is more like the option users want to use. If you are happy to try out, I'd happy to know whether ChromeOS packages have no warnings if `--warn-backrefs` is added (`--fatal-warnings` upgrade warnings to errors).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86762/new/

https://reviews.llvm.org/D86762



More information about the llvm-commits mailing list