verify-elf: don't call verify_rpath() under a pipe because the errors are saved in a var
(A pipe makes a subshell and the var is modified there.)
This commit is contained in:
@ -363,12 +363,12 @@ VerifyELF()
|
|||||||
error_normal LINT "$f" 'eu-elflint failed'
|
error_normal LINT "$f" 'eu-elflint failed'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf %s "$objdump_info" |awk '($1=="RPATH"||$1=="RUNPATH"){print $2}' |
|
local rpath
|
||||||
while read -r rpath; do
|
while read -r rpath; do
|
||||||
verify_rpath "$f" "$rpath"
|
verify_rpath "$f" "$rpath"
|
||||||
# Two RUNPATH/RPATHs are reported; verify_rpath() always prints at least:
|
# Two RUNPATH/RPATHs are reported; verify_rpath() always prints at least:
|
||||||
# error_strict RPATH "$f" "RPATH entry found: $rpath"
|
# error_strict RPATH "$f" "RPATH entry found: $rpath"
|
||||||
done
|
done <<<"$(printf %s "$objdump_info" |awk '($1=="RPATH"||$1=="RUNPATH"){print $2}')"
|
||||||
|
|
||||||
if [ -z "${t##*ELF* executable*}" -o -z "${t##*ELF* shared object*}" ]; then
|
if [ -z "${t##*ELF* executable*}" -o -z "${t##*ELF* shared object*}" ]; then
|
||||||
verify_stack "$f"
|
verify_stack "$f"
|
||||||
@ -381,7 +381,6 @@ VerifyELF()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${t##*ELF* executable*dynamically linked*}" -o -z "${t##*ELF* shared object*}" ]; then
|
if [ -z "${t##*ELF* executable*dynamically linked*}" -o -z "${t##*ELF* shared object*}" ]; then
|
||||||
local rpath
|
|
||||||
rpath="$(printf %s "$objdump_info" |awk '($1=="RUNPATH"){print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
rpath="$(printf %s "$objdump_info" |awk '($1=="RUNPATH"){print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
||||||
if [ -z "$rpath" ]; then
|
if [ -z "$rpath" ]; then
|
||||||
rpath="$(printf %s "$objdump_info" |awk '($1=="RPATH"){print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
rpath="$(printf %s "$objdump_info" |awk '($1=="RPATH"){print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
||||||
|
Reference in New Issue
Block a user