Stephen Kitt wrote in https://unix.stackexchange.com/a/448943
any ELF object with an entry point can be an executable, regardless of its other properties.
ld.so is both an executable (because of having an entry point) and a shared library.
What is the necessary and sufficient condition for an ELF object file to be a shared library?
What is the necessary and sufficient condition for an ELF object file to be a relocatable object file?
The following quote says that a shared library is a relocatable object file.
Is an executable file also a relocatable object file?
Is an executable a shared library?
7.3 Object Files
Object ﬁles come in three forms:
Relocatable object ﬁle. Contains binary code and data in a form that
can be combined with other relocatable object ﬁles at compile time to
create an executable object ﬁle.
Executable object ﬁle. Contains binary code and data in a form that
can be copied directly into memory and executed.
Shared object ﬁle. A special type of relocatable object ﬁle that can
be loaded into memory and linked dynamically, at either load time or