Workaround je da se program kompajlira sa opcijom
Code:
-largs -no-pie
npr.
Code:
bojan@debian:~/Documents$ gnatmake hello -largs -no-pie
x86_64-linux-gnu-gcc-8 -c hello.adb
x86_64-linux-gnu-gnatbind-8 -x hello.ali
x86_64-linux-gnu-gnatlink-8 hello.ali -no-pie
bojan@debian:~/Documents$ file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=3a95b227700869a7a90eb7b36c2f0020d7e357a3, not stripped
bojan@debian:~/Documents$ mimetype hello
hello: application/x-executable
bojan@debian:~/Documents$
ali sta su oni radili kad je
Code:
bojan@debian:~/Documents$ file /usr/bin/gzip
/usr/bin/gzip: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=fcbda3ceb4edb90e5600e9d0e1657dcdac3c0058, stripped
bojan@debian:~/Documents$ mimetype /usr/bin/gzip
/usr/bin/gzip: application/x-sharedlib
bojan@debian:~/Documents$
Dakle sve to sto je izvrsni fajl sve je application/x-sharedlib a ne application/x-executable
Neverovatno ja bih voleo da se proveri i u drugim distroima koji koriste pie izvrsne fajlove jer je to znatan nedostatak, pogresan MIME