[PATCH] D130449: [JITLink] Introduce WeakExternal linkage type.

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 17:11:54 PDT 2022


lhames added a comment.

> "If a definition of external symbol is linked, then an external reference to the symbol is resolved normally. If a definition of external symbol is not linked, then all references to the weak external for external symbol refer to stub symbol instead."

This is curious. Is it just a weaker weak? I.e. "Prefer another weak def if you have one, but use me as a last resort"? What happens if you have multiple instances of a symbol all tagged with this linkage? Does the linker just choose arbitrarily the same way that it would for a regular weak symbol? And how does this interact with COMDATs? Or is it never used on symbols in COMDAT sections?

If this behaves differently to "weak" or "strong" we'll need a new JITSymbolFlag for it too, and handling in the ORC symbol tables.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130449/new/

https://reviews.llvm.org/D130449



More information about the llvm-commits mailing list