[lld] [ELF] Suppress --no-allow-shlib-undefined diagnostic when a SharedSymbol is overridden by a hidden visibility Defined which is later discarded (PR #70130)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 06:19:22 PST 2024


https://github.com/smithp35 approved this pull request.

Had to remind myself of where we were up to by re-reading https://discourse.llvm.org/t/relocatable-file-definitions-shared-with-dso/74391/7

I'm guessing the main reason to make the change is that an error message has been tightened and this might surprise some users picking up the next official release of LLD for the first time.

IIUC this restores the previous behaviour, and https://github.com/llvm/llvm-project/pull/70163 builds on top of this (but adds a new option) that we are not sure is worth the additional complexity.

Overall LGTM.

I do have one question about the description:
```
* There is a DSO undef that can be satisfied by a definition from another DSO.
```
Should this be
```
* There is a DSO undef that has been satisfied by a definition from another DSO.
```
The use of "can be satisfied" implies that we can have:
* DSO undef of sym `foo`.
* non-exported Defined `foo`.
* Section containing Defined is garbage collected.
In that case there is no definition of `foo` available for the DSO undef so we should give an error.


https://github.com/llvm/llvm-project/pull/70130


More information about the llvm-commits mailing list