Relocatable file definitions shared with DSO

Landed [ELF] Suppress --no-allow-shlib-undefined diagnostic when a SharedSymbol is overridden by a hidden visibility Defined which is later discarded by MaskRay · Pull Request #70130 · llvm/llvm-project · GitHub, which restores the previous (behavior before release/18.x is created), suppressing a diagnostic when:

  • There is a DSO undef that has been satisfied by a definition from another DSO.
  • The SharedSymbol is overridden by a non-exported (usually of hidden visibility) definition in a relocatable object file (Defined).
  • The section containing the Defined is garbage-collected (it is not part of .dynsym and is not marked as live).

My latest thought is that we probably should not do #70163. This applies to too few scenarios. A generic ODR violation detector would be more useful.

1 Like