Stephen Kitt wrote in https://unix.stackexchange.com/a/448943/674
ld.sois a shared ELF object, but it doesn’t require an interpreter (it has no .interp entry); this is typical of libraries (shared executables always require an interpreter; otherwise they’re static, not dynamic).
Is an ELF object file a "shared executable" if and only if it has an .interp entry ?
What does "shared executables" mean? Is it the same as "shared libraries"?
Or does "shared executables" mean "partially linked executables"? In CSAPP
linux> gcc -o prog2l main2.c ./libvector.soThis creates an executable object file prog2l in a form that can be linked with libvector.so at run time.
... When the loader loads and runs the executable
prog2l, it loads the partially linked executableprog2l, using the techniques discussed in Section 7.9. Next, it notices thatprog2lcontains a.interpsection, which contains the path name of the dynamic linker, which is itself a shared object (e.g.,ld-linux.soon Linux systems).
libc.so.6. “Typical” doesn’t mean that only libraries have no.interpentry, or that no libraries have one. Statically-linked executables also don’t have an interpreter. (2) An ELF file is a shared executable if (a) it has ELF typeEXECand an.interpentry or (b) it has typeDYNand the PIE flag set inDT_FLAGS_1. – Stephen Kitt Sep 28 '20 at 05:22