I'm trying to run
perl executable provided by a debug library on Ubuntu 16.04, but for some reason the file "isn't executable" even though it seems to be a match for my architecture.
perl executable that ships with Ubuntu 16.04 is stripped
$ nm /usr/bin/perl nm: /usr/bin/perl: no symbols
perl-debug package provides a
/usr/lib/debug that is not stripped.
$ nm /usr/lib/debug/usr/bin/perl | head U abort@@GLIBC_2.2.5 0000000000589020 r AboveLatin1_invlist U accept@@GLIBC_2.2.5 U access@@GLIBC_2.2.5 000000000058e002 r a_hash.16944 U alarm@@GLIBC_2.2.5 000000000058e010 r an_array.16943 00000000005795c0 r ASCII_invlist 0000000000543430 T ASCII_TO_NEED U atan2@@GLIBC_2.2.5
However, when you try to run it,
exec* fails and
bash gives you a nice message:
$ /usr/lib/debug/usr/bin/perl bash: /usr/lib/debug/usr/bin/perl: cannot execute binary file: Exec format error
When I run
file on the two perls though, I see that the debug perl is marked as "having an empty interpreter" where the regular perl has some ld shared object. It probably has some relationship to the linker
ld, but I don't know what it is.
$ file /usr/bin/perl /usr/bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=e6106890a64a3316b2adfc04bbf202f13f82b5bb, stripped $ file /usr/lib/debug/usr/bin/perl /usr/lib/debug/usr/bin/perl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, for GNU/Linux 2.6.32, BuildID[sha1]=e6106890a64a3316b2adfc04bbf202f13f82b5bb, not stripped
What exactly is
file telling me when it reports that the interpreter is empty?