__libc_main mechanism

From:

Ian Johns

Subject:

__libc_main mechanism

Date:

Mon, 09 Sep 2002 13:54:45 +0000

User-agent:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204

Hi,

I'm interested in glibc's ability to start as an application an provide
version information. What steps would be required to add this
functionality to my own .so? Is it simply a case of defining a function
and naming it as an entrypoint (-e) on the link line?