Creating executable shared libraries ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello. I'm trying to create a shared library that can also be executed as a 
normal executable in Linux (like libc.so), but I've run into some problems. 
For it to be linkable as a shared library I have to use the -shared option, 
but that disables any entry point information. Either leaving main in (as a 
weak symbol) or using the -e option (which seems to be undocumented ?) 
results in segfaults and such because no libraries seem to be resolved, not 
even libc. I've tried linking the required libraries statically, but that 
doesn't seem to work either. Googling didn't turn up anything useful.

Does anyone know how to do this properly ?

(Please cc any answers to me, as I'm not subscribed to this list.)

Thanks,
- Gerry

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux