[PATCH] D86142: [LLD] Search archives for non-tentative defintions.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 09:44:58 PDT 2020


MaskRay added a comment.

In D86142#2225679 <https://reviews.llvm.org/D86142#2225679>, @psmith wrote:

> ...
> Given that BFD supports this behaviour but Gold and LLD do not I suspect that the risk of breaking existing programs is small, especially as LLD tends to be used with more recent programs where -fno-common is the default. However I think we should be cautious and perhaps enable under a command line option, especially as it looks like this is a convention rather than part of a specification. If anyone has better references, then I'm happy to retract.

The code change looks good to me, but I hope @psmith and @grimar can take a look. The question from Peter stands (if we adopt an option it could be `--fortran-linking`)



================
Comment at: lld/ELF/InputFiles.cpp:1238
 
+static bool isBitcodeUncommonDef(MemoryBufferRef mb, StringRef symName,
+                                 StringRef archiveName) {
----------------
The two functions need a detailed explanation why it does so. It can quote the thread https://sourceware.org/pipermail/binutils/2020-August/112878.html


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86142



More information about the llvm-commits mailing list