I've been trying to add an entry point to a C shared library, so that executing
$ ./lib/mylib.so
prints some helpful information to the terminal.
Following the work here, I was able to get my library to run like so:
$ /lib64/ld-linux-x86-64.so.2 ./lib/mylib.so
Some useful configuration information about this library:
- blah blah
- Gcc version: gcc-9
- Hostname where compiled: foo
$
However, when I run without the interpreter, I get a no such file or directory
error. Why is this? What can I do to help my shell find the correct interpreter?