[PATCH] D80255: [rfc] [lld] Do not ignore comdats when parsing LTO objects

Christy Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 11:58:30 PDT 2020


christylee added a comment.

In D80255#2048298 <https://reviews.llvm.org/D80255#2048298>, @ruiu wrote:

> How did it work with gold with the LTO plugin?


As far as I can tell, the llvm `gold-plugin.cpp` takes the compiled files and pass to gold for normal linking, where comdat de-duplication happens in `Sized_relobj_file<size, big_endian>::include_section_group()` https://kernel.googlesource.com/pub/scm/linux/kernel/git/hjl/binutils/+/hjl/secondary/gold/object.cc?autodive=0%2F#856.   The only difference I see is that for gold, if the first word of a SHT_GROUP section contains flags then it treats the section as a normal section, whereas lld would continue and not create a new section for it.  However, the "undefined hidden symbols" come from SHT_GROUP sections so I don't think they are related.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80255





More information about the llvm-commits mailing list