egcs on AIX: native or gnu ld?
Andrey Slepuhin
pooh@msu.ru
Mon Oct 20 05:58:00 GMT 1997
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.
More information about the Gcc
mailing list