[all-commits] [llvm/llvm-project] 70c23e: [LLD] Improve reporting unresolved symbols in shar...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Mon May 10 22:52:22 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 70c23e232e50b190c9e0d8e4b5b6a8ddfc19b80c
      https://github.com/llvm/llvm-project/commit/70c23e232e50b190c9e0d8e4b5b6a8ddfc19b80c
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2021-05-11 (Tue, 11 May 2021)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/ELF/InputFiles.h
    M lld/ELF/Writer.cpp
    M lld/test/ELF/allow-shlib-undefined.s

  Log Message:
  -----------
  [LLD] Improve reporting unresolved symbols in shared libraries

Currently, when reporting unresolved symbols in shared libraries, if an
undefined symbol is firstly seen in a regular object file that shadows
the reference for the same symbol in a shared object. As a result, the
error for the unresolved symbol in the shared library is not reported.
If referencing sections in regular object files are discarded because of
'--gc-sections', no reports about such symbols are generated, and the
linker finishes successfully, generating an output image that fails on
the run.

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

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




More information about the All-commits mailing list