Comiling any shared library on Solaris with LDFLAGS "-Wl,-z,defs" to make sure that there are no unresoloved symbols results in:
Undefined first referenced symbol in file main /usr/local/lib/gcc/sparc-sun-solaris2.10/3.4.6/crt1.o ld: fatal: Symbol referencing errors. No output written to bin/libtalloc.so.2 It looks like there is a wrong assumption about a shared library having to have a symbol "main" on gcc on Solaris. More recent gcc releases than the above example are also affected. -- Summary: Undefined symbol main in crt1.o when compiling shared libs on Solaris Product: gcc Version: 3.4.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bjoern at j3e dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43974