3 ms·
Not sure about on MacOS, but on Linux running the `file` command on a binary indicates whether it's stripped or not: $ echo 'int main() { return 0; }' > ma
by saghm 4y ago
Not sure about on MacOS, but on Linux running the `file` command on a binary indicates whether it's stripped or not:
$ echo 'int main() { return 0; }' > main.c && gcc main.c && file a.out
a.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=6e4c5817c9bf2ddcc5a2dfe6d9d9729526c81aed, for GNU/Linux 4.4.0, with debug_info, not stripped
$ strip a.out && file a.out
a.out: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=6e4c5817c9bf2ddcc5a2dfe6d9d9729526c81aed, for GNU/Linux 4.4.0, stripped