[all-commits] [llvm/llvm-project] 40c5bd: [ELF] --exclude-libs: don't assign VER_NDX_LOCAL t...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jan 14 10:13:48 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 40c5bd4212a51216a489fdaaf59060921d677009
      https://github.com/llvm/llvm-project/commit/40c5bd4212a51216a489fdaaf59060921d677009
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M lld/ELF/Driver.cpp
    A lld/test/ELF/exclude-libs-undef.s

  Log Message:
  -----------
  [ELF] --exclude-libs: don't assign VER_NDX_LOCAL to undefined symbols

Suggested by Peter Collingbourne.

Non-VER_NDX_GLOBAL versions should not be assigned to defined symbols. --exclude-libs violates this and can cause a spurious error "cannot refer to absolute symbol" after D71795.

excludeLibs incorrectly assigns VER_NDX_LOCAL to an undefined weak symbol =>
isPreemptible is false =>
R_PLT_PC is optimized to R_PC =>
in isStaticLinkTimeConstant, an error is emitted.

Reviewed By: pcc, grimar

Differential Revision: https://reviews.llvm.org/D72681




More information about the All-commits mailing list