[all-commits] [llvm/llvm-project] c1c679: [ELF] Make --version-script/--dynamic-list work fo...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Apr 6 09:47:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c1c679e2d2d31cb33007b162f92e117d3a4507f4
      https://github.com/llvm/llvm-project/commit/c1c679e2d2d31cb33007b162f92e117d3a4507f4
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M lld/ELF/SymbolTable.cpp
    M lld/ELF/Symbols.cpp
    A lld/test/ELF/lto/version-libcall.ll

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




More information about the All-commits mailing list