This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/43974] New: Undefined symbol main in crt1.o when compiling shared libs on Solaris
- From: "bjoern at j3e dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2010 11:52:57 -0000
- Subject: [Bug c/43974] New: Undefined symbol main in crt1.o when compiling shared libs on Solaris
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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