The dynamic linker can be run either indirectly by running some dynamically linked program or shared object (in which case no command-line options to the dynamic linker can be passed and, in the ELF case, the dynamic linker which is stored in the .interp section of the program is executed) or directly by running:
/lib/ld-linux.so.* [OPTIONS] [PROGRAM [ARGUMENTS]]
Similar info can be found in Program Library HOWTO.
But when I try,
$ LD_DEBUG=libs /usr/lib/ld-linux.so.2 ls 23325: find library=ls ; searching 23325: search cache=/etc/ld.so.cache 23325: ls: error while loading shared libraries: ls: cannot open shared object file $ LD_DEBUG=libs ls 23503: find library=libcap.so.2 ; searching 23503: search cache=/etc/ld.so.cache 23503: trying file=/usr/lib/libcap.so.2 ...
What am I doing wrong? Is there a way to use
ld-linux.so directly to run a program?