How to make a file which is both shared library and executable

For example, consider /lib/libc.so. We can execute that as a command and we can use that also as a shared library.Even I want to make my libraries like that. Can you please help me?Thank you in advanceDurga Prasad
[241 byte] By [durgaprasad] at [2007-11-26 9:58:07]
# 1

Hi, I know this feature is available in linux libc also. So, I have sent a mail to gcc.

I got some good replies.. link is http://gcc.gnu.org/ml/gcc-help/2006-09/msg00068.html

At http://www.logix.cz/michal/devel/faketime/index.xp?show_selected=1&msgid=42 6#feedback_form there are some hints about making the similar thing in solaris. But I did not try them.

durgaprasad at 2007-7-7 1:23:19 > top of Java-index,Solaris Operating System,Solaris 10 Features...