Checking the source from /usr/bin/ldd, I see that it uses ld-linux to find the dependencies of an executable, although it first calls ld-linux with the --verify argument. Then the script acts differently according to the exit code of the ld-linux --verify call.
The man page for ld-linux does not provide any info on exit codes, and a Google search turns nothing of value. Is there some documentation anywhere (other than by looking at ld-linux's source code) that provides a list of exit codes for ld-linux --verfify and their respective meanings?
I didn't find any documentation, but...
if (__builtin_expect (mode, normal) == verify)
{
/* We were called just to verify that this is a dynamic
executable using us as the program interpreter. Exit with an
error if we were not able to load the binary or no interpreter
is specified (i.e., this is no dynamically linked binary. */
if (main_map->l_ld == NULL)
_exit (1);
/* We allow here some platform specific code. */
#ifdef DISTINGUISH_LIB_VERSIONS
DISTINGUISH_LIB_VERSIONS;
#endif
_exit (has_interp ? 0 : 2);
}
So...
There are no other codes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With