[all-commits] [llvm/llvm-project] 2a04f5: [ELF] Drop unused original symbol after wrapping i...

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Fri Apr 22 16:47:34 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a04f5c455c83c443c71a86b1cee653b4c791bef
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

  Changed paths:
    M lld/ELF/Driver.cpp
    M lld/ELF/SymbolTable.cpp
    M lld/test/ELF/lto/wrap-unreferenced-before-codegen.test
    A lld/test/ELF/wrap-drop-shared-original.s
    M lld/test/ELF/wrap-lazy.test

  Log Message:
  [ELF] Drop unused original symbol after wrapping if not defined

We were previously only omitting the original of a wrapped symbol if it
was not used by an object file and undefined. We can tighten the second
condition to drop any symbol that isn't defined instead, which lets us
drop a previous check (added in https://reviews.llvm.org/D118756) that
was only covering some such symbols.

Reviewed By: MaskRay

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

More information about the All-commits mailing list