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

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Apr 20 11:23:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c00530b30e21fd0f5b316401f6485bee08ce850
      https://github.com/llvm/llvm-project/commit/1c00530b30e21fd0f5b316401f6485bee08ce850
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-04-20 (Tue, 20 Apr 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




More information about the All-commits mailing list