Can anyone explain the differences between using -shared, -symbolic, and -G? I've noticed two differences: 1. If I compile a shared library with -G, will contain an undefined reference to main that will prevent linking if -z defs is present. If I compile with -shared or -symbolic, the reference doesn't exist. 2. If I compile a shared library with -G, it doesn't matter if I statically link libraries. If I use -shared or -symbolic, I get millions of unresolved text relocation errors unless I add -mimpure-text. What is the -G option actually doing differently? The man page simply recommends you use -shared or -symbolic instead, but doesn't explain why or how to choose. Are shared and symbolic synonyms? The man page says share and symbolic only work on certain platforms, but it's unclear if it's the same platforms in both cases.