[all-commits] [llvm/llvm-project] 691208: [ELF] Don't set versionId on undefined weak lazy s...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue May 11 20:43:39 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 6912082cfd129bbc2bd60f293371e20140d50b86
      https://github.com/llvm/llvm-project/commit/6912082cfd129bbc2bd60f293371e20140d50b86
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M lld/ELF/SyntheticSections.cpp
    M lld/test/ELF/version-script-weak.s

  Log Message:
  -----------
  [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

(cherry picked from commit 1c00530b30e21fd0f5b316401f6485bee08ce850)




More information about the All-commits mailing list