Skip to content

Commit

Permalink
check-cross-arch: Update i386 check to match pie binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and Mrfai committed Sep 30, 2021
1 parent c305dfa commit 6be2136
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/check-cross-arch
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ fi

info=$(file /bin/more)
myarch=$(expr "$info" : '.*ld-linux-\([^[:space:]]*\).so.*')
i386_re="ELF 32-bit LSB (shared object|pie executable), Intel 80386"
if [ -z "$myarch" ]; then
if [[ "$info" =~ "ELF 32-bit LSB shared object, Intel 80386" ]]; then
if [[ "$info" =~ $i386_re ]]; then
myarch=i386
fi
fi
Expand All @@ -38,7 +39,7 @@ _more=$target/${_more#$target}
info=$(file $_more)
targetarch=$(expr "$info" : '.*ld-linux-\([^[:space:]]*\).so.*')
if [ -z "$targetarch" ]; then
if [[ "$info" =~ "ELF 32-bit LSB shared object, Intel 80386" ]]; then
if [[ "$info" =~ $i386_re ]]; then
targetarch=i386
fi
fi
Expand Down

0 comments on commit 6be2136

Please sign in to comment.