1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00
llvm-mirror/lib/Linker
Petr Hosek 683bdb08a0 [Linker] Support weak symbols in nodeduplicate COMDAT group
When a nodeduplicate COMDAT group contains a weak symbol, choose
a non-weak symbol (or one of the weak ones) rather than reporting
an error. This should address issue PR51394.

With the current IR representation, a generic comdat nodeduplicate
semantics is not representable for LTO. In the linker, sections and
symbols are separate concepts. A dropped weak symbol does not force the
defining input section to be dropped as well (though it can be collected
by GC). In the IR, when a weak linkage symbol is dropped, its associate
section content is dropped as well.

For InstrProfiling, which is where ran into this issue in PR51394, the
deduplication semantic is a sufficient workaround.

Differential Revision: https://reviews.llvm.org/D108689
2021-09-02 14:15:28 -07:00
..
CMakeLists.txt [ThinLTO] Import symver directives for imported symbols (PR48214) 2020-12-02 14:56:43 +01:00
IRMover.cpp [CSSPGO] Do not import pseudo probe desc in thinLTO 2021-07-13 18:26:36 -07:00
LinkDiagnosticInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LinkModules.cpp [Linker] Support weak symbols in nodeduplicate COMDAT group 2021-09-02 14:15:28 -07:00