[lld] [ELF] Set vna_flags to VER_FLG_WEAK if all references are weak (PR #176673)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 21 08:41:50 PST 2026
smithp35 wrote:
> GNU ld doesn't set `vna_flags` (for version need) to the best of my knowledge. It sets `vd_flags` (for version definition) when the version node has no associated definitions. This behavior, probably inherited from Solaris doesn't seem useful, and is completed ignored by Linux and FreeBSD's rtld implementations.
>
The bit that I can see the `VER_FLG_WEAK` getting set is in `_bfd_elf_link_find_version_dependencies`
a->vna_flags = h->verinfo.verdef->vd_flags;
However I think this is still likely a holdover from Solaris.
https://github.com/llvm/llvm-project/pull/176673
More information about the llvm-commits
mailing list