PIE executables (e.g. /usr/bin/ls) are detected as application/x-sharedlib
Submitted by David Faure
Assigned to Shared Mime Info group
/usr/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.0.0, BuildID[sha1]=339279bdac0d1a8c98b6bbb92afc8d8edb185d9f, stripped
This file is detected as application/x-sharedlib instead of application/x-executable, by the s-m-i test suite, if I add it there.
Patch for the test suite: http://www.davidfaure.fr/kde/smi.diff
- downloading http://www.davidfaure.fr/kde/ls into tests/.
Result: ls, 'data' test: expected application/x-executable, got application/x-sharedlib ls, 'file' test: expected application/x-executable, got application/x-sharedlib
There must be a bug in the ELF magic for application/x-sharedlib and/or application/x-executable.