[PATCH] D101996: [LLD] Improve reporting of unresolved symbols in shared libraries

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 07:36:18 PDT 2021


ikudrin created this revision.
ikudrin added reviewers: MaskRay, grimar.
ikudrin added projects: lld, LLVM.
Herald added subscribers: arichardson, emaste.
ikudrin requested review of this revision.

The current implementation checks the file where the symbol was seen for the first time. That might be a file that does not meet the requirements for reporting, e.g. it might have some DT_NEEDED missed or it might be a relocatable file that also references the symbol. As a result, the actual issue is not detected, the error is not reported, and an incorrect output file is generated whereas it should not.

      

The patch fixes the issue by keeping symbols, which should be checked, for each shared library separately.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101996

Files:
  lld/ELF/InputFiles.cpp
  lld/ELF/InputFiles.h
  lld/ELF/Writer.cpp
  lld/test/ELF/unresolved-in-dso.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101996.343402.patch
Type: text/x-patch
Size: 3970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210506/31903208/attachment.bin>


More information about the llvm-commits mailing list