Neil Santos wrote:
I was wondering about this myself. Also, why is it that when I compile with the --shared switch, and then do a strip on the resulting executable, the compiled executable aborts due to a segfault?
The `-shared' switch is to make a shared library. The executable is linked without `-shared' switch. Linking to shared libraries is a default, unless there is no shared library. Shared library is treated by system as executable but AFAIKS it is normal that one gets a crash. If you get a crash from normal executable after stripping, then you have bug in strip (it should be smart enough to retain symbols needed at runtime).