This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: trunk: bootstrap comparison failure
Jan Hubicka <hubicka@ucw.cz> writes:
> The problem is that GCC produce constructors/destructors at various places and they all used to be called GLOBAL__I
> and GLOBAL__D. Then in some cases (on targets that don't have global ctors/dtors or with LTO and ctor/dtor merging)
> it actually collect them into single constructor function called also GLOBAL__I and GLOBAL__D.
> Since the first ones are static functions called by the actual constructor, we get problem on targets not having
> ctors/dtors because collect2 collects even static symbols and attempts to call them from main(). This is reason why
> I renamed them to be no longer recognized specially.
If I understand you, it sounds like they could have any name at all.
Just give them a name which doesn't start with _GLOBAL__. Then there
won't be any problem. Although you should still update the demangler to
do something sensible with them.
Ian