[C++] Avoid one place of frontend calling into targetm
David Edelsohn
dje@watson.ibm.com
Tue May 8 21:40:00 GMT 2007
Well, the patch fixes the simple testcases I tried, but does not
completely return to the original behavior. With the patch, both
_GLOBAL__I_copies and _GLOBAL__I_0_copies are generated, but
_GLOBAL__I_copies no longer is global, so collect2 doesn't see it.
In other words,
.lglobl ._Z41__static_initialization_and_destruction_0ii
._Z41__static_initialization_and_destruction_0ii:
...
.lglobl ._GLOBAL__I_copies
._GLOBAL__I_copies:
bl ._Z41__static_initialization_and_destruction_0ii
.globl ._GLOBAL__I_0_copies
._GLOBAL__I_0_copies:
bl ._GLOBAL__I_copies
_GLOBAL__I_0_copies -> _GLOBAL__I_copies
-> _Z41__static_initialization_and_destruction_0ii
but, at least, the initializer only is called once. Because this change
in behavior does not return to the original assembly before the first
patch, I tend to doubt that this patch fixes the regression correctly.
But closer!
David
More information about the Gcc-patches
mailing list