do_global_ctors_aux

Deepa T th.deepa at gmail.com
Sat Aug 8 09:47:06 PDT 2009


Hi,

I am trying to migrate a source code which was built with gcc 2.95.3 to
3.3.2 in Solaris 5.9
I am getting the linker  error "undefined reference to
_do_global_ctors_aux".

This function is declared as extern in the source and called from the main
() function after some validation of command line
There is no implementation given in the source code. As far as I understand
from the documentation of gcc, this function takes care of invoking the
global constructors and should be called before main.

I have the following questions. Appreciate your help
How to fix this linker  error? how did this code compile in gcc 2.95.3? Why
is the effect of calling this function from main?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20090808/1307d175/attachment.html>


More information about the hlfs-dev mailing list