Skip to contentSkip to conversation

tests/toolbox: detect endianness with PIE executables

PATCH New Ben Boeckel 1 participant 1 message Aug 29, 2019 Keys/keyrings

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/13 tests/toolbox: detect endianness with PIE executables

---
 tests/toolbox.inc.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/toolbox.inc.sh +2 -2
index 5a6d3f2..9c819e5 100644
@@ -13,10 +13,10 @@
 echo == $OUTPUTFILE = 
 endian=`file -L /proc/$$/exe`
-if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null
+if expr "$endian" : '.* MSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
 then
     endian¾
-elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null
+elif expr "$endian" : '.* LSB \+\(pie executable\|executable\|shared object\).*' >&/dev/null
 then
     endian=LE
 else
Signature · 1 line
2.21.0