[uClibc]Re: undefined reference to _init and _fini

Erik Andersen andersen at codepoet.org
Thu Jan 2 05:54:58 UTC 2003


On Wed Jan 01, 2003 at 08:05:11PM -0800, Steve Rodgers wrote:
> Hello,
> 
> I was wondering if anybody has experienced a problem linking C programs
> to uClibc which linked okay in version 0.9.12, but now do not link in
> version 0.9.16. Here are the error messages from the link attempt:
> 
> /usr/i386-linux-uclibc/lib/crt0.o: In function `_start':
> /usr/i386-linux-uclibc/lib/crt0.o(.text+0x13): undefined reference to
> `_fini'
> /usr/i386-linux-uclibc/lib/crt0.o(.text+0x18): undefined reference to
> `_init'
> 
> My target is a 486 based embedded controller.

You have a couple of choices.  You can update to the latest CVS
version and disable UCLIBC_CTOR_DTOR such that we do not even try
to support global constructors and global destructors.  Or you
can modify your gcc specs file so that it properly adds in
crtbegin.o, crti.o, crtn.o, and crtend.o to all executables.  I
recommend you just update uClibc and disable ctor/dtor support.
Unless of course you plan to use any C++ code or use gcc's
__attribute__((constructor)) and __attribute__((destructor)).

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list