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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 10:13:47 PST 2024


MaskRay wrote:

> Had to remind myself of where we were up to by re-reading [discourse.llvm.org/t/relocatable-file-definitions-shared-with-dso/74391/7](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 #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.

Thanks for the wording suggestion. Updated. Merged in e390bda9782b461f10433aa6728acf87521e22a5

Made a reply to https://discourse.llvm.org/t/relocatable-file-definitions-shared-with-dso/74391/10

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


More information about the llvm-commits mailing list