1*c5535c91SAndrew GeisslerFrom b84ecc2e3e56a25a3efd56c8942ad6bab3ff9ba1 Mon Sep 17 00:00:00 2001
2517393d9SAndrew GeisslerFrom: Changqing Li <changqing.li@windriver.com>
3517393d9SAndrew GeisslerDate: Fri, 2 Dec 2022 15:35:40 +0800
4517393d9SAndrew GeisslerSubject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian
5517393d9SAndrew Geissler
6517393d9SAndrew GeisslerUpdate regex for getting endian in following condition:
7517393d9SAndrew Geissler/proc/777/exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
8517393d9SAndrew Geissler
9517393d9SAndrew GeisslerUpstream-Status: Submited [Submitted to keyrings@vger.kernel.org ]
10517393d9SAndrew Geissler
11517393d9SAndrew GeisslerSigned-off-by: Changqing Li <changqing.li@windriver.com>
12517393d9SAndrew Geissler---
13517393d9SAndrew Geissler tests/toolbox.inc.sh | 4 ++--
14517393d9SAndrew Geissler 1 file changed, 2 insertions(+), 2 deletions(-)
15517393d9SAndrew Geissler
16517393d9SAndrew Geisslerdiff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
17*c5535c91SAndrew Geisslerindex 8bf0db6f6d87..7ea2f253ba7d 100644
18517393d9SAndrew Geissler--- a/tests/toolbox.inc.sh
19517393d9SAndrew Geissler+++ b/tests/toolbox.inc.sh
20517393d9SAndrew Geissler@@ -13,10 +13,10 @@
21517393d9SAndrew Geissler echo === $OUTPUTFILE ===
22517393d9SAndrew Geissler
23517393d9SAndrew Geissler endian=`file -L /proc/$$/exe`
24*c5535c91SAndrew Geissler-if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
25*c5535c91SAndrew Geissler+if expr "$endian" : '.* MSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
26517393d9SAndrew Geissler then
27517393d9SAndrew Geissler     endian=BE
28*c5535c91SAndrew Geissler-elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
29*c5535c91SAndrew Geissler+elif expr "$endian" : '.* LSB .*\(pie executable\|executable\|shared object\).*' >&/dev/null
30517393d9SAndrew Geissler then
31517393d9SAndrew Geissler     endian=LE
32517393d9SAndrew Geissler else
33517393d9SAndrew Geissler--
34*c5535c91SAndrew Geissler2.39.0
35517393d9SAndrew Geissler
36