[all-commits] [llvm/llvm-project] 71dcd9: [ELF] Change the search order for dependent libraries

Petr Hosek via All-commits all-commits at lists.llvm.org
Fri Jan 28 20:46:16 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71dcd9bd049e3cd1faa95ef085b9bbd6c2450f5a
      https://github.com/llvm/llvm-project/commit/71dcd9bd049e3cd1faa95ef085b9bbd6c2450f5a
  Author: Petr Hosek <phosek at google.com>
  Date:   2022-01-28 (Fri, 28 Jan 2022)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/test/ELF/deplibs.s

  Log Message:
  -----------
  [ELF] Change the search order for dependent libraries

When processing dependent libraries, if there's a directory of the same
name as the library being searched for, either in the current directory
or earlier in the search order, LLD will try to open it and report an
error. This is because LLD uses file existence check. To address this
issue we reverse the order, searching the library by basename first
and only considering search paths later, and current directory last.

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




More information about the All-commits mailing list