verify-elf: tiny cleanup: local var declaration moved to the place of use
The other occurence of "rpath" is in the second part of a pipe and is local to that subshell anyway.
This commit is contained in:
parent
00635cb1ac
commit
70369c1a8e
@ -327,7 +327,7 @@ run_eu()
|
||||
|
||||
VerifyELF()
|
||||
{
|
||||
local f preload t objdump_info fname lint_info textrel rpath
|
||||
local f preload t objdump_info fname lint_info textrel
|
||||
f="$1"; shift
|
||||
preload="$1"; shift
|
||||
elf_segments=
|
||||
@ -376,6 +376,7 @@ VerifyELF()
|
||||
fi
|
||||
|
||||
if [ -z "${t##*ELF* executable*dynamically linked*}" -o -z "${t##*ELF* shared object*}" ]; then
|
||||
local rpath
|
||||
rpath="$(printf %s "$objdump_info" |awk '{if ($1=="RUNPATH") print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
||||
if [ -z "$rpath" ]; then
|
||||
rpath="$(printf %s "$objdump_info" |awk '{if ($1=="RPATH") print $2}' |tr -s : ' ' |sed -e "s|\$ORIGIN|${fname%/*}|g")"
|
||||
|
Loading…
x
Reference in New Issue
Block a user