3 ms·
> The one time out of ten is things like a script with a #! line that refers to a file that doesn't exist. More generally, the interpreter doesn't exist. For a
by duped 3y ago
> The one time out of ten is things like a script with a #! line that refers to a file that doesn't exist.
More generally, the interpreter doesn't exist. For a script with a shebang that's whatever is under the shebang. For executables it's whatever is in the PT_INTERP header in the binary (in ELF, or whatever the equivalent is for PE/Mach-O).
For example you might have an ELF binary with PT_INTERP set to /usr/lib/ld-linux.so when it's actually /lib/x86_64-unknown-linux-gnu/ld-linux.so. You'll get a "exec: File not found" error, even if all the files you think you need exist. The loader itself is what's missing.