forked from OSchip/llvm-project
688183ec54
D64136 and D65584, while fixing STB_WEAK issues and improving our compatibility with ld.bfd, can cause another STB_WEAK problem related to LTO: If %tundef.o has an undefined reference on f, and %tweakundef.o has a weak undefined reference on f, %tdef.o has a definition of f ``` ld.lld %tundef.o %tweakundef.o --start-lib %tdef.o --end-lib ``` 1) `%tundef.o` doesn't set the `referenced` bit. 2) `%weakundef.o` changes the binding from STB_GLOBAL to STB_WEAK 3) `%tdef.o` is not fetched because the binding is weak. Step (1) is incorrect. This patch sets the `referenced` bit of Undefined created by bitcode files. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D66992 llvm-svn: 370437 |
||
---|---|---|
.. | ||
COFF | ||
Driver/Inputs | ||
ELF | ||
MinGW | ||
Unit | ||
darwin | ||
mach-o | ||
wasm | ||
CMakeLists.txt | ||
lit.cfg.py | ||
lit.site.cfg.py.in |