having multiple copies of _GLOBAL__sub_I__xxxx which are calling std::ios_base::Init::Init()@GLIBCXX_3.4
Jonathan Wakely
jwakely.gcc@gmail.com
Tue Jul 10 20:20:00 GMT 2018
On Tue, 10 Jul 2018 at 12:29, Klaus Rudolph <lts-rudolph@gmx.de> wrote:
>
> I see that gcc emits for every function which uses cout a global constructor call is emitted, even if the function is removed later during link stage.
I don't think it's true that it does it for every function. It does it
once per translation unit, not once per function. Your test is
misleading because you only have one function per TU.
More information about the Gcc-help
mailing list