[PATCH] D124065: [ELF] Drop unused original symbol after wrapping if not defined

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 22:22:36 PDT 2022


smeenai created this revision.
smeenai added a reviewer: MaskRay.
Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, arichardson, emaste.
Herald added a project: All.
smeenai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 that was only covering some such symbols.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124065

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124065.423810.patch
Type: text/x-patch
Size: 5066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220420/306a7d4f/attachment.bin>


More information about the llvm-commits mailing list