This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs on AIX: native or gnu ld?
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: egcs on AIX: native or gnu ld?
- From: Andrey Slepuhin <pooh at msu dot ru>
- Date: Mon, 20 Oct 1997 16:56:52 +0400
- CC: egcs at cygnus dot com
- Organization: Moscow State University, Network Management Department
- References: <9710192145.AA33534@rios1.watson.ibm.com>
David Edelsohn wrote:
>
> >>>>> Andrey Slepuhin writes:
>
> Andrey> ld: 0711-319 WARNING: Exported symbol not defined: _GLOBAL_.I.f__Fv
> Andrey> ld: 0711-318 ERROR: Undefined symbols were found.
> Andrey> _GLOBAL_.I.f__Fv [2] ER DS ccMav3Ma.c(/tmp/ccMav3Ma.o)
>
> I think that this is an individual constructor.
>
> Andrey> Manually relinking files once more I obtain correct exexutable (If extra pass
> Andrey> is needed why not to do it automatically?). Unfortunately, -frepo option is
> Andrey> bad documented :-(
>
> XLC has a twolink option performs the link phase twice. This
> allows the IBM garbage-collecting linker to perform a pass and then
> re-examine the global symbols needing export. This frequently is useful
> for static contructors. What may happen is that the initial examination
> recognizes the symbol as a candidate for export but the linker discovers
> that the symbol is not referenced and removes it altogether which then
> causes an error because the original pass included it in the list of
> exports. The two-pass version only exports those symbols present after
> symbol garbage-collection.
Indeed, the error was caused by a fact that _GLOBAL_.I.f__Fv symbol is
defined
in my object file if I use default g++ flags and is undefined if I use
-frepo.
This symbol is referenced from __CTOR_LIST__ in automatically generated
by collect2
code. I don't understand why _GLOBAL_.I.f__Fv is absent in object file
when
I use -frepo, because this symbol is not connected with template
instantiation.
Andrey.