verify-elf: bypass lint checks by request

lld linked binaries differ by structure from GNU ld, so eu-lint will
always complaint about.  Allow to skip those checks by passing
%set_verify_elf_method lint=(skip|no)

Signed-off-by: Konstantin A. Lepikhov <lakostis@altlinux.ru>
This commit is contained in:
Konstantin A. Lepikhov 2018-03-20 21:27:45 +01:00 committed by Dmitry V. Levin
parent dec047fee1
commit 169f3ece9a

View File

@ -339,10 +339,17 @@ VerifyELF()
error_normal FHS "$f" 'ELF object out of allowed directory tree'
fi
if ! lint_info=$(run_eu elflint --gnu-ld "$f" 2>&1); then
printf '%s\n' "$lint_info" >&2
error_normal LINT "$f" 'eu-elflint failed'
fi
case "$VERIFY_ELF_LINT" in
no|skip)
error_normal LINT "$f" 'skipping eu-elflint by request'
;;
*)
if ! lint_info=$(run_eu elflint --gnu-ld "$f" 2>&1); then
printf '%s\n' "$lint_info" >&2
error_normal LINT "$f" 'eu-elflint failed'
fi
;;
esac
local rpath rpaths
rpaths="$(printf %s "$objdump_info" |awk '($1=="RPATH"||$1=="RUNPATH"){print $2}')"