llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.13k stars 11.1k forks source link

IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY in JITLink and ORC #56465

Open sunho opened 2 years ago

sunho commented 2 years ago

The definition of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY is "it indicates that no library search for sym1 should be performed." This thread clarifies the meaning of the flag in more depth. The specific relevant paragraph is

The SVR4 ABI uses (and bfd currently supports)
the equivalent of IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY semantics (a
library member does not resolve a weak symbol unless a strong symbol
cause the member to be linked in)

ORC can't correctly support this flag now. In order to implement this, we must add a new LookupKind semantic or extend LinkGraph to somehow indicates "don't pull this symbol in at all, but bind it if it's already present" per symbol level.

llvmbot commented 2 years ago

@llvm/issue-subscribers-orcjit