[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Library bindings or os.execute?
- From: Adrian Perez de Castro <aperez@...>
- Date: Wed, 14 Jun 2017 10:53:29 +0300
Hello,
On Wed, 14 Jun 2017 02:35:38 -0400, Sean Conner <sean@conman.org> wrote:
> [...]
>
> -spc (Who thinks that executables should also be shared libraries ... )
This is doable at least when dealing with ELF objects. Of course the binary
has to _both_ provide a program entry point (likely as a weak symbol, so it
can be overriden when the ELF object is linked in as a shared library), and
also export dynamic symbols. You can try this today, by going ahead and
executing the glibc main binary:
% /lib/libc-2.25.so
...
Of course, building such a binary can get tricky (symbol visibility, weak
symbols) and most likely it will be a portability nightmare. Still doable,
though!
Cheers,
--
Adrián 🎩
Attachment:
pgprGXit9UTfF.pgp
Description: PGP signature