Files
clang-p2996/lld/test/ELF/linkerscript
Fangrui Song a2359a865a [ELF] Fix PROVIDE_HIDDEN -shared regression with bitcode file references
The inaccurate #111945 condition fixes a PROVIDE regression (#111478)
but introduces another regression: in a DSO link, if a symbol referenced
only by bitcode files is defined as PROVIDE_HIDDEN, lld would not set
the visibility correctly, leading to an assertion failure in
DynamicReloc::getSymIndex (https://reviews.llvm.org/D123985).
This is because `(sym->isUsedInRegularObj || sym->exportDynamic)` is
initially false (bitcode undef does not set `isUsedInRegularObj`) then
true (in `addSymbol`, after LTO compilation).

Fix this by making the condition accurate: use a map to track defined
symbols.

Reviewers: smithp35

Reviewed By: smithp35

Pull Request: https://github.com/llvm/llvm-project/pull/112386
2024-10-15 09:20:10 -07:00
..
2024-07-28 11:43:27 -07:00
2024-07-26 16:51:42 -07:00
2024-07-27 14:46:41 -07:00