[ELF] Don't set versionId on undefined weak lazy symbols
An unfetched lazy symbol (undefined weak) should be considered to have its original versionId which is VER_NDX_GLOBAL, instead of the lazy symbol's versionId. (The original versionId cannot be non-VER_NDX_GLOBAL because a undefined versioned symbol is an error.) The regression was introduced in D77280 when making version scripts work with lazy symbols fetched by LTO calls. Fix PR49915 Differential Revision: https://reviews.llvm.org/D100624
Loading