Skip to content

Commit

Permalink
elf: prevent absolute path for DT_NEEDED libs
Browse files Browse the repository at this point in the history
packages like neovim record in DT_NEEDED the full path to the lpeg.so
lua module, which makes pkg check unhappy.

Until we have a clever way to deal with such modules, ignore absolute
path DT_NEEDED entry
  • Loading branch information
bapt committed Jan 25, 2025
1 parent d553983 commit 7a0cf34
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libpkg/pkg_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ analyse_elf(struct pkg *pkg, const char *fpath)
if (dyn->d_tag == DT_SONAME) {
pkg_addshlib_provided(pkg, shlib, flags);
} else if (dyn->d_tag == DT_NEEDED) {
/*
* some packages record fullpath to a lib
* neovim is an example, skip them for now
*/
if (*shlib == '/')
continue;
pkg_addshlib_required(pkg, shlib, flags);
}
}
Expand Down

0 comments on commit 7a0cf34

Please sign in to comment.