tests/toolbox.inc.sh: update regex for getting endian
PATCH 1/1 tests/toolbox.inc.sh: update regex for getting endian
From: Changqing Li <[email protected]>
Update regex for get endian to following condition:/proc/777/exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
Signed-off-by Changqing Li <[email protected]>
--- tests/toolbox.inc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/toolbox.inc.sh +2 -2
@@ -13,10 +13,10 @@ echo === $OUTPUTFILE === endian=`file -L /proc/$$/exe` -if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null +if expr "$endian" : '.* MSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null then endian=BE -elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null +elif expr "$endian" : '.* LSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null then endian=LE else
Signature · 1 line
2.37.1