This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to make a file which is both shared library and executable
- From: Mike Hearn <mike at plan99 dot net>
- To: gcc at gcc dot gnu dot org
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 07 Sep 2006 15:40:35 +0100
- Subject: Re: How to make a file which is both shared library and executable
- References: <20060907141646.16891.qmail@web37201.mail.mud.yahoo.com>
On Thu, 07 Sep 2006 07:16:46 -0700, durgaprasad jammula wrote:
> Hi All,
>
> I want to make a shared library which should also be an executable. Can
> you please tell me how to do it.
It used to be kind of a pain to do this, these days you can probably
dlopen PIE binaries, or statically link in crt0 to your shared library ...
something like that. Otherwise you have to do a lot of work (invoking
syscalls directly and such).
thanks -mike