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.
Details
Details
- Reviewers
MaskRay - Commits
- rG71dcd9bd049e: [ELF] Change the search order for dependent libraries
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks! There is some optimization we can make, e.g. if there is no path separator, don't bother with searchLibraryBaseName, but it may not justify the added code complexity.
@bd1976llvm would like to see smaller amount of code on this feature IIRC.