[PATCH] D52602: [LLD] [COFF] Cope with GCC produced weak aliases referring to comdat functions

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 04:18:11 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, pcc.
Herald added a subscriber: eraman.

For certain cases of inline functions written to comdat sections, GCC 5.x produces a weak symbol in addition, which would end up  undefined in some cases.

This no longer seems to happen with GCC 6.x or newer, so this might not be strictly necessary. Also, when linking clang.exe, almost all symbols come from static libraries, so they just end up left as Lazy instead of Undefined, which makes the link succeed.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52602

Files:
  COFF/InputFiles.cpp
  test/COFF/Inputs/inline-weak.o
  test/COFF/Inputs/inline-weak2.o
  test/COFF/comdat-weak.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52602.167274.patch
Type: text/x-patch
Size: 3763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180927/f6bb263d/attachment.bin>


More information about the llvm-commits mailing list