[ELF] Make --version-script/--dynamic-list work for lazy symbols fetched by LTO libcalls
Fixes https://bugs.llvm.org/show_bug.cgi?id=45391 The LTO code generator happens after version script scanning and may create references which will fetch some lazy symbols. Currently a version script does not assign VER_NDX_LOCAL to lazy symbols and such symbols will be made global after they are fetched. Change findByVersion and findAllByVersion to work on lazy symbols. For unfetched lazy symbols, we should keep them non-local (D35263). Check isDefined() in computeBinding() as a compensation. This patch fixes a companion bug that --dynamic-list does not export libcall fetched symbols. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D77280
Loading
Please sign in to comment