populate: Include dependencies of PIE executables

Modern versions of the 'file' utility give different output for position
dependent and position independent executables. The populate tool should
consider both types.

Signed-off-by: Johan Levin <johan13@gmail.com>
This commit is contained in:
Johan Levin 2022-05-05 18:13:02 +02:00 committed by Chris Packham
parent b6887d346f
commit 8fa98eeeff

View File

@ -281,9 +281,9 @@ CT_TMP_DIR="${TMPDIR:-/tmp}/populate-${rand}-${$}"
trap "rm -rf ${CT_TMP_DIR}" EXIT
# List all ELF (executables|shared objects)...
find . -type f -exec file {} \; \
|"${grep}" -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|shared object),' \
|cut -d ":" -f 1 \
find . -type f -exec file {} \; \
|"${grep}" -E ': ELF [[:digit:]]+-bit (L|M)SB +(executable|pie executable|shared object),' \
|cut -d ":" -f 1 \
>"${CT_TMP_DIR}/files.list"
# ... and use that list to find missing dependencies